
EscapeMC
Forge Modder-
Posts
337 -
Joined
-
Last visited
Everything posted by EscapeMC
-
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
Wait can you write out exactly what each thing needs to change to because ti still does not work and I have a feeling that I am just doing 1-2 thing(s) wrong. How should I do this? What should I make this class? (What type?) I don't think I can get anymore specific than what I said... And just a class that implements ICapabilitySerializable And in your ItemBag make a method called initCapabilities() Alright. So I've made this class. I called it "TestBagCapabilities" Now I created initCapabilities in test_bag. Now what? And the read/write NBT still isn't working.. -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
Wait can you write out exactly what each thing needs to change to because ti still does not work and I have a feeling that I am just doing 1-2 thing(s) wrong. How should I do this? What should I make this class? (What type?) -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
package com.github.escapemc.thingsmod.items; import com.github.escapemc.thingsmod.Reference; import net.minecraft.item.Item; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import net.minecraftforge.items.ItemStackHandler; 13 public class test_bag extends Item implements ICapabilitySerializable { protected ItemStackHandler inputSlot; public test_bag() { inputSlot = new ItemStackHandler(18); setUnlocalizedName(Reference.ModItems.TEST_BAG.getUnlocalizedName()); setRegistryName(Reference.ModItems.TEST_BAG.getRegistryName()); } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { return this.getCapability(capability, facing) != null; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return null; } @Override 41 public NBTTagCompound writeToNBT(NBTTagCompound compound) { 42 super.writeToNBT(compound); compound.setTag("inputSlot", inputSlot.serializeNBT()); return compound; } @Override 50 public void readFromNBT(NBTTagCompound compound) { inputSlot.deserializeNBT(compound.getCompoundTag("inputSlot")); } } This gives me the following errors: Line 13: The type test_bag must implement the inherited abstract method INBTSerializable.deserializeNBT(NBTBase) Line 41: The method writeToNBT(NBTTagCompound) of type test_bag must override or implement a supertype method Line 42: The method writeToNBT(NBTTagCompound) is undefined for the type Item Line 50: The method readFromNBT(NBTTagCompound) of type test_bag must override or implement a supertype method I mentioned the lines in the [code] thing -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
For what? My bag? (and that was an accidental thank you, but have it anyway ) -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
I know what Deserialize and Serialize mean, I just didn't know what to do with them. As to the IInventory part, no I do not believe I did. This was the code for read/write for my TE of my chest: @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setTag("inputSlot", inputSlot.serializeNBT()); return compound; } @Override public void readFromNBT(NBTTagCompound compound) { inputSlot.deserializeNBT(compound.getCompoundTag("inputSlot")); } -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
1) Did I do this correctly with my inputSlot stuff? EXCEPT for the capabilities? (Pst, how would I do that? Looking back to my chest, I know there are no directions... so just ==null?) 2) Alright, I tried using the NBT stuff from my tileentity for my chest, did not work. I am not sure what to do with this serializeNBT and deserializeNBT. 3) Where and how exactly? I see none of this in my chest TE so I am confused -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
Alright... So I implemented ICapabilitySerializable, and it made me add 4 unimplemented methods. So far, I have edited one, but I am not sure 100% about any of them. @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { return this.getCapability(capability, facing) != null; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return null; } @Override public NBTBase serializeNBT() { return null; } @Override public void deserializeNBT(NBTBase nbt) { } -
1) 1.7.10 is not supported here. 2) 1.7.10 is not supported here. 3) This is the wrong section to post this thread. 4) I believe this is a problem for the devs of the mod "Journey Map"?
-
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
Ok wait, my brain is twisting. I so far have a very basic item. package com.github.escapemc.thingsmod.items; import com.github.escapemc.thingsmod.Reference; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class test_bag extends Item { public test_bag() { setUnlocalizedName(Reference.ModItems.TEST_BAG.getUnlocalizedName()); setRegistryName(Reference.ModItems.TEST_BAG.getRegistryName()); } } Where do I start? -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
Ok ok ok, one last thing before I start: Is my item I have created (test_bag) need to be an item, and I make a SEPARATE class of an item stack? Or do I make my item and ItemStack, and put all this tileentity-like code in the test_bag itself? -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
The IItemHandler can be the same as the one you would use in a TileEntity . The default implementation will do fine ( ItemStackHandler ). In Item#initCapabilities you have a return a ICapabilityProvider , for which you want to use CapabilityItemHandler.ITEM_HANDLER_CAPABILITY for an inventory. (Again, do you have a reference I can look at to understand this all?) I looked in the TileEntity Class and couldn't find either ItemStackHandler or IItemHandler. Now, am I being stupid? Wait a sec, *looks in my TileEntity for a chest, sees protected ItemStackHandler inputSlot; public TileEntityTestChest() { inputSlot = new ItemStackHandler(45); } * Ok, so is it something like this? And then, for the NBT, would it be something similar to this? @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setTag("inputSlot", inputSlot.serializeNBT()); return compound; } @Override public void readFromNBT(NBTTagCompound compound) { inputSlot.deserializeNBT(compound.getCompoundTag("inputSlot")); } Or am I very far off and using my TileEntity for a chest as a reference a bad idea? -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
(You have an example? I somewhat get it but am slightly confused) Alright, so instead of making an item, my item needs to be an ItemStack? This is quite confusing to me... (As stated just above) -
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
Oh wait duh! Why would I use a tile entity!!! *facepalm* -to myself, 'you idiot, its not a tile, and doesn't need an entity'- Alright, how would I "save the inventory inside the ItemStack's NBT." Specifically, hwat are you saying with this and how can I do it? -
Hello once again Forge forums! Today I am working on an item that on right click (in hand) it will bring up a GUI for a small-ish chest. I am thinking 9x2 inventory. (I have the GUI) I know how to make a container, and I am making it while I wait for a response. I also know how to do it in my GuiHandler. I assume the gui itself will be VERY similar (if not the same) to that of a custom chest (I have one already). My question(s) now, 1) Would the above information I stated be correct? and 2) How would the tile entity differ? (My currect tile entity for a CHEST is package com.github.escapemc.thingsmod.tileentity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.ItemStackHandler; public class TileEntityTestChest extends TileEntity { private String customName; protected ItemStackHandler inputSlot; public TileEntityTestChest() { inputSlot = new ItemStackHandler(45); } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setTag("inputSlot", inputSlot.serializeNBT()); return compound; } @Override public void readFromNBT(NBTTagCompound compound) { inputSlot.deserializeNBT(compound.getCompoundTag("inputSlot")); } @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()) { return (T) inputSlot; } if(facing == null) { return (T) inputSlot; } if(facing == EnumFacing.UP) { return (T) inputSlot; } if(facing == EnumFacing.DOWN) { return (T) inputSlot; } if(facing == EnumFacing.NORTH) { return (T) inputSlot; } if(facing == EnumFacing.EAST) { return (T) inputSlot; } if(facing == EnumFacing.WEST) { return (T) inputSlot; } if(facing == EnumFacing.SOUTH) { return (T) inputSlot; } } return super.getCapability(capability, facing); } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { return this.getCapability(capability, facing) != null; } public void setCustomName(String customName) { this.customName = customName; } } so how would it differ?) EDIT and 3) how would I bind this gui to on a right click open the Gui? with onRightClick or something? What along with that would I need?
-
Hey, I am interested in this! I would love to help or anything in any way I can!
-
Well, the line that is crashing is playerIn.openGui(Main.instance, GuiHandler.TEST_CHEST, worldIn, pos.getX(), pos.getY(), pos.getZ()); But except for the fact that it is in else { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityTestChest) { playerIn.openGui(Main.instance, GuiHandler.TEST_CHEST, worldIn, pos.getX(), pos.getY(), pos.getZ()); } return true; } } that instanceof and stuff of my TileEntityTestChest, I cannot figure out what is null. I have a feeling it is in my TileEntity because that is the only thing I have been editing since it worked, but I am not sure.
-
I am getting a crash whenever I right click the block to open the gui, Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release [10:26:33] [main/INFO] [GradleStart]: Extra: [] [10:26:33] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, /Users/school/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --accessToken{REDACTED}, --version, 1.10.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [10:26:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [10:26:33] [main/INFO] [FML]: Forge Mod Loader version 12.18.2.2099 for Minecraft 1.10.2 loading [10:26:33] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_101, running on Mac OS X:x86_64:10.12.1, installed at /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre [10:26:33] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [10:26:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [10:26:33] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [10:26:33] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [10:26:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [10:26:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [10:26:33] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [10:26:34] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [10:26:34] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [10:26:34] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [10:26:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [10:26:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [10:26:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [10:26:35] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [10:26:36] [Client thread/INFO]: Setting user: Player162 [10:26:41] [Client thread/WARN]: Skipping bad option: lastServer: [10:26:41] [Client thread/INFO]: LWJGL Version: 2.9.2 [10:26:42] [Client thread/INFO] [FML]: MinecraftForge v12.18.2.2099 Initialized [10:26:42] [Client thread/INFO] [FML]: Replaced 232 ore recipes [10:26:42] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [10:26:42] [Client thread/INFO] [FML]: Searching /Users/school/Extras/ThingsMod 1.10.2/run/mods for mods [10:26:44] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [10:26:45] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tm] at CLIENT [10:26:45] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tm] at SERVER [10:26:45] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Things Mod [10:26:45] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [10:26:45] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations [10:26:45] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [10:26:45] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Applying holder lookups [10:26:45] [Client thread/INFO] [FML]: Holder lookups applied [10:26:45] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [10:26:46] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [10:26:46] [Client thread/INFO] [sTDOUT]: [com.github.escapemc.thingsmod.Main:preinit:42]: Pre Init [10:26:46] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: OUTDATED Target: 12.18.3.2185 [10:26:46] [Client thread/INFO] [FML]: Applying holder lookups [10:26:46] [Client thread/INFO] [FML]: Holder lookups applied [10:26:46] [Client thread/INFO] [FML]: Injecting itemstacks [10:26:46] [Client thread/INFO] [FML]: Itemstack injection complete [10:26:48] [sound Library Loader/INFO]: Starting up SoundSystem... [10:26:48] [Thread-6/INFO]: Initializing LWJGL OpenAL [10:26:48] [Thread-6/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [10:26:48] [Thread-6/INFO]: OpenAL initialized. [10:26:49] [sound Library Loader/INFO]: Sound engine started [10:26:51] [Client thread/INFO] [FML]: Max texture size: 16384 [10:26:51] [Client thread/INFO]: Created: 16x16 textures-atlas [10:26:53] [Client thread/INFO] [sTDOUT]: [com.github.escapemc.thingsmod.Main:init:59]: Init [10:26:53] [Client thread/INFO] [FML]: Injecting itemstacks [10:26:53] [Client thread/INFO] [FML]: Itemstack injection complete [10:26:53] [Client thread/INFO] [sTDOUT]: [com.github.escapemc.thingsmod.Main:postinit:69]: Post Init [10:26:53] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [10:26:53] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Things Mod [10:26:54] [Client thread/INFO]: SoundSystem shutting down... [10:26:54] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [10:26:54] [sound Library Loader/INFO]: Starting up SoundSystem... [10:26:55] [Thread-8/INFO]: Initializing LWJGL OpenAL [10:26:55] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [10:26:55] [Thread-8/INFO]: OpenAL initialized. [10:26:55] [sound Library Loader/INFO]: Sound engine started [10:26:56] [Client thread/INFO] [FML]: Max texture size: 16384 [10:26:56] [Client thread/INFO]: Created: 1024x512 textures-atlas [10:26:57] [Client thread/WARN]: Skipping bad option: lastServer: [10:26:58] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [10:27:08] [server thread/INFO]: Starting integrated minecraft server version 1.10.2 [10:27:08] [server thread/INFO]: Generating keypair [10:27:08] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [10:27:08] [server thread/INFO] [FML]: Applying holder lookups [10:27:08] [server thread/INFO] [FML]: Holder lookups applied [10:27:09] [server thread/INFO] [FML]: Loading dimension 0 (Test World) (net.minecraft.server.integrated.IntegratedServer@33c23e31) [10:27:09] [server thread/INFO] [FML]: Loading dimension 1 (Test World) (net.minecraft.server.integrated.IntegratedServer@33c23e31) [10:27:09] [server thread/INFO] [FML]: Loading dimension -1 (Test World) (net.minecraft.server.integrated.IntegratedServer@33c23e31) [10:27:09] [server thread/INFO]: Preparing start region for level 0 [10:27:10] [server thread/INFO]: Preparing spawn area: 3% [10:27:11] [server thread/INFO]: Preparing spawn area: 95% [10:27:11] [server thread/INFO]: Changing view distance to 12, from 10 [10:27:12] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [10:27:12] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [10:27:12] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@8.0.99.99,Forge@12.18.2.2099,tm@1.0.0.0,mcp@9.19 [10:27:12] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [10:27:12] [server thread/INFO] [FML]: [server thread] Server side modded connection established [10:27:12] [server thread/INFO]: Player162[local:E:e31236a9] logged in with entity id 251 at (116.56827853116212, 81.0, 140.35013495243527) [10:27:12] [server thread/INFO]: Player162 joined the game [10:27:13] [server thread/INFO]: Saving and pausing game... [10:27:13] [server thread/INFO]: Saving chunks for level 'Test World'/Overworld [10:27:14] [server thread/INFO]: Saving chunks for level 'Test World'/Nether [10:27:14] [server thread/INFO]: Saving chunks for level 'Test World'/The End [10:27:14] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@2663a4d7[id=857939d7-cfd3-33df-b811-954d0fb8ea8e,name=Player162,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3060) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:131) [skinManager$3.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 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] [10:27:18] [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 net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:59) ~[slotItemHandler.class:?] at net.minecraft.inventory.Container.getInventory(Container.java:63) ~[Container.class:?] at net.minecraft.inventory.Container.addListener(Container.java:52) ~[Container.class:?] at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:100) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2723) ~[EntityPlayer.class:?] at com.github.escapemc.thingsmod.blocks.test_chest.onBlockActivated(test_chest.java:64) ~[test_chest.class:?] at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:477) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processRightClickBlock(NetHandlerPlayServer.java:706) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.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 [10:27:18] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking player at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:789) ~[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 net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:59) ~[slotItemHandler.class:?] at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:85) ~[Container.class:?] at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292) ~[EntityPlayerMP.class:?] at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2108) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:873) ~[WorldServer.class:?] at net.minecraft.world.World.updateEntity(World.java:2075) ~[World.class:?] at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:674) ~[WorldServer.class:?] at net.minecraft.world.World.updateEntities(World.java:1864) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:645) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:783) ~[MinecraftServer.class:?] ... 4 more [10:27:18] [server thread/ERROR]: This crash report has been saved to: /Users/school/Extras/ThingsMod 1.10.2/run/./crash-reports/crash-2016-12-21_10.27.18-server.txt [10:27:18] [server thread/INFO]: Stopping server [10:27:18] [server thread/INFO]: Saving players [10:27:18] [server thread/INFO]: Saving worlds [10:27:18] [server thread/INFO]: Saving chunks for level 'Test World'/Overworld [10:27:18] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ---- // Everything's going to plan. No, really, that was supposed to happen. Time: 12/21/16 10:27 AM Description: Ticking player java.lang.NullPointerException: Ticking player at net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:59) at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:85) at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2108) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:873) at net.minecraft.world.World.updateEntity(World.java:2075) at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:674) at net.minecraft.world.World.updateEntities(World.java:1864) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:645) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:783) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) at java.lang.Thread.run(Thread.java:745) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:59) at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:85) at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:292) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2108) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:873) at net.minecraft.world.World.updateEntity(World.java:2075) -- Player being ticked -- Details: Entity Type: null (net.minecraft.entity.player.EntityPlayerMP) Entity ID: 251 Entity Name: Player162 Entity's Exact location: 116.57, 81.00, 140.35 Entity's Block location: World: (116,81,140), Chunk: (at 4,5,12 in 7,8; contains blocks 112,0,128 to 127,255,143), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Passengers: [] Entity's Vehicle: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:674) at net.minecraft.world.World.updateEntities(World.java:1864) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:645) -- Affected level -- Details: Level name: Test World All players: 1 total; [EntityPlayerMP['Player162'/251, l='Test World', x=116.57, y=81.00, z=140.35]] Chunk stats: ServerChunkCache: 625 Drop: 0 Level seed: 8764091131123040331 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (128,64,164), Chunk: (at 0,4,4 in 8,10; contains blocks 128,0,160 to 143,255,175), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 281311 game time, 1132 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 28116 (now: false), thunder time: 55311 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:783) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) at java.lang.Thread.run(Thread.java:745) -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Mac OS X (x86_64) version 10.12.1 Java Version: 1.8.0_101, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 609286504 bytes (581 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP 9.32 Powered by Forge 12.18.2.2099 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.2.2099.jar) UCHIJAAAA Forge{12.18.2.2099} [Minecraft Forge] (forgeSrc-1.10.2-12.18.2.2099.jar) UCHIJAAAA tm{1.0.0.0} [Things Mod] (bin) Loaded coremods (and transformers): Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Player162'/251, l='Test World', x=116.57, y=81.00, z=140.35]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [10:27:18] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# ./crash-reports/crash-2016-12-21_10.27.18-server.txt [10:27:18] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [10:27:18] [server thread/INFO]: Saving chunks for level 'Test World'/Nether [10:27:18] [server thread/INFO]: Saving chunks for level 'Test World'/The End [10:27:18] [server thread/INFO] [FML]: Unloading dimension 0 [10:27:18] [server thread/INFO] [FML]: Unloading dimension -1 [10:27:18] [server thread/INFO] [FML]: Unloading dimension 1 [10:27:18] [server thread/INFO] [FML]: Applying holder lookups [10:27:18] [server thread/INFO] [FML]: Holder lookups applied [10:27:18] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [10:27:18] [Client thread/INFO] [FML]: Server terminated. AL lib: (EE) alc_cleanup: 1 device not closed GitHub is updated.
-
So where, if even, should I use them? Or are they now useless methods? (I had them for something earlier) So, you're saying to change this: @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()) { return (T) inputSlot; } if(facing == null) { return (T) inputSlot; } } return super.getCapability(capability, facing); } those two return (T) inputSlot; s to what?