lethinh
Members-
Posts
191 -
Joined
-
Last visited
Everything posted by lethinh
-
[1.11.2] [SOLVED] Comparing NBT Data of Two ItemStacks
lethinh replied to Draconwolver's topic in Modder Support
Use ItemStack#areItemStacksTagEqual -
I am having a problem that I don't know how to check if the bucket can pick up the liquid? And I tried this but this only work with bucket that inside Vanilla for (int i = 0; i < this.craftMatrix.getSlots(); ++i) { if (this.craftMatrix.getStackInSlot(i) != null && (this.craftMatrix.getStackInSlot(i).getItem() == Items.WATER_BUCKET || this.craftMatrix.getStackInSlot(i).getItem==Items.LAVA_BUCKET)) { this.craftMatrix.setStackInSlot(i, new ItemStack(Items.BUCKET)); } else { this.craftMatrix.extractItem(i, 1, false); } } I would greatly appreciated your help!
-
[Forge 1.10.2] Can I normally cast from IInventory to IItemHandler?
lethinh replied to lethinh's topic in Modder Support
Oops sorry, I have edited them -
[Forge 1.10.2] Can I normally cast from IInventory to IItemHandler?
lethinh replied to lethinh's topic in Modder Support
I have problem that the item insert/extract doesn't work. Each time I insert, the stack I insert doesn't decrease and when I extract, the stack doesn't take out. Here is my code: TileSolderingStation: https://pastebin.com/Xzw57H6S ItemHandlerBase: https://pastebin.com/bdgqDhka ItemHandlerPersistentCrafting: https://pastebin.com/fEbec0Mv -
[Forge 1.10.2] Can I normally cast from IInventory to IItemHandler?
lethinh replied to lethinh's topic in Modder Support
So what method will I use if I use IItemHandler to update the progress bar? -
[Forge 1.10.2] Can I normally cast from IInventory to IItemHandler?
lethinh replied to lethinh's topic in Modder Support
I mean how to make it work wit Container#onCraftMatrixChanged, IContainerListener#sendAllWindowProperties. They only use IInventory -
[Forge 1.10.2] Can I normally cast from IInventory to IItemHandler?
lethinh replied to lethinh's topic in Modder Support
I mean how to make it work wit Container#onCraftMatrixChanged, IContainerListener#sendAllWindowProperties. They only use IInventory -
I know this is a really dumb question but I wondered if I can cast from IInventory to IItemHandler. Because it has some methods that use IInventory instead of the IItemHandler capability system. Like Container#onCraftMatrixChanged, IContainerListener#sendAllWindowProperties.,... I would greatly appreciated your help!
-
What kinds of recipe is it shaped recipe (9 inputs and 1 output) or another recipe (1 output and 1 input) or something else?
-
[Forge 1.10.2] Where is the field enchantmentsList is forge 1.10.2?
lethinh replied to lethinh's topic in Modder Support
Thanks!