{"action":"created","issue":{"url":"https://api.github.com/repos/sinkillerj/ProjectE/issues/861","labels_url":"https://api.github.com/repos/sinkillerj/ProjectE/issues/861/labels{/name}","comments_url":"https://api.github.com/repos/sinkillerj/ProjectE/issues/861/comments","events_url":"https://api.github.com/repos/sinkillerj/ProjectE/issues/861/events","html_url":"https://github.com/sinkillerj/ProjectE/issues/861","id":96440007,"number":861,"title":"In MindStone.java, code assumes a nonnull value to be returned by tile.getItemStack()","user":{"login":"grg-n-sox","id":241127,"avatar_url":"https://avatars.githubusercontent.com/u/241127?v=3","gravatar_id":"","url":"https://api.github.com/users/grg-n-sox","html_url":"https://github.com/grg-n-sox","followers_url":"https://api.github.com/users/grg-n-sox/followers","following_url":"https://api.github.com/users/grg-n-sox/following{/other_user}","gists_url":"https://api.github.com/users/grg-n-sox/gists{/gist_id}","starred_url":"https://api.github.com/users/grg-n-sox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grg-n-sox/subscriptions","organizations_url":"https://api.github.com/users/grg-n-sox/orgs","repos_url":"https://api.github.com/users/grg-n-sox/repos","events_url":"https://api.github.com/users/grg-n-sox/events{/privacy}","received_events_url":"https://api.github.com/users/grg-n-sox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-21T23:37:00Z","updated_at":"2015-07-28T19:42:22Z","closed_at":null,"body":"Code in question:\r\nhttps://github.com/sinkillerj/ProjectE/blob/f8192274bc7f98b57dec640db8f035d84b61f25b/src/main/java/moze_intel/projecte/gameObjs/items/rings/MindStone.java#L194\r\n\r\nIssue: Testing has found that in some rare cases, the tile.getItemStack() call can return a null value. When it does so, it ends up causing a NullPointerException over in MindStone.getStoredXP() @ L138. Don't know how to best handle a null in this case. Possibly just treat it like an empty item stack if that's a thing?\r\n\r\nHere's the log.\r\n\r\n```\r\njava.lang.NullPointerException: Ticking block entity\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.getStoredXP(MindStone.java:138)\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.canStore(MindStone.java:143)\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.suckXP(MindStone.java:202)\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.updateInPedestal(MindStone.java:194)\r\n\tat moze_intel.projecte.gameObjs.tiles.DMPedestalTile.func_145845_h(DMPedestalTile.java:49)\r\n\tat net.minecraft.world.World.func_72939_s(World.java:1939)\r\n\tat net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)\r\n\tat net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)\r\n\tat net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)\r\n\tat net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)\r\n\tat net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)\r\n\tat net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)\r\n\r\n\r\nA detailed walkthrough of the error, its code path and all known details is as follows:\r\n---------------------------------------------------------------------------------------\r\n\r\n-- Head --\r\nStacktrace:\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.getStoredXP(MindStone.java:138)\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.canStore(MindStone.java:143)\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.suckXP(MindStone.java:202)\r\n\tat moze_intel.projecte.gameObjs.items.rings.MindStone.updateInPedestal(MindStone.java:194)\r\n\tat moze_intel.projecte.gameObjs.tiles.DMPedestalTile.func_145845_h(DMPedestalTile.java:49)\r\n\r\n-- Block entity being ticked --\r\nDetails:\r\n\tName: DMPedestalTile // moze_intel.projecte.gameObjs.tiles.DMPedestalTile\r\n\tBlock type: ID #2164 (tile.pe_dmPedestal // moze_intel.projecte.gameObjs.blocks.Pedestal)\r\n\tBlock data value: 0 / 0x0 / 0b0000\r\n\tBlock location: World: (1412,88,1045), Chunk: (at 4,5,5 in 88,65; contains blocks 1408,0,1040 to 1423,255,1055), Region: (2,2; contains chunks 64,64 to 95,95, blocks 1024,0,1024 to 1535,255,1535)\r\n\tActual block type: ID #2164 (tile.pe_dmPedestal // moze_intel.projecte.gameObjs.blocks.Pedestal)\r\n\tActual block data value: 0 / 0x0 / 0b0000\r\nStacktrace:\r\n\tat net.minecraft.world.World.func_72939_s(World.java:1939)\r\n\tat net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)\r\n```"},"comment":{"url":"https://api.github.com/repos/sinkillerj/ProjectE/issues/comments/125732745","html_url":"https://github.com/sinkillerj/ProjectE/issues/861#issuecomment-125732745","issue_url":"https://api.github.com/repos/sinkillerj/ProjectE/issues/861","id":125732745,"user":{"login":"williewillus","id":2015032,"avatar_url":"https://avatars.githubusercontent.com/u/2015032?v=3","gravatar_id":"","url":"https://api.github.com/users/williewillus","html_url":"https://github.com/williewillus","followers_url":"https://api.github.com/users/williewillus/followers","following_url":"https://api.github.com/users/williewillus/following{/other_user}","gists_url":"https://api.github.com/users/williewillus/gists{/gist_id}","starred_url":"https://api.github.com/users/williewillus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williewillus/subscriptions","organizations_url":"https://api.github.com/users/williewillus/orgs","repos_url":"https://api.github.com/users/williewillus/repos","events_url":"https://api.github.com/users/williewillus/events{/privacy}","received_events_url":"https://api.github.com/users/williewillus/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T19:42:22Z","updated_at":"2015-07-28T19:42:22Z","body":"Tossed a mindstone out of the creative inventory into a hopper over a pedestal xD\r\nThey only get their nbt tags when they get placed into a players inventory, so by not loetting it touch one at all I was able to reproduce it :p"}}