Skip to content

Commit

Permalink
check that block side is not top
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantumlyy committed Jan 27, 2024
1 parent fb43f46 commit a64bd5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/magicbees/block/BlockApimancersDrainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public TileEntity createNewTileEntity(World world, int metadata) {
}

@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7,
float par8, float par9) {
if (world.isRemote) {
return false;
} else {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileEntityApimancersDrainerCommon) {
if (tile instanceof TileEntityApimancersDrainerCommon && side != 0) {
ItemStack tItemStack = player.getHeldItem();
if (tItemStack != null) {
Item tItem = tItemStack.getItem();
Expand All @@ -71,7 +71,9 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p
}
world.markBlockForUpdate(x, y, z);
return true;
} else return false;
} else {
return false;
}
}
}

Expand Down

0 comments on commit a64bd5f

Please sign in to comment.