mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 21:09:45 +00:00
Player-relative block hardness for security-configured machines
This commit is contained in:
1 parent
42cb905d3c
commit
c2aa94d633
5 files changed
+11
-35
No files matched your search
@@ -84,13 +84,13 @@ public class BlockBounding extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World world, int x, int y, int z)
|
||||
public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
try {
|
||||
TileEntityBoundingBlock tileEntity = (TileEntityBoundingBlock)world.getTileEntity(x, y, z);
|
||||
return world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).getBlockHardness(world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ);
|
||||
return world.getBlock(tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ).getPlayerRelativeBlockHardness(player, world, tileEntity.mainX, tileEntity.mainY, tileEntity.mainZ);
|
||||
} catch(Exception e) {
|
||||
return blockHardness;
|
||||
return super.getPlayerRelativeBlockHardness(player, world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user