Misty World

Misty World

512k Downloads

[BUG] Something fishy bout SaltPeter ore

DevTimur opened this issue ยท 3 comments

commented

I use Factory Tech mod in my modpack, and there is machine called Auto-miner. It mines bocks...

So, when ever auto-miner gets to Saltpeter Ore block, it breaks, and this log pop up in console.

Console Log Time: 8/12/20 10:09 AM Description: Ticking block entity

java.lang.NullPointerException: Ticking block entity
at ru.liahim.mist.block.MistSaltpeterOre.func_176195_g(MistSaltpeterOre.java:48)
at dalapo.factech.tileentity.specialized.TileEntityAutoMiner.findNextBlock(TileEntityAutoMiner.java:62)
at dalapo.factech.tileentity.specialized.TileEntityAutoMiner.performAction(TileEntityAutoMiner.java:78)
at dalapo.factech.tileentity.TileEntityMachine.TickCentral_TrueITickableUpdate(TileEntityMachine.java:208)
at com.github.terminatornl.tickcentral.api.TickHub.trueUpdate(TickHub.java:48)
at com.github.terminatornl.laggoggles.Main.redirectUpdate(Main.java:91)
at dalapo.factech.tileentity.TileEntityMachine.func_73660_a(TileEntityMachine.java)
at net.minecraft.world.World.func_72939_s(World.java:1838)
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.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:279)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Unknown Source)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Server thread
Stacktrace:
at ru.liahim.mist.block.MistSaltpeterOre.func_176195_g(MistSaltpeterOre.java:48)
at dalapo.factech.tileentity.specialized.TileEntityAutoMiner.findNextBlock(TileEntityAutoMiner.java:62)
at dalapo.factech.tileentity.specialized.TileEntityAutoMiner.performAction(TileEntityAutoMiner.java:78)
at dalapo.factech.tileentity.TileEntityMachine.TickCentral_TrueITickableUpdate(TileEntityMachine.java:208)
at com.github.terminatornl.tickcentral.api.TickHub.trueUpdate(TickHub.java:48)
at com.github.terminatornl.laggoggles.Main.redirectUpdate(Main.java:91)
at dalapo.factech.tileentity.TileEntityMachine.func_73660_a(TileEntityMachine.java)

-- Block entity being ticked --
Details:
Name: factorytech:autominer // dalapo.factech.tileentity.specialized.TileEntityAutoMiner
Block type: ID #1725 (tile.factorytech:factorytech.autominer // dalapo.factech.block.BlockMachine // factorytech:autominer)
Block data value: 3 / 0x3 / 0b0011
Block location: World: (-959,128,2897), Chunk: (at 1,8,1 in -60,181; contains blocks -960,0,2896 to -945,255,2911), Region: (-2,5; contains chunks -64,160 to -33,191, blocks -1024,0,2560 to -513,255,3071)
Actual block type: ID #1725 (tile.factorytech:factorytech.autominer // dalapo.factech.block.BlockMachine // factorytech:autominer)
Actual block data value: 3 / 0x3 / 0b0011
Stacktrace:
at net.minecraft.world.World.func_72939_s(World.java:1838)
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.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:279)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Unknown Source)

Not sure on what side it breaks, so i'll report it to Factory Tech mod author aswell.
https://gitlab.com/dalapo/FactoryTech/-/issues/119

commented

It looks like the null blockState is being passed to the getBlockHardness() method.
Not my fault, I guess.

commented

wierd, because it works fine with all other ores, except saltpeter.
How is it different?

commented

In the saltpeter ore class I override this method

@Override
public float getBlockHardness(IBlockState state, World world, BlockPos pos) {
return state.getValue(TYPE) == SaltType.SALT ? 100 : 5;
}