This commit is contained in:
eaglercraft 2024-02-19 02:02:25 -08:00
commit 401ebe2324
1261 changed files with 12766 additions and 138431 deletions

View file

@ -81,6 +81,14 @@ public class BlockAnvil extends BlockFalling {
.withProperty(FACING, enumfacing).withProperty(DAMAGE, Integer.valueOf(meta >> 2));
}
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
EnumFacing side, float hitX, float hitY, float hitZ) {
if (!worldIn.isRemote) {
playerIn.displayGui(new BlockAnvil.Anvil(worldIn, pos));
}
return true;
}
/**+
* Gets the metadata of the item this Block can drop. This
* method is called when the block gets destroyed. It returns
@ -139,11 +147,6 @@ public class BlockAnvil extends BlockFalling {
Integer.valueOf((meta & 15) >> 2));
}
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
EnumFacing side, float hitX, float hitY, float hitZ) {
return true;
}
/**+
* Convert the BlockState into the correct metadata value
*/