Non static access of static members
This commit is contained in:
@@ -19,16 +19,17 @@
|
||||
package appeng.parts;
|
||||
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.implementations.IPowerChannelState;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
@@ -69,7 +70,7 @@ public abstract class PartBasicState extends AEBasePart implements IPowerChannel
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void renderLights( BlockPos pos, IPartRenderHelper rh, ModelGenerator renderer )
|
||||
{
|
||||
this.setColors( renderer, ( this.clientFlags & ( this.POWERED_FLAG | this.CHANNEL_FLAG ) ) == ( this.POWERED_FLAG | this.CHANNEL_FLAG ), ( this.clientFlags & this.POWERED_FLAG ) == this.POWERED_FLAG );
|
||||
this.setColors( renderer, ( this.clientFlags & ( POWERED_FLAG | CHANNEL_FLAG ) ) == ( POWERED_FLAG | CHANNEL_FLAG ), ( this.clientFlags & POWERED_FLAG ) == POWERED_FLAG );
|
||||
rh.renderFace( pos, CableBusTextures.PartMonitorSidesStatusLights.getIcon(), EnumFacing.EAST, renderer );
|
||||
rh.renderFace( pos, CableBusTextures.PartMonitorSidesStatusLights.getIcon(), EnumFacing.WEST, renderer );
|
||||
rh.renderFace( pos, CableBusTextures.PartMonitorSidesStatusLights.getIcon(), EnumFacing.UP, renderer );
|
||||
@@ -108,12 +109,12 @@ public abstract class PartBasicState extends AEBasePart implements IPowerChannel
|
||||
{
|
||||
if( this.proxy.getEnergy().isNetworkPowered() )
|
||||
{
|
||||
this.clientFlags |= this.POWERED_FLAG;
|
||||
this.clientFlags |= POWERED_FLAG;
|
||||
}
|
||||
|
||||
if( this.proxy.getNode().meetsChannelRequirements() )
|
||||
{
|
||||
this.clientFlags |= this.CHANNEL_FLAG;
|
||||
this.clientFlags |= CHANNEL_FLAG;
|
||||
}
|
||||
|
||||
this.clientFlags = this.populateFlags( this.clientFlags );
|
||||
@@ -152,12 +153,12 @@ public abstract class PartBasicState extends AEBasePart implements IPowerChannel
|
||||
@Override
|
||||
public boolean isPowered()
|
||||
{
|
||||
return ( this.clientFlags & this.POWERED_FLAG ) == this.POWERED_FLAG;
|
||||
return ( this.clientFlags & POWERED_FLAG ) == POWERED_FLAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive()
|
||||
{
|
||||
return ( this.clientFlags & this.CHANNEL_FLAG ) == this.CHANNEL_FLAG;
|
||||
return ( this.clientFlags & CHANNEL_FLAG ) == CHANNEL_FLAG;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.storage.MEInventoryHandler;
|
||||
import appeng.parts.PartBasicState;
|
||||
import appeng.tile.inventory.AppEngInternalAEInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.Platform;
|
||||
@@ -311,7 +312,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||
maxY = 16;
|
||||
}
|
||||
|
||||
boolean isActive = ( this.clientFlags & ( this.POWERED_FLAG | this.CHANNEL_FLAG ) ) == ( this.POWERED_FLAG | this.CHANNEL_FLAG );
|
||||
boolean isActive = ( this.clientFlags & ( PartBasicState.POWERED_FLAG | PartBasicState.CHANNEL_FLAG ) ) == ( PartBasicState.POWERED_FLAG | PartBasicState.CHANNEL_FLAG );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartPlaneSides.getIcon(), CableBusTextures.PartPlaneSides.getIcon(), CableBusTextures.PartTransitionPlaneBack.getIcon(), isActive ? CableBusTextures.BlockFormPlaneOn.getIcon() : renderer.getIcon( is ), CableBusTextures.PartPlaneSides.getIcon(), CableBusTextures.PartPlaneSides.getIcon() );
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return ( this.clientFlags & this.FLAG_ON ) == this.FLAG_ON;
|
||||
return ( this.clientFlags & FLAG_ON ) == FLAG_ON;
|
||||
}
|
||||
|
||||
if( !this.proxy.isActive() )
|
||||
@@ -188,7 +188,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
||||
@Override
|
||||
protected int populateFlags( int cf )
|
||||
{
|
||||
return cf | ( this.prevState ? this.FLAG_ON : 0 );
|
||||
return cf | ( this.prevState ? FLAG_ON : 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -72,14 +72,14 @@ public class PartToggleBus extends PartBasicState
|
||||
@Override
|
||||
public void setColors( ModelGenerator renderer, boolean hasChan, boolean hasPower )
|
||||
{
|
||||
this.hasRedstone = ( this.clientFlags & this.REDSTONE_FLAG ) == this.REDSTONE_FLAG;
|
||||
this.hasRedstone = ( this.clientFlags & REDSTONE_FLAG ) == REDSTONE_FLAG;
|
||||
super.setColors( renderer, hasChan && this.hasRedstone, hasPower && this.hasRedstone );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int populateFlags( int cf )
|
||||
{
|
||||
return cf | ( this.getIntention() ? this.REDSTONE_FLAG : 0 );
|
||||
return cf | ( this.getIntention() ? REDSTONE_FLAG : 0 );
|
||||
}
|
||||
|
||||
protected boolean getIntention()
|
||||
|
||||
@@ -136,27 +136,27 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
{
|
||||
if( this.cluster.min.equals( this.getLocation() ) )
|
||||
{
|
||||
this.displayBits = this.DISPLAY_END_MIN;
|
||||
this.displayBits = DISPLAY_END_MIN;
|
||||
}
|
||||
else if( this.cluster.max.equals( this.getLocation() ) )
|
||||
{
|
||||
this.displayBits = this.DISPLAY_END_MAX;
|
||||
this.displayBits = DISPLAY_END_MAX;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.displayBits = this.DISPLAY_MIDDLE;
|
||||
this.displayBits = DISPLAY_MIDDLE;
|
||||
}
|
||||
|
||||
switch( this.cluster.currentAxis )
|
||||
{
|
||||
case X:
|
||||
this.displayBits |= this.DISPLAY_X;
|
||||
this.displayBits |= DISPLAY_X;
|
||||
break;
|
||||
case Y:
|
||||
this.displayBits |= this.DISPLAY_Y;
|
||||
this.displayBits |= DISPLAY_Y;
|
||||
break;
|
||||
case Z:
|
||||
this.displayBits |= this.DISPLAY_Z;
|
||||
this.displayBits |= DISPLAY_Z;
|
||||
break;
|
||||
default:
|
||||
this.displayBits = 0;
|
||||
@@ -167,12 +167,12 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
{
|
||||
if( this.gridProxy.getEnergy().isNetworkPowered() )
|
||||
{
|
||||
this.displayBits |= this.DISPLAY_POWERED_ENABLED;
|
||||
this.displayBits |= DISPLAY_POWERED_ENABLED;
|
||||
}
|
||||
|
||||
if( this.cluster.isValid && this.gridProxy.isActive() )
|
||||
{
|
||||
this.displayBits |= this.DISPLAY_ENABLED;
|
||||
this.displayBits |= DISPLAY_ENABLED;
|
||||
}
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
@@ -208,7 +208,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
|
||||
public int getLightValue()
|
||||
{
|
||||
if( ( this.displayBits & this.DISPLAY_POWERED_ENABLED ) == this.DISPLAY_POWERED_ENABLED )
|
||||
if( ( this.displayBits & DISPLAY_POWERED_ENABLED ) == DISPLAY_POWERED_ENABLED )
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user