if(entityPlayer.isSneaking()) {
return false;
}
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof ITravelAccessable) {
ITravelAccessable ta = (ITravelAccessable) te;
if(ta.canUiBeAccessed(entityPlayer)) {
if(!world.isRemote) {
entityPlayer.openGui(EnderIO.instance, GuiHandler.GUI_ID_TRAVEL_ACCESSABLE, world, x, y, z);
}
} else {
if(world.isRemote) {
entityPlayer.addChatComponentMessage(new ChatComponentText(Lang.localize("gui.travelAccessable.privateBlock1") + " " + ta.getPlacedBy() + " "
+ Lang.localize("gui.travelAccessable.privateBlock2")));
}
}
return true;
}