@@ -12,7 +12,7 @@
|
||||
public class BlockRedstoneOre extends Block {
|
||||
|
||||
public static final BlockStateBoolean a = BlockRedstoneTorch.LIT;
|
||||
@@ -18,14 +23,30 @@
|
||||
@@ -13,14 +18,30 @@
|
||||
|
||||
@Override
|
||||
public void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
||||
@@ -46,14 +46,17 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,14 +55,19 @@
|
||||
@@ -28,7 +49,7 @@
|
||||
if (world.isClientSide) {
|
||||
playEffect(world, blockposition);
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
} else {
|
||||
- interact(iblockdata, world, blockposition);
|
||||
+ interact(iblockdata, world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
||||
return EnumInteractionResult.PASS;
|
||||
}
|
||||
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
@@ -36,9 +57,14 @@
|
||||
return itemstack.getItem() instanceof ItemBlock && (new BlockActionContext(entityhuman, enumhand, itemstack, movingobjectpositionblock)).b() ? EnumInteractionResult.PASS : EnumInteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
- private static void interact(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
@@ -68,7 +71,7 @@
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, true), 3);
|
||||
}
|
||||
|
||||
@@ -50,6 +76,11 @@
|
||||
@@ -52,6 +78,11 @@
|
||||
@Override
|
||||
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if ((Boolean) iblockdata.get(BlockRedstoneOre.a)) {
|
||||
@@ -80,7 +83,7 @@
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, false), 3);
|
||||
}
|
||||
|
||||
@@ -58,12 +89,25 @@
|
||||
@@ -60,12 +91,25 @@
|
||||
@Override
|
||||
public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
||||
super.dropNaturally(iblockdata, world, blockposition, itemstack);
|
||||
|
||||
Reference in New Issue
Block a user