Redstone Logic for Buses, and Part Image Button goodness

This commit is contained in:
AlgorithmX2
2014-01-01 23:51:41 -06:00
parent 0acbefbfaa
commit db4cf7aa5d
22 changed files with 367 additions and 73 deletions
@@ -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
+2 -4
View File
@@ -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 );
}