2014-07-08 05:48:21 +02:00
|
|
|
package appeng.parts.reporting;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.util.Vec3;
|
|
|
|
import appeng.client.texture.CableBusTextures;
|
|
|
|
import appeng.core.sync.GuiBridge;
|
|
|
|
import appeng.util.Platform;
|
|
|
|
|
|
|
|
public class PartInterfaceTerminal extends PartMonitor
|
|
|
|
{
|
|
|
|
|
|
|
|
public PartInterfaceTerminal(ItemStack is) {
|
|
|
|
super( PartInterfaceTerminal.class, is, true );
|
|
|
|
frontBright = CableBusTextures.PartInterfaceTerm_Bright;
|
|
|
|
frontColored = CableBusTextures.PartInterfaceTerm_Colored;
|
|
|
|
frontDark = CableBusTextures.PartInterfaceTerm_Dark;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onPartActivate(EntityPlayer player, Vec3 pos)
|
|
|
|
{
|
2014-07-19 23:01:24 +02:00
|
|
|
if ( !super.onPartActivate( player, pos ) )
|
2014-07-08 05:48:21 +02:00
|
|
|
{
|
2014-07-19 23:01:24 +02:00
|
|
|
if ( !player.isSneaking() )
|
|
|
|
{
|
|
|
|
if ( Platform.isClient() )
|
|
|
|
return true;
|
2014-07-08 05:48:21 +02:00
|
|
|
|
2014-07-19 23:01:24 +02:00
|
|
|
Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_INTERFACE_TERMINAL );
|
2014-07-08 05:48:21 +02:00
|
|
|
|
2014-07-19 23:01:24 +02:00
|
|
|
return true;
|
|
|
|
}
|
2014-07-08 05:48:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|