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 -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 );
}