cant figure out issue with picking up and placing crucibles and not remembering state, probably has to do with placement code
This commit is contained in:
@@ -274,12 +274,16 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{
|
|||||||
if (!slotList.get(0).isEmpty()) {
|
if (!slotList.get(0).isEmpty()) {
|
||||||
if (slotList.get(0).getItem() instanceof ItemNBTCrucible) {
|
if (slotList.get(0).getItem() instanceof ItemNBTCrucible) {
|
||||||
NBTTagCompound tag = this.slotList.get(0).getSubCompound("BlockEntityTag").copy();
|
NBTTagCompound tag = this.slotList.get(0).getSubCompound("BlockEntityTag").copy();
|
||||||
|
NBTTagCompound defaultNBT = this.slotList.get(0).getTagCompound();
|
||||||
if (tag != null) {
|
if (tag != null) {
|
||||||
|
System.out.println(tag);
|
||||||
|
System.out.println(defaultNBT);
|
||||||
ItemBlock temp = (ItemBlock) slotList.get(0).getItem();
|
ItemBlock temp = (ItemBlock) slotList.get(0).getItem();
|
||||||
int i = this.getMetadata(slotList.get(0).getMetadata());
|
int i = this.getMetadata(slotList.get(0).getMetadata());
|
||||||
IBlockState iblockstate1 = temp.getBlock().getStateForPlacement(world, pos, face, hitx, hity, hitz, i, player, hand);
|
IBlockState iblockstate1 = temp.getBlock().getStateForPlacement(world, pos, face, hitx, hity, hitz, i, player, hand);
|
||||||
temp.placeBlockAt(slotList.get(0), player, world, pos.up(1), face, hitx, hity, hitz, iblockstate1);
|
temp.placeBlockAt(slotList.get(0), player, world, pos.up(1), face, hitx, hity, hitz, iblockstate1);
|
||||||
slotList.set(0, ItemStack.EMPTY);
|
slotList.set(0, ItemStack.EMPTY);
|
||||||
|
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user