Block placer causes NullPointerException for blocks using the placer entity
See original GitHub issueMinecraft version & Mod Version: Minecraft 1.12.2 Cyclic 1.15.12
Single player or Server: Server
Describe problem (what you were doing / what happened): A player on the server decided to put a market from Farming for Blockheads into a block placer, which relies on the placer entity to determine its direction. Because the block placer passes null, it causes a NullPointerException which crashes the server. When the server crashes, the block placer doesn’t remove the item from its inventory, so the server gets stuck crashing on startup.
Crash log (if any): crash-2018-06-27_10.19.25-server.txt
Time: 6/27/18 10:19 AM
Description: Ticking block entity
java.lang.NullPointerException: Ticking block entity
at net.blay09.mods.farmingforblockheads.block.BlockMarket.func_180642_a(BlockMarket.java:83)
at net.minecraft.block.Block.getStateForPlacement(Block.java:2238)
at com.lothrazar.cyclicmagic.core.util.UtilPlaceBlocks.placeItemblock(UtilPlaceBlocks.java:95)
at com.lothrazar.cyclicmagic.block.placer.TileEntityPlacer.func_73660_a(TileEntityPlacer.java:144)
at net.minecraft.world.World.func_72939_s(World.java:1832)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Thread.java:748)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Industrial Foregoing Block Placer not placing blocks - Reddit
I play on my server with friend and block placer not working, i set spawn protection to 0 but nothing, any advices?
Read more >[SOLVED]Null Pointer Exception when registering tile entity ...
Hello, I am following along with McJty's 1.12 modding tutorials and am at the point where I am creating a Tile Entity. I...
Read more >Entity move to block position[1.7.10] - Minecraft Mods
I'm trying to make a custom AI where my custom mob moves to my custom block. I always get this crash report whenever...
Read more >How To Fix The Ticking Entity Crash in Minecraft - YouTube
Learn How To Fix The Ticking Entity Crash in Minecraft with Apex Hosting. Apex Minecraft Hosting: https://apexminecrafthosting.com/24/7 ...
Read more >Crashing when placing BC Quarry - ComputerCraft
I have tried placing the quarry my self with no problems at all. ... the block placers does... it must be how they...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Vanilla code is considered NonNull by default, with exceptions marked as
@Nullable(though not in all cases, since they’ve only recently started doing that).However, the fact that the Anvil also does not check for null is a clear indicator that this parameter is indeed NonNull and mods should not need to worry about null-checking the parameter.
From BlockAnvil, first line:
For the fake player, check out
FakePlayerorFakePlayerFactoryclasses, which are provided by Forge.https://minecraft.curseforge.com/projects/cyclic/files/2601662