Redstone Logic for Buses, and Part Image Button goodness
This commit is contained in:
@@ -2,7 +2,6 @@ package appeng.core.features.registries.entries;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.Icon;
|
||||
import appeng.api.implementations.IChestOrDrive;
|
||||
import appeng.api.storage.ICellHandler;
|
||||
@@ -10,8 +9,11 @@ import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.client.texture.ExtraTextures;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.items.storage.ItemCreativeStorageCell;
|
||||
import appeng.me.storage.CreativeCellInventory;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class CreativeCellHandler implements ICellHandler
|
||||
{
|
||||
@@ -39,7 +41,7 @@ public class CreativeCellHandler implements ICellHandler
|
||||
@Override
|
||||
public void openChestGui(EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, IMEInventoryHandler inv, ItemStack is, StorageChannel chan)
|
||||
{
|
||||
player.sendChatToPlayer( ChatMessageComponent.createFromText( "Not ready yet..." ) );
|
||||
Platform.openGUI( player, (AEBaseTile) chest, chest.getUp(), GuiBridge.GUI_ME );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigureableObject;
|
||||
@@ -31,10 +30,9 @@ public class PacketConfigButton extends AppEngPacket
|
||||
{
|
||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
|
||||
TileEntity bt = aebc.getTileEntity();
|
||||
if ( bt instanceof IConfigureableObject )
|
||||
if ( aebc.getTarget() instanceof IConfigureableObject )
|
||||
{
|
||||
IConfigManager cm = ((IConfigureableObject) bt).getConfigManager();
|
||||
IConfigManager cm = ((IConfigureableObject) aebc.getTarget()).getConfigManager();
|
||||
Enum newState = Platform.nextEnum( cm.getSetting( option ) );
|
||||
cm.putSetting( option, newState );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user