final Minecraft mc = Minecraft.getMinecraft();
@SubscribeEvent
public void onPlayerInteractBlock(PlayerInteractEvent e) {
EntityClientPlayerMP player = FMLClientHandler.instance().getClient().thePlayer;
if(!player.capabilities.isCreativeMode) {
if(e.action == Action.RIGHT_CLICK_BLOCK) {
Block b = this.mc.theWorld.getBlock(e.x, e.y, e.z);
if(b.equals(Blocks.wooden_door)|| b.equals(Blocks.chest)||b.equals(Blocks.ender_chest)) {
e.setCanceled(true);
}
}
}
}
}