Priority GUI improvements (#3592)
This commit is contained in:
@@ -39,6 +39,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.networking.IGridNode;
|
||||
@@ -56,6 +57,7 @@ import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.DualityInterface;
|
||||
import appeng.helpers.IInterfaceHost;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
@@ -358,4 +360,16 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
}
|
||||
return super.getCapability( capability, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStackRepresentation()
|
||||
{
|
||||
return AEApi.instance().definitions().blocks().iface().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiBridge getGuiBridge()
|
||||
{
|
||||
return GuiBridge.GUI_INTERFACE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.capabilities.Capabilities;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.me.GridAccessException;
|
||||
@@ -1074,4 +1075,24 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStackRepresentation()
|
||||
{
|
||||
return AEApi.instance().definitions().blocks().chest().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiBridge getGuiBridge()
|
||||
{
|
||||
if( this.itemCell != null )
|
||||
{
|
||||
return GuiBridge.GUI_ME;
|
||||
}
|
||||
else if( this.fluidCell != null )
|
||||
{
|
||||
return GuiBridge.GUI_FLUID_TERMINAL;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.MachineSource;
|
||||
@@ -404,4 +405,16 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStackRepresentation()
|
||||
{
|
||||
return AEApi.instance().definitions().blocks().drive().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiBridge getGuiBridge()
|
||||
{
|
||||
return GuiBridge.GUI_DRIVE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user