fixed universal block remover message getting sent twice
@@ -31,6 +31,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
@@ -131,6 +132,8 @@ public class ForgeEventHandler {
@SubscribeEvent
public void onRightClickBlock(RightClickBlock event){
+ if(event.getHand() == EnumHand.MAIN_HAND)
+ {
if(!event.getEntityPlayer().worldObj.isRemote){
World world = event.getEntityPlayer().worldObj;
TileEntity tileEntity = event.getEntityPlayer().worldObj.getTileEntity(event.getPos());
@@ -194,6 +197,7 @@ public class ForgeEventHandler {
}
}
}
+ }
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event) {
