
EscapeMC
Forge Modder-
Posts
337 -
Joined
-
Last visited
Everything posted by EscapeMC
-
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Oh sorry! I didn't see you said that. Thank you, I didn't realize I should have done @Override until I thought about it. What method should I make to satisfy, "The method TileEntityTestChest() is undefined for the type test_chest" error? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Well I am sorry, I was incorrectly informed. I was under the impression that using that linked the tile entity. What must I do exactly to make test_chest use TileEntityTestChest? And thanks loordgek for that IInventory help with cleaning up from it. -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Alright, so what can I do to fix this all? What must I do with this method to make my test_chest have the tileEntity? remove it Then how does one link my TileEntity to my test_chest? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Alright, so what can I do to fix this all? What must I do with this method to make my test_chest have the tileEntity? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
What exactly do you mean? This one: @Override public boolean removedByPlayer(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player, boolean willHarvest) { if(!worldIn.isRemote) { TileEntity ***tileentity*** = worldIn.getTileEntity(pos); There? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Oh sorry, I had it in init for some reason... I changed it now https://github.com/EcapeMC/ThingsMod-1.10.2/tree/master/src/main/java/com/github/escapemc/thingsmod/blocks -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
yes -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Well, I don't really know how to give, and what to give, but here is the information in my Debug screen: https://postimg.org/image/9wglhhtlt/ https://postimg.org/image/gzytd28bx/ It also brought up PlayerInteractionManager and highlighted this line (298): boolean flag = iblockstate.getBlock().removedByPlayer(iblockstate, theWorld, pos, thisPlayerMP, canHarvest); My GitHut (if you need to look at my code): https://github.com/EcapeMC/ThingsMod-1.10.2 -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Aright, done. Eclipse asked em to open the debug perspective, and I did so. What information do I need to look for now? Really, what should I give you to all? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Alright, so I inserted a breakpoint where you told me to (the dot appeared on the line below, is that ok?). I have the game open in debug mode, what now? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Alright, so should I look up [lmgtfy]how to use the debugger in eclipse?[/lmgtfy] and still do all that? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Umm... well, you see... I've never used the debugger and I do not know how to use it... In all classes? (Only in ContainterTestChest, TileEntityTestChest, GuiHandler, and gui_test_chest I mean) -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
done -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Didn't solve problem [23:44:53] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.NullPointerException at com.github.escapemc.thingsmod.init.test_chest.removedByPlayer(test_chest.java:59) ~[test_chest.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more Hmf... -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Alright, so I now get the error (on both parts) saying "The constructor InvWrapper(ItemStackHandler) is undefined" and telling me to either cast it or add constructor involving IInventory, which I believe I need not to do. -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
So, can/should I do @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { this.markDirty(); if(worldObj != null && worldObj.getBlockState(pos).getBlock() != getBlockType()) {//if the block at myself isn't myself, allow full access (Block Broken) return (T) new CombinedInvWrapper(inputSlot); } if(facing == null) { return (T) new CombinedInvWrapper(inputSlot); } } return super.getCapability(capability, facing); } or do I make CombinedInvWrapper to InvWrapper? With only InvWrapper, I get an error for putting outputSlotWrapper or any other ItemStackHandler. -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Ok, I must be going crazy or something. I have my classes for this chest, Exactly as yours (except for name [and yes I took your SlotDust, SlotOutput, and CommonContainer just for now, unless it is ok if I keep them. Otherwise I will change them to be my own]) but right-clicking still does nothing, and destorying the block still gives me the error: [22:27:30] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.NullPointerException at com.github.escapemc.thingsmod.init.test_chest.removedByPlayer(test_chest.java:59) ~[test_chest.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more That line of my code mentioned is this: IItemHandler inventory = worldIn.getTileEntity(pos).getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); Anything wrong with it? IS IT THAT IITEMHANDLER? Or am I still sane? I do not believe it is IItemHandler in that case, because it is the same as your code for you sifter. ANY ideas on 1) Why this block when destroyed generates this error and 2) Why right-clicking my block does nothing? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Comments to stuff: I have no idea why right-clicking my block gives no response, it used to; it would crash the game. Also, when I set up a hopper to my block, nothing goes in (does this mean I have an issue with my TileEntity?) -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
I redid my Container (I think correctly) package com.github.escapemc.thingsmod.container; import com.github.escapemc.thingsmod.tileentity.TileEntityTestChest; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class ContainerTestChest extends Container { private TileEntityTestChest te; public ContainerTestChest(InventoryPlayer inventory, TileEntityTestChest te) { this.te = te; this.addSlotToContainer(new Slot((IInventory) te, 0, 80, 16)); bindPlayerInventory(inventory); //Player Inventory for (int y = 0; y < 3; ++y) { for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(inventory, x + y * 9 + 9, 8 + x * 18, 41 + y * 18)); } } //Player Hotbar for (int x = 0; x < 9; ++x) { this.addSlotToContainer(new Slot(inventory, x, 8 + x * 18, 99)); } } private void bindPlayerInventory(InventoryPlayer inventory) { // TODO Auto-generated method stub } @Override public boolean canInteractWith(EntityPlayer playerIn) { return this.te.isUseableByPlayer(playerIn); } @Override public ItemStack transferStackInSlot(EntityPlayer playerIn, int fromSlot) { ItemStack previous = null; Slot slot = (Slot) this.inventorySlots.get(fromSlot); if (slot != null && slot.getHasStack()) { ItemStack current = slot.getStack(); previous = current.copy(); if (fromSlot < 1) { // From TE Inventory to Player Inventory if (!this.mergeItemStack(current, 1, this.inventorySlots.size(), true)){ return null; } } else { // From Player Inventory to TE Inventory if (!this.mergeItemStack(current, 0, 1, false)) return null; } if (current.stackSize == 0) slot.putStack((ItemStack) null); else slot.onSlotChanged(); } return previous; } } Still confused though, your Container for your Sifter extended CommonContainer, but it would not let me extend that at all, so I kept Container. When I destroy my chest block, I still cannot run through it and I get the same error in the log: [21:12:49] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.NullPointerException at com.github.escapemc.thingsmod.init.test_chest.removedByPlayer(test_chest.java:60) ~[test_chest.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more And right-clicking my block still does not open the GUI -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
*pulls out knife, trembles in fear, cuts apple into 8 even slices and enjoys delicious meal of apple slices and caramel* Gosh I suck at this... Whelp, thanks for that too. What's next? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Wait a sec, I got it...? public boolean getCapability() { return false; } -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
@Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return super.getCapability(capability, facing); } That work for it? And what changes nor for the Container? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
EDIT: I notice whenever I place my block in game, it is fine, but when I break it! The log spits out this: [20:31:17] [Client thread/INFO]: [CHAT] Player281 has just earned the achievement [Taking Inventory] [20:31:55] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.NullPointerException at com.github.escapemc.thingsmod.init.test_chest.removedByPlayer(test_chest.java:63) ~[test_chest.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more And then also, when I try to walk through where the block was, I get stuck in a buggy walk, not able to go through it but I can go around it. To your comment, can you link me to a container of yours that I can compare to? -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
So, it does it automatically? Or is it just set to you values for your gui? Second, I loaded up the game... and I right click me block. No Crash! Yay! No GUI comes up either! No yay! This is so annoying UGHHH What might it be now? No crash, as I said, so looking through my github might be the only way I really appreciate all of this Draco. Truly -
{Solved!!! Finally!!!} [1.10.2] Gui With Chest
EscapeMC replied to EscapeMC's topic in Modder Support
Ah ok, but what about setting the x and y Sizes? Where do I do this?