Begin Sigil migration
This commit is contained in:
parent
96c617886a
commit
a0cd54969b
27 changed files with 648 additions and 430 deletions
|
@ -38,6 +38,7 @@ import WayofTime.bloodmagic.util.helper.TextHelper;
|
|||
import com.google.common.base.Strings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -69,6 +70,7 @@ import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
|||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerPickupXpEvent;
|
||||
|
@ -371,6 +373,13 @@ public class GenericHandler {
|
|||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGH)
|
||||
public void onTooltip(ItemTooltipEvent event) {
|
||||
if (event.getItemStack().getItem() instanceof IBindable)
|
||||
if (((IBindable) event.getItemStack().getItem()).getOwnerUUID(event.getItemStack()) != null)
|
||||
event.getToolTip().add(I18n.format("tooltip.bloodmagic.currentOwner", PlayerHelper.getUsernameFromStack(event.getItemStack())));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void selfSacrificeEvent(SacrificeKnifeUsedEvent event) {
|
||||
EntityPlayer player = event.player;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue