Temporary workaround for binding

Also fixes lots of things that went wonky when #684 was merged

I have no clue how much is still broken. Guess we'll find out :D
This commit is contained in:
Nick 2016-03-27 20:11:03 -07:00
parent 1aaa817e65
commit c2fe583496
8 changed files with 127 additions and 12 deletions

View file

@ -1,11 +1,15 @@
package WayofTime.bloodmagic.api.impl;
import WayofTime.bloodmagic.api.DinnerBeforeDessert;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.iface.IBindable;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
/**
* Base class for all bindable items.
@ -19,6 +23,12 @@ public class ItemBindable extends Item implements IBindable
setMaxStackSize(1);
}
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
DinnerBeforeDessert.bindMe(worldIn, playerIn, itemStackIn);
return super.onItemRightClick(itemStackIn, worldIn, playerIn, hand);
}
// IBindable
@Override