mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
#2609 Travel anchor GUI opening on client, also fix creative tab listing
This commit is contained in:
1 parent
50877189a2
commit
12e8d6c191
5 files changed
+14
-9
No files matched your search
@@ -3,7 +3,6 @@ package crazypants.enderio;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -17,10 +16,12 @@ public abstract class BlockEio extends BlockEnder {
|
||||
|
||||
protected BlockEio(String name, Class<? extends TileEntityEio> teClass) {
|
||||
super(name, teClass);
|
||||
setCreativeTab(EnderIOTab.tabEnderIO);
|
||||
}
|
||||
|
||||
protected BlockEio(String name, Class<? extends TileEntityEio> teClass, Material mat) {
|
||||
super(name, teClass, mat);
|
||||
setCreativeTab(EnderIOTab.tabEnderIO);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,7 +65,6 @@ public abstract class AbstractMachineBlock<T extends AbstractMachineEntity> exte
|
||||
modObject = mo;
|
||||
setHardness(2.0F);
|
||||
setStepSound(soundTypeMetal);
|
||||
setCreativeTab(EnderIOTab.tabEnderIO);
|
||||
setHarvestLevel("pickaxe", 0);
|
||||
random = new Random();
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class BlockTravelAnchor extends BlockEio implements IGuiHandler, ITileEnt
|
||||
@Override
|
||||
public boolean openGui(World world, int x, int y, int z, EntityPlayer entityPlayer, int side) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if (te instanceof ITravelAccessable) {
|
||||
if (!world.isRemote && te instanceof ITravelAccessable) {
|
||||
ITravelAccessable ta = (ITravelAccessable) te;
|
||||
if (ta.canUiBeAccessed(entityPlayer)) {
|
||||
entityPlayer.openGui(EnderIO.instance, GuiHandler.GUI_ID_TRAVEL_ACCESSABLE, world, x, y, z);
|
||||
@@ -139,7 +139,7 @@ public class BlockTravelAnchor extends BlockEio implements IGuiHandler, ITileEnt
|
||||
}
|
||||
|
||||
public static void sendPrivateChatMessage(EntityPlayer player, UUID owner) {
|
||||
if(player.worldObj.isRemote && !player.isSneaking()) {
|
||||
if(!player.isSneaking()) {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnderIO.lang.localize("gui.travelAccessable.privateBlock1") + " "
|
||||
+ EnumChatFormatting.RED + UsernameCache.getLastKnownUsername(owner) + EnumChatFormatting.WHITE + " "
|
||||
+ EnderIO.lang.localize("gui.travelAccessable.privateBlock2")));
|
||||
|
||||
Reference in new issue
Block a user