Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Something fishy bout SaltPeter ore #82

Open
DevTimur opened this issue Aug 12, 2020 · 3 comments
Open

[BUG] Something fishy bout SaltPeter ore #82

DevTimur opened this issue Aug 12, 2020 · 3 comments

Comments

@DevTimur
Copy link

DevTimur commented Aug 12, 2020

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

@Liahim85
Copy link
Owner

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

@DevTimur
Copy link
Author

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

@Liahim85
Copy link
Owner

Liahim85 commented Aug 13, 2020

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants