[1.12] builder gadgets vs Futurepack crash
darkrahmir opened this issue ยท 5 comments
So I use builder gadgets to do a good amount of my building. and when I used the building tool on a black metal slab it crashed my game and corrupted my world.
@Override
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer pl)
{
return new ItemStack(this, 1, damageDropped(world.getBlockState(pos)));
}
world.getBlockState(pos)
retunes AIR and not a slab. You should open an Issue at building gadgets and link it here.
Here is a link to the issue i opened on the Building gadgets github
i also linked it back to here as well.
I think that was at some point a work around for a bug. In 1.13/1.14 this is fixed, but I dont have the time to also fix this in 1.12 sadly.
@mcenderdragon the Problem here seems to be that you are querying world.getBlockState(pos)
, but of course this won't be present - we cannot fake a complete world.
Please just use the blockstate we pass into this Method. I know that we should be catching exceptions from this call, but discarding those would just hide the Problem.