Renamed constants
This commit is contained in:
parent
e0175bac98
commit
52c512635d
|
@ -38,7 +38,7 @@ public class AEApi
|
|||
/**
|
||||
* API Entry Point.
|
||||
*
|
||||
* @return the {@link IAppEngApi} or null if the instance could not be retrieved
|
||||
* @return the {@link IAppEngApi} or null if the INSTANCE could not be retrieved
|
||||
*/
|
||||
public static IAppEngApi instance()
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ public class AEApi
|
|||
try
|
||||
{
|
||||
Class c = Class.forName( "appeng.core.Api" );
|
||||
api = (IAppEngApi) c.getField( "instance" ).get( c );
|
||||
api = (IAppEngApi) c.getField( "INSTANCE" ).get( c );
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ public interface IGridCacheRegistry
|
|||
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
|
||||
|
||||
/**
|
||||
* requests a new instance of a grid cache for use, used internally
|
||||
* requests a new INSTANCE of a grid cache for use, used internally
|
||||
*
|
||||
* @param grid grid
|
||||
*
|
||||
|
|
|
@ -46,7 +46,7 @@ public interface IGridHost
|
|||
* feel free to ignore this, most blocks will use the same node
|
||||
* for every side.
|
||||
* @return a new IGridNode, create these with
|
||||
* AEApi.instance().createGridNode( MyIGridBlock )
|
||||
* AEApi.INSTANCE().createGridNode( MyIGridBlock )
|
||||
*/
|
||||
public IGridNode getGridNode(ForgeDirection dir);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import appeng.api.storage.data.IAEItemStack;
|
|||
/**
|
||||
* do not implement provided by {@link ICraftingPatternItem}
|
||||
*
|
||||
* caching this instance will increase performance of validation and checks.
|
||||
* caching this INSTANCE will increase performance of validation and checks.
|
||||
*/
|
||||
public interface ICraftingPatternDetails
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public interface ICraftingPatternDetails
|
|||
boolean canSubstitute();
|
||||
|
||||
/**
|
||||
* Allow using this instance of the pattern details to preform the crafting action with performance enhancements.
|
||||
* Allow using this INSTANCE of the pattern details to preform the crafting action with performance enhancements.
|
||||
*
|
||||
* @param craftingInv inventory
|
||||
* @param world crafting world
|
||||
|
|
|
@ -34,7 +34,7 @@ public class MENetworkSpatialEvent extends MENetworkEvent
|
|||
public final double spatialEnergyUsage;
|
||||
|
||||
/**
|
||||
* @param SpatialIO ( instance of the SpatialIO block )
|
||||
* @param SpatialIO ( INSTANCE of the SpatialIO block )
|
||||
* @param EnergyUsage ( the amount of energy that the SpatialIO uses)
|
||||
*/
|
||||
public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage)
|
||||
|
|
|
@ -83,7 +83,7 @@ public interface IPartHost
|
|||
*
|
||||
* @param side side of part
|
||||
* @param suppressUpdate
|
||||
* - used if you need to replace a part's instance, without really removing it first.
|
||||
* - used if you need to replace a part's INSTANCE, without really removing it first.
|
||||
*/
|
||||
void removePart(ForgeDirection side, boolean suppressUpdate);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
|
|||
/**
|
||||
* This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack
|
||||
*
|
||||
* you must register your bus with the Bus renderer, using AEApi.instance().partHelper().setItemBusRenderer( this );
|
||||
* you must register your bus with the Bus renderer, using AEApi.INSTANCE().partHelper().setItemBusRenderer( this );
|
||||
*
|
||||
* then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code.
|
||||
*
|
||||
|
@ -45,7 +45,7 @@ import net.minecraft.item.ItemStack;
|
|||
* {@literal @}Override
|
||||
* public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
* {
|
||||
* return AEApi.instance().partHelper().placeBus( is, x, y, z, side, player, world );
|
||||
* return AEApi.INSTANCE().partHelper().placeBus( is, x, y, z, side, player, world );
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
|
@ -55,7 +55,7 @@ public interface IPartItem
|
|||
{
|
||||
|
||||
/**
|
||||
* create a new part instance, from the item stack.
|
||||
* create a new part INSTANCE, from the item stack.
|
||||
*
|
||||
* @param is item
|
||||
* @return part from item
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface IStorageHelper
|
|||
* @param is
|
||||
* An ItemStack
|
||||
*
|
||||
* @return a new instance of {@link IAEItemStack} from a MC {@link ItemStack}
|
||||
* @return a new INSTANCE of {@link IAEItemStack} from a MC {@link ItemStack}
|
||||
*/
|
||||
IAEItemStack createItemStack(ItemStack is);
|
||||
|
||||
|
@ -60,17 +60,17 @@ public interface IStorageHelper
|
|||
* @param is
|
||||
* A FluidStack
|
||||
*
|
||||
* @return a new instance of {@link IAEFluidStack} from a Forge {@link FluidStack}
|
||||
* @return a new INSTANCE of {@link IAEFluidStack} from a Forge {@link FluidStack}
|
||||
*/
|
||||
IAEFluidStack createFluidStack(FluidStack is);
|
||||
|
||||
/**
|
||||
* @return a new instance of {@link IItemList} for items
|
||||
* @return a new INSTANCE of {@link IItemList} for items
|
||||
*/
|
||||
IItemList<IAEItemStack> createItemList();
|
||||
|
||||
/**
|
||||
* @return a new instance of {@link IItemList} for fluids
|
||||
* @return a new INSTANCE of {@link IItemList} for fluids
|
||||
*/
|
||||
IItemList<IAEFluidStack> createFluidList();
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
{
|
||||
super( mat );
|
||||
|
||||
if ( mat == AEGlassMaterial.instance || mat == Material.glass )
|
||||
if ( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
|
||||
this.setStepSound( Block.soundTypeGlass );
|
||||
else if ( mat == Material.rock )
|
||||
this.setStepSound( Block.soundTypeStone );
|
||||
|
@ -190,7 +190,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
@SideOnly( Side.CLIENT )
|
||||
public int getRenderType()
|
||||
{
|
||||
return WorldRender.instance.getRenderId();
|
||||
return WorldRender.INSTANCE.getRenderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,7 +54,7 @@ public class AEBaseItemBlock extends ItemBlock
|
|||
this.hasSubtypes = this.blockType.hasSubtypes;
|
||||
|
||||
if ( Platform.isClient() )
|
||||
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.instance );
|
||||
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.INSTANCE );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -84,7 +84,7 @@ public class BlockPaint extends AEBaseBlock
|
|||
public void fillWithRain(World w, int x, int y, int z)
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -78,7 +78,7 @@ import appeng.util.Platform;
|
|||
public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
{
|
||||
|
||||
static private final ICableBusContainer nullCB = new NullCableBusContainer();
|
||||
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||
static public Class<? extends TileEntity> noTesrTile;
|
||||
static public Class<? extends TileEntity> tesrTile;
|
||||
|
||||
|
@ -97,7 +97,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
}
|
||||
|
||||
public BlockCableBus() {
|
||||
super( BlockCableBus.class, AEGlassMaterial.instance );
|
||||
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
this.setLightOpacity( 0 );
|
||||
this.isFullSize = this.isOpaque = false;
|
||||
|
@ -227,7 +227,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
@Override
|
||||
public boolean canRenderInPass(int pass)
|
||||
{
|
||||
BusRenderHelper.instance.setPass( pass );
|
||||
BusRenderHelper.INSTANCE.setPass( pass );
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||
return true;
|
||||
|
@ -424,10 +424,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
|
||||
public void setupTile()
|
||||
{
|
||||
this.setTileEntity( noTesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBus.class.getName() ) );
|
||||
this.setTileEntity( noTesrTile = Api.INSTANCE.partHelper.getCombinedInstance( TileCableBus.class.getName() ) );
|
||||
if ( Platform.isClient() )
|
||||
{
|
||||
tesrTile = Api.instance.partHelper.getCombinedInstance( TileCableBusTESR.class.getName() );
|
||||
tesrTile = Api.INSTANCE.partHelper.getCombinedInstance( TileCableBusTESR.class.getName() );
|
||||
GameRegistry.registerTileEntity( tesrTile, "ClientOnly_TESR_CableBus" );
|
||||
CommonHelper.proxy.bindTileEntitySpecialRenderer( tesrTile, this );
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
else if ( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
|
||||
out = ((IFMP) AppEng.instance.getIntegration( IntegrationType.FMP )).getCableContainer( te );
|
||||
|
||||
return out == null ? nullCB : out;
|
||||
return out == null ? NULL_CABLE_BUS : out;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,7 @@ public class BlockCreativeEnergyCell extends AEBaseBlock
|
|||
{
|
||||
|
||||
public BlockCreativeEnergyCell() {
|
||||
super( BlockCreativeEnergyCell.class, AEGlassMaterial.instance );
|
||||
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
|
||||
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
||||
this.setTileEntity( TileCreativeEnergyCell.class );
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class BlockEnergyCell extends AEBaseBlock
|
|||
}
|
||||
|
||||
public BlockEnergyCell(Class c) {
|
||||
super( c, AEGlassMaterial.instance );
|
||||
super( c, AEGlassMaterial.INSTANCE );
|
||||
}
|
||||
|
||||
public BlockEnergyCell() {
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||
{
|
||||
|
||||
public BlockWireless() {
|
||||
super( BlockWireless.class, AEGlassMaterial.instance );
|
||||
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
||||
this.setTileEntity( TileWireless.class );
|
||||
this.setLightOpacity( 0 );
|
||||
|
|
|
@ -50,7 +50,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||
{
|
||||
|
||||
public BlockQuantumLinkChamber() {
|
||||
super( BlockQuantumLinkChamber.class, AEGlassMaterial.instance );
|
||||
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
|
||||
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
||||
this.setTileEntity( TileQuantumBridge.class );
|
||||
float shave = 2.0f / 16.0f;
|
||||
|
|
|
@ -50,7 +50,7 @@ public class BlockQuartzGlass extends AEBaseBlock
|
|||
public boolean shouldSideBeRendered(IBlockAccess w, int x, int y, int z, int side)
|
||||
{
|
||||
Material mat = w.getBlock( x, y, z ).getMaterial();
|
||||
if ( mat == Material.glass || mat == AEGlassMaterial.instance )
|
||||
if ( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
||||
{
|
||||
if ( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
||||
return false;
|
||||
|
|
|
@ -35,7 +35,7 @@ public class BlockSpatialPylon extends AEBaseBlock
|
|||
{
|
||||
|
||||
public BlockSpatialPylon() {
|
||||
super( BlockSpatialPylon.class, AEGlassMaterial.instance );
|
||||
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
|
||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
this.setTileEntity( TileSpatialPylon.class );
|
||||
}
|
||||
|
|
|
@ -89,8 +89,8 @@ import appeng.util.Platform;
|
|||
public class ClientHelper extends ServerHelper
|
||||
{
|
||||
|
||||
private static final RenderItem itemRenderer = new RenderItem();
|
||||
private static final RenderBlocks blockRenderer = new RenderBlocks();
|
||||
private static final RenderItem ITEM_RENDERER = new RenderItem();
|
||||
private static final RenderBlocks BLOCK_RENDERER = new RenderBlocks();
|
||||
|
||||
@Override
|
||||
public CableRenderMode getRenderMode()
|
||||
|
@ -128,7 +128,7 @@ public class ClientHelper extends ServerHelper
|
|||
@SubscribeEvent
|
||||
public void postPlayerRender(RenderLivingEvent.Pre p)
|
||||
{
|
||||
PlayerColor player = TickHandler.instance.getPlayerColors().get( p.entity.getEntityId() );
|
||||
PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
|
||||
if ( player != null )
|
||||
{
|
||||
AEColor col = player.myColor;
|
||||
|
@ -210,9 +210,9 @@ public class ClientHelper extends ServerHelper
|
|||
|
||||
RenderItem.renderInFrame = false;
|
||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
|
||||
if ( !ForgeHooksClient.renderInventoryItem( BLOCK_RENDERER, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
|
||||
{
|
||||
itemRenderer.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
||||
ITEM_RENDERER.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ public class ClientHelper extends ServerHelper
|
|||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
RenderingRegistry.registerBlockHandler( WorldRender.instance );
|
||||
RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
|
||||
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
||||
RenderManager.instance.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem() );
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
this.craftingStatusBtn.hideEdge = 13;
|
||||
}
|
||||
|
||||
// Enum setting = AEConfig.instance.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
|
||||
// Enum setting = AEConfig.INSTANCE.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
|
||||
Enum setting = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
this.searchField.setFocused( SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting );
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import net.minecraft.client.gui.GuiTextField;
|
|||
*/
|
||||
public class MEGuiTextField extends GuiTextField
|
||||
{
|
||||
private static final int padding = 2;
|
||||
private static final int PADDING = 2;
|
||||
|
||||
private final int _xPos;
|
||||
private final int _yPos;
|
||||
|
@ -51,7 +51,7 @@ public class MEGuiTextField extends GuiTextField
|
|||
*/
|
||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||
{
|
||||
super( fontRenderer, xPos + padding, yPos + padding, width - 2 * padding - fontRenderer.getCharWidth( '_' ), height - 2 * padding );
|
||||
super( fontRenderer, xPos + PADDING, yPos + PADDING, width - 2 * PADDING - fontRenderer.getCharWidth( '_' ), height - 2 * PADDING );
|
||||
|
||||
this._xPos = xPos;
|
||||
this._yPos = yPos;
|
||||
|
|
|
@ -149,7 +149,7 @@ public class ItemRepo
|
|||
|
||||
this.innerSearch = this.searchString;
|
||||
boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
// boolean terminalSearchMods = Configuration.instance.settings.getSetting( Settings.SEARCH_MODS ) != YesNo.NO;
|
||||
// boolean terminalSearchMods = Configuration.INSTANCE.settings.getSetting( Settings.SEARCH_MODS ) != YesNo.NO;
|
||||
|
||||
boolean searchMod = false;
|
||||
if ( this.innerSearch.startsWith( "@" ) )
|
||||
|
@ -229,13 +229,13 @@ public class ItemRepo
|
|||
ItemSorters.init();
|
||||
|
||||
if ( SortBy == SortOrder.MOD )
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortByMod );
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_MOD );
|
||||
else if ( SortBy == SortOrder.AMOUNT )
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortBySize );
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_SIZE );
|
||||
else if ( SortBy == SortOrder.INVTWEAKS )
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortByInvTweaks );
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_INV_TWEAKS );
|
||||
else
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortByName );
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_NAME );
|
||||
|
||||
for (IAEItemStack is : this.view)
|
||||
this.dsp.add( is.getItemStack() );
|
||||
|
|
|
@ -61,7 +61,7 @@ public class BaseBlockRender
|
|||
|
||||
final double MAX_DISTANCE;
|
||||
final public boolean hasTESR;
|
||||
final static private byte[][][] OrientationMap = new byte[6][6][6];
|
||||
private static final byte[][][] ORIENTATION_MAP = new byte[6][6][6];
|
||||
|
||||
protected int adjustBrightness(int v, double d)
|
||||
{
|
||||
|
@ -91,184 +91,184 @@ public class BaseBlockRender
|
|||
int b = forward.ordinal();
|
||||
int c = up.ordinal();
|
||||
|
||||
return OrientationMap[a][b][c];
|
||||
return ORIENTATION_MAP[a][b][c];
|
||||
}
|
||||
|
||||
static public void setOriMap()
|
||||
{
|
||||
// pointed up...
|
||||
OrientationMap[0][3][1] = 0;
|
||||
OrientationMap[1][3][1] = 0;
|
||||
OrientationMap[2][3][1] = 0;
|
||||
OrientationMap[3][3][1] = 0;
|
||||
OrientationMap[4][3][1] = 0;
|
||||
OrientationMap[5][3][1] = 0;
|
||||
ORIENTATION_MAP[0][3][1] = 0;
|
||||
ORIENTATION_MAP[1][3][1] = 0;
|
||||
ORIENTATION_MAP[2][3][1] = 0;
|
||||
ORIENTATION_MAP[3][3][1] = 0;
|
||||
ORIENTATION_MAP[4][3][1] = 0;
|
||||
ORIENTATION_MAP[5][3][1] = 0;
|
||||
|
||||
OrientationMap[0][5][1] = 1;
|
||||
OrientationMap[1][5][1] = 2;
|
||||
OrientationMap[2][5][1] = 0;
|
||||
OrientationMap[3][5][1] = 0;
|
||||
OrientationMap[4][5][1] = 0;
|
||||
OrientationMap[5][5][1] = 0;
|
||||
ORIENTATION_MAP[0][5][1] = 1;
|
||||
ORIENTATION_MAP[1][5][1] = 2;
|
||||
ORIENTATION_MAP[2][5][1] = 0;
|
||||
ORIENTATION_MAP[3][5][1] = 0;
|
||||
ORIENTATION_MAP[4][5][1] = 0;
|
||||
ORIENTATION_MAP[5][5][1] = 0;
|
||||
|
||||
OrientationMap[0][2][1] = 3;
|
||||
OrientationMap[1][2][1] = 3;
|
||||
OrientationMap[2][2][1] = 0;
|
||||
OrientationMap[3][2][1] = 0;
|
||||
OrientationMap[4][2][1] = 0;
|
||||
OrientationMap[5][2][1] = 0;
|
||||
ORIENTATION_MAP[0][2][1] = 3;
|
||||
ORIENTATION_MAP[1][2][1] = 3;
|
||||
ORIENTATION_MAP[2][2][1] = 0;
|
||||
ORIENTATION_MAP[3][2][1] = 0;
|
||||
ORIENTATION_MAP[4][2][1] = 0;
|
||||
ORIENTATION_MAP[5][2][1] = 0;
|
||||
|
||||
OrientationMap[0][4][1] = 2;
|
||||
OrientationMap[1][4][1] = 1;
|
||||
OrientationMap[2][4][1] = 0;
|
||||
OrientationMap[3][4][1] = 0;
|
||||
OrientationMap[4][4][1] = 0;
|
||||
OrientationMap[5][4][1] = 0;
|
||||
ORIENTATION_MAP[0][4][1] = 2;
|
||||
ORIENTATION_MAP[1][4][1] = 1;
|
||||
ORIENTATION_MAP[2][4][1] = 0;
|
||||
ORIENTATION_MAP[3][4][1] = 0;
|
||||
ORIENTATION_MAP[4][4][1] = 0;
|
||||
ORIENTATION_MAP[5][4][1] = 0;
|
||||
|
||||
// upside down
|
||||
OrientationMap[0][3][0] = FLIP_H_BIT;
|
||||
OrientationMap[1][3][0] = FLIP_H_BIT;
|
||||
OrientationMap[2][3][0] = 3;
|
||||
OrientationMap[3][3][0] = 3;
|
||||
OrientationMap[4][3][0] = 3;
|
||||
OrientationMap[5][3][0] = 3;
|
||||
ORIENTATION_MAP[0][3][0] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][3][0] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][3][0] = 3;
|
||||
ORIENTATION_MAP[3][3][0] = 3;
|
||||
ORIENTATION_MAP[4][3][0] = 3;
|
||||
ORIENTATION_MAP[5][3][0] = 3;
|
||||
|
||||
OrientationMap[0][4][0] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[1][4][0] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[2][4][0] = 3;
|
||||
OrientationMap[3][4][0] = 3;
|
||||
OrientationMap[4][4][0] = 3;
|
||||
OrientationMap[5][4][0] = 3;
|
||||
ORIENTATION_MAP[0][4][0] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][4][0] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][4][0] = 3;
|
||||
ORIENTATION_MAP[3][4][0] = 3;
|
||||
ORIENTATION_MAP[4][4][0] = 3;
|
||||
ORIENTATION_MAP[5][4][0] = 3;
|
||||
|
||||
OrientationMap[0][5][0] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[1][5][0] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[2][5][0] = 3;
|
||||
OrientationMap[3][5][0] = 3;
|
||||
OrientationMap[4][5][0] = 3;
|
||||
OrientationMap[5][5][0] = 3;
|
||||
ORIENTATION_MAP[0][5][0] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][5][0] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][5][0] = 3;
|
||||
ORIENTATION_MAP[3][5][0] = 3;
|
||||
ORIENTATION_MAP[4][5][0] = 3;
|
||||
ORIENTATION_MAP[5][5][0] = 3;
|
||||
|
||||
OrientationMap[0][2][0] = 3 | FLIP_H_BIT;
|
||||
OrientationMap[1][2][0] = 3 | FLIP_H_BIT;
|
||||
OrientationMap[2][2][0] = 3;
|
||||
OrientationMap[3][2][0] = 3;
|
||||
OrientationMap[4][2][0] = 3;
|
||||
OrientationMap[5][2][0] = 3;
|
||||
ORIENTATION_MAP[0][2][0] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][2][0] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][2][0] = 3;
|
||||
ORIENTATION_MAP[3][2][0] = 3;
|
||||
ORIENTATION_MAP[4][2][0] = 3;
|
||||
ORIENTATION_MAP[5][2][0] = 3;
|
||||
|
||||
// side 1
|
||||
OrientationMap[0][3][5] = 1 | FLIP_V_BIT;
|
||||
OrientationMap[1][3][5] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[2][3][5] = 1;
|
||||
OrientationMap[3][3][5] = 1;
|
||||
OrientationMap[4][3][5] = 1;
|
||||
OrientationMap[5][3][5] = 1 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[0][3][5] = 1 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[1][3][5] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][3][5] = 1;
|
||||
ORIENTATION_MAP[3][3][5] = 1;
|
||||
ORIENTATION_MAP[4][3][5] = 1;
|
||||
ORIENTATION_MAP[5][3][5] = 1 | FLIP_V_BIT;
|
||||
|
||||
OrientationMap[0][1][5] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[1][1][5] = 1;
|
||||
OrientationMap[2][1][5] = 3 | FLIP_V_BIT;
|
||||
OrientationMap[3][1][5] = 3;
|
||||
OrientationMap[4][1][5] = 1 | FLIP_V_BIT;
|
||||
OrientationMap[5][1][5] = 1;
|
||||
ORIENTATION_MAP[0][1][5] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][1][5] = 1;
|
||||
ORIENTATION_MAP[2][1][5] = 3 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[3][1][5] = 3;
|
||||
ORIENTATION_MAP[4][1][5] = 1 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[5][1][5] = 1;
|
||||
|
||||
OrientationMap[0][2][5] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[1][2][5] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[2][2][5] = 1;
|
||||
OrientationMap[3][2][5] = 2 | FLIP_V_BIT;
|
||||
OrientationMap[4][2][5] = 1 | FLIP_V_BIT;
|
||||
OrientationMap[5][2][5] = 1;
|
||||
ORIENTATION_MAP[0][2][5] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][2][5] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][2][5] = 1;
|
||||
ORIENTATION_MAP[3][2][5] = 2 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[4][2][5] = 1 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[5][2][5] = 1;
|
||||
|
||||
OrientationMap[0][0][5] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[1][0][5] = 1;
|
||||
OrientationMap[2][0][5] = 0;
|
||||
OrientationMap[3][0][5] = FLIP_V_BIT;
|
||||
OrientationMap[4][0][5] = 1;
|
||||
OrientationMap[5][0][5] = 1 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[0][0][5] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][0][5] = 1;
|
||||
ORIENTATION_MAP[2][0][5] = 0;
|
||||
ORIENTATION_MAP[3][0][5] = FLIP_V_BIT;
|
||||
ORIENTATION_MAP[4][0][5] = 1;
|
||||
ORIENTATION_MAP[5][0][5] = 1 | FLIP_V_BIT;
|
||||
|
||||
// side 2
|
||||
OrientationMap[0][1][2] = FLIP_H_BIT;
|
||||
OrientationMap[1][1][2] = 0;
|
||||
OrientationMap[2][1][2] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[3][1][2] = 1;
|
||||
OrientationMap[4][1][2] = 3;
|
||||
OrientationMap[5][1][2] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[0][1][2] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][1][2] = 0;
|
||||
ORIENTATION_MAP[2][1][2] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[3][1][2] = 1;
|
||||
ORIENTATION_MAP[4][1][2] = 3;
|
||||
ORIENTATION_MAP[5][1][2] = 3 | FLIP_H_BIT;
|
||||
|
||||
OrientationMap[0][4][2] = FLIP_H_BIT;
|
||||
OrientationMap[1][4][2] = FLIP_H_BIT;
|
||||
OrientationMap[2][4][2] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[3][4][2] = 1;
|
||||
OrientationMap[4][4][2] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[5][4][2] = 2;
|
||||
ORIENTATION_MAP[0][4][2] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][4][2] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][4][2] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[3][4][2] = 1;
|
||||
ORIENTATION_MAP[4][4][2] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[5][4][2] = 2;
|
||||
|
||||
OrientationMap[0][0][2] = FLIP_V_BIT;
|
||||
OrientationMap[1][0][2] = 0;
|
||||
OrientationMap[2][0][2] = 2;
|
||||
OrientationMap[3][0][2] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[4][0][2] = 3 | FLIP_H_BIT;
|
||||
OrientationMap[5][0][2] = 0;
|
||||
ORIENTATION_MAP[0][0][2] = FLIP_V_BIT;
|
||||
ORIENTATION_MAP[1][0][2] = 0;
|
||||
ORIENTATION_MAP[2][0][2] = 2;
|
||||
ORIENTATION_MAP[3][0][2] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[4][0][2] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[5][0][2] = 0;
|
||||
|
||||
OrientationMap[0][5][2] = FLIP_H_BIT;
|
||||
OrientationMap[1][5][2] = FLIP_H_BIT;
|
||||
OrientationMap[2][5][2] = 2;
|
||||
OrientationMap[3][5][2] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[4][5][2] = 2;
|
||||
OrientationMap[5][5][2] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[0][5][2] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][5][2] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[2][5][2] = 2;
|
||||
ORIENTATION_MAP[3][5][2] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[4][5][2] = 2;
|
||||
ORIENTATION_MAP[5][5][2] = 1 | FLIP_H_BIT;
|
||||
|
||||
// side 3
|
||||
OrientationMap[0][0][3] = 3 | FLIP_H_BIT;
|
||||
OrientationMap[1][0][3] = 3;
|
||||
OrientationMap[2][0][3] = 1;
|
||||
OrientationMap[3][0][3] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[4][0][3] = 0;
|
||||
OrientationMap[5][0][3] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[0][0][3] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][0][3] = 3;
|
||||
ORIENTATION_MAP[2][0][3] = 1;
|
||||
ORIENTATION_MAP[3][0][3] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[4][0][3] = 0;
|
||||
ORIENTATION_MAP[5][0][3] = FLIP_H_BIT;
|
||||
|
||||
OrientationMap[0][4][3] = 3;
|
||||
OrientationMap[1][4][3] = 3;
|
||||
OrientationMap[2][4][3] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[3][4][3] = 2;
|
||||
OrientationMap[4][4][3] = 1;
|
||||
OrientationMap[5][4][3] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[0][4][3] = 3;
|
||||
ORIENTATION_MAP[1][4][3] = 3;
|
||||
ORIENTATION_MAP[2][4][3] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[3][4][3] = 2;
|
||||
ORIENTATION_MAP[4][4][3] = 1;
|
||||
ORIENTATION_MAP[5][4][3] = 2 | FLIP_H_BIT;
|
||||
|
||||
OrientationMap[0][1][3] = 3 | FLIP_V_BIT;
|
||||
OrientationMap[1][1][3] = 3;
|
||||
OrientationMap[2][1][3] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[3][1][3] = 2;
|
||||
OrientationMap[4][1][3] = 3 | FLIP_H_BIT;
|
||||
OrientationMap[5][1][3] = 0;
|
||||
ORIENTATION_MAP[0][1][3] = 3 | FLIP_V_BIT;
|
||||
ORIENTATION_MAP[1][1][3] = 3;
|
||||
ORIENTATION_MAP[2][1][3] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[3][1][3] = 2;
|
||||
ORIENTATION_MAP[4][1][3] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[5][1][3] = 0;
|
||||
|
||||
OrientationMap[0][5][3] = 3;
|
||||
OrientationMap[1][5][3] = 3;
|
||||
OrientationMap[2][5][3] = 1;
|
||||
OrientationMap[3][5][3] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[4][5][3] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[5][5][3] = 1;
|
||||
ORIENTATION_MAP[0][5][3] = 3;
|
||||
ORIENTATION_MAP[1][5][3] = 3;
|
||||
ORIENTATION_MAP[2][5][3] = 1;
|
||||
ORIENTATION_MAP[3][5][3] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[4][5][3] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[5][5][3] = 1;
|
||||
|
||||
// side 4
|
||||
OrientationMap[0][3][4] = 1;
|
||||
OrientationMap[1][3][4] = 2;
|
||||
OrientationMap[2][3][4] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[3][3][4] = 1;
|
||||
OrientationMap[4][3][4] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[5][3][4] = 1;
|
||||
ORIENTATION_MAP[0][3][4] = 1;
|
||||
ORIENTATION_MAP[1][3][4] = 2;
|
||||
ORIENTATION_MAP[2][3][4] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[3][3][4] = 1;
|
||||
ORIENTATION_MAP[4][3][4] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[5][3][4] = 1;
|
||||
|
||||
OrientationMap[0][0][4] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[1][0][4] = 2;
|
||||
OrientationMap[2][0][4] = 0;
|
||||
OrientationMap[3][0][4] = FLIP_H_BIT;
|
||||
OrientationMap[4][0][4] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[5][0][4] = 1;
|
||||
ORIENTATION_MAP[0][0][4] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][0][4] = 2;
|
||||
ORIENTATION_MAP[2][0][4] = 0;
|
||||
ORIENTATION_MAP[3][0][4] = FLIP_H_BIT;
|
||||
ORIENTATION_MAP[4][0][4] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[5][0][4] = 1;
|
||||
|
||||
OrientationMap[0][1][4] = 1 | FLIP_H_BIT;
|
||||
OrientationMap[1][1][4] = 2;
|
||||
OrientationMap[2][1][4] = 3 | FLIP_H_BIT;
|
||||
OrientationMap[3][1][4] = 3;
|
||||
OrientationMap[4][1][4] = 2;
|
||||
OrientationMap[5][1][4] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[0][1][4] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[1][1][4] = 2;
|
||||
ORIENTATION_MAP[2][1][4] = 3 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[3][1][4] = 3;
|
||||
ORIENTATION_MAP[4][1][4] = 2;
|
||||
ORIENTATION_MAP[5][1][4] = 1 | FLIP_H_BIT;
|
||||
|
||||
OrientationMap[0][2][4] = 1;
|
||||
OrientationMap[1][2][4] = 2;
|
||||
OrientationMap[2][2][4] = 1;
|
||||
OrientationMap[3][2][4] = 2 | FLIP_H_BIT;
|
||||
OrientationMap[4][2][4] = 2;
|
||||
OrientationMap[5][2][4] = 1 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[0][2][4] = 1;
|
||||
ORIENTATION_MAP[1][2][4] = 2;
|
||||
ORIENTATION_MAP[2][2][4] = 1;
|
||||
ORIENTATION_MAP[3][2][4] = 2 | FLIP_H_BIT;
|
||||
ORIENTATION_MAP[4][2][4] = 2;
|
||||
ORIENTATION_MAP[5][2][4] = 1 | FLIP_H_BIT;
|
||||
}
|
||||
|
||||
public BaseBlockRender() {
|
||||
|
|
|
@ -43,7 +43,7 @@ import appeng.core.features.AEFeature;
|
|||
public class BusRenderHelper implements IPartRenderHelper
|
||||
{
|
||||
|
||||
final public static BusRenderHelper instance = new BusRenderHelper();
|
||||
final public static BusRenderHelper INSTANCE = new BusRenderHelper();
|
||||
|
||||
double minX = 0;
|
||||
double minY = 0;
|
||||
|
@ -162,7 +162,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
@Override
|
||||
public void normalRendering()
|
||||
{
|
||||
RenderBlocksWorkaround rbw = BusRenderer.instance.renderer;
|
||||
RenderBlocksWorkaround rbw = BusRenderer.INSTANCE.renderer;
|
||||
rbw.calculations = true;
|
||||
rbw.useTextures = true;
|
||||
rbw.enableAO = false;
|
||||
|
@ -171,7 +171,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
@Override
|
||||
public ISimplifiedBundle useSimplifiedRendering(int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim)
|
||||
{
|
||||
RenderBlocksWorkaround rbw = BusRenderer.instance.renderer;
|
||||
RenderBlocksWorkaround rbw = BusRenderer.INSTANCE.renderer;
|
||||
|
||||
if ( sim != null && rbw.similarLighting( this.blk, rbw.blockAccess, x, y, z, sim ) )
|
||||
{
|
||||
|
@ -350,8 +350,8 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
|
||||
AEBaseBlock blk = (AEBaseBlock) AEApi.instance().blocks().blockMultiPart.block();
|
||||
BlockRenderInfo info = blk.getRendererInstance();
|
||||
ForgeDirection forward = BusRenderHelper.instance.az;
|
||||
ForgeDirection up = BusRenderHelper.instance.ay;
|
||||
ForgeDirection forward = BusRenderHelper.INSTANCE.az;
|
||||
ForgeDirection up = BusRenderHelper.INSTANCE.ay;
|
||||
|
||||
renderer.uvRotateBottom = info.getTexture( ForgeDirection.DOWN ).setFlip( BaseBlockRender.getOrientation( ForgeDirection.DOWN, forward, up ) );
|
||||
renderer.uvRotateTop = info.getTexture( ForgeDirection.UP ).setFlip( BaseBlockRender.getOrientation( ForgeDirection.UP, forward, up ) );
|
||||
|
@ -387,7 +387,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
@Override
|
||||
public void setFacesToRender(EnumSet<ForgeDirection> faces)
|
||||
{
|
||||
BusRenderer.instance.renderer.renderFaces = faces;
|
||||
BusRenderer.INSTANCE.renderer.renderFaces = faces;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -45,21 +45,21 @@ import appeng.util.Platform;
|
|||
public class BusRenderer implements IItemRenderer
|
||||
{
|
||||
|
||||
public static final BusRenderer instance = new BusRenderer();
|
||||
public static final BusRenderer INSTANCE = new BusRenderer();
|
||||
|
||||
public final RenderBlocksWorkaround renderer = new RenderBlocksWorkaround();
|
||||
public static final HashMap<Integer, IPart> renderPart = new HashMap<Integer, IPart>();
|
||||
public static final HashMap<Integer, IPart> RENDER_PART = new HashMap<Integer, IPart>();
|
||||
|
||||
public IPart getRenderer(ItemStack is, IPartItem c)
|
||||
{
|
||||
int id = (Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET) | is.getItemDamage();
|
||||
|
||||
IPart part = renderPart.get( id );
|
||||
IPart part = RENDER_PART.get( id );
|
||||
if ( part == null )
|
||||
{
|
||||
part = c.createPartFromItemStack( is );
|
||||
if ( part != null )
|
||||
renderPart.put( id, part );
|
||||
RENDER_PART.put( id, part );
|
||||
}
|
||||
|
||||
return part;
|
||||
|
@ -126,12 +126,12 @@ public class BusRenderer implements IItemRenderer
|
|||
Tessellator.instance.setColorOpaque_F( 1, 1, 1 );
|
||||
Tessellator.instance.setBrightness( 14 << 20 | 14 << 4 );
|
||||
|
||||
BusRenderHelper.instance.setBounds( 0, 0, 0, 1, 1, 1 );
|
||||
BusRenderHelper.instance.setTexture( null );
|
||||
BusRenderHelper.instance.setInvColor( 0xffffff );
|
||||
BusRenderHelper.INSTANCE.setBounds( 0, 0, 0, 1, 1, 1 );
|
||||
BusRenderHelper.INSTANCE.setTexture( null );
|
||||
BusRenderHelper.INSTANCE.setInvColor( 0xffffff );
|
||||
this.renderer.blockAccess = ClientHelper.proxy.getWorld();
|
||||
|
||||
BusRenderHelper.instance.setOrientation( ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
BusRenderHelper.INSTANCE.setOrientation( ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
|
||||
this.renderer.uvRotateBottom = this.renderer.uvRotateEast = this.renderer.uvRotateNorth = this.renderer.uvRotateSouth = this.renderer.uvRotateTop = this.renderer.uvRotateWest = 0;
|
||||
this.renderer.useInventoryTint = false;
|
||||
|
@ -149,7 +149,7 @@ public class BusRenderer implements IItemRenderer
|
|||
}
|
||||
|
||||
if ( fp != null )
|
||||
fp.renderInventory( BusRenderHelper.instance, this.renderer );
|
||||
fp.renderInventory( BusRenderHelper.INSTANCE, this.renderer );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -162,7 +162,7 @@ public class BusRenderer implements IItemRenderer
|
|||
GL11.glTranslatef( 0.0f, 0.0f, -0.04f * (8 - depth) - 0.06f );
|
||||
}
|
||||
|
||||
ip.renderInventory( BusRenderHelper.instance, this.renderer );
|
||||
ip.renderInventory( BusRenderHelper.INSTANCE, this.renderer );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,11 +36,11 @@ import appeng.parts.CableBusContainer;
|
|||
public class CableRenderHelper
|
||||
{
|
||||
|
||||
private static final CableRenderHelper instance = new CableRenderHelper();
|
||||
private static final CableRenderHelper INSTANCE = new CableRenderHelper();
|
||||
|
||||
public static CableRenderHelper getInstance()
|
||||
{
|
||||
return instance;
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private void setSide(ForgeDirection s)
|
||||
|
@ -87,16 +87,16 @@ public class CableRenderHelper
|
|||
break;
|
||||
}
|
||||
|
||||
BusRenderHelper.instance.setOrientation( ax, ay, az );
|
||||
BusRenderHelper.INSTANCE.setOrientation( ax, ay, az );
|
||||
}
|
||||
|
||||
public void renderStatic(CableBusContainer cableBusContainer, IFacadeContainer iFacadeContainer)
|
||||
{
|
||||
TileEntity te = cableBusContainer.getTile();
|
||||
RenderBlocksWorkaround renderer = BusRenderer.instance.renderer;
|
||||
RenderBlocksWorkaround renderer = BusRenderer.INSTANCE.renderer;
|
||||
|
||||
if ( renderer.overrideBlockTexture != null )
|
||||
BusRenderHelper.instance.setPass( 0 );
|
||||
BusRenderHelper.INSTANCE.setPass( 0 );
|
||||
|
||||
if ( renderer.blockAccess == null )
|
||||
renderer.blockAccess = Minecraft.getMinecraft().theWorld;
|
||||
|
@ -112,7 +112,7 @@ public class CableRenderHelper
|
|||
renderer.flipTexture = false;
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
part.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.instance, renderer );
|
||||
part.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.INSTANCE, renderer );
|
||||
|
||||
renderer.faces = EnumSet.allOf( ForgeDirection.class );
|
||||
renderer.calculations = true;
|
||||
|
@ -132,7 +132,7 @@ public class CableRenderHelper
|
|||
if ( part != null )
|
||||
{
|
||||
this.setSide( s );
|
||||
BusRenderHelper brh = BusRenderHelper.instance;
|
||||
BusRenderHelper brh = BusRenderHelper.INSTANCE;
|
||||
BusCollisionHelper bch = new BusCollisionHelper( boxes, brh.getWorldX(), brh.getWorldY(), brh.getWorldZ(), null, true );
|
||||
part.getBoxes( bch );
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ public class CableRenderHelper
|
|||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
this.setSide( s );
|
||||
fPart.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.instance, renderer, iFacadeContainer, b,
|
||||
fPart.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.INSTANCE, renderer, iFacadeContainer, b,
|
||||
cableBusContainer.getPart( s ) == null );
|
||||
}
|
||||
}
|
||||
|
@ -247,8 +247,8 @@ public class CableRenderHelper
|
|||
break;
|
||||
}
|
||||
|
||||
BusRenderHelper.instance.setOrientation( ax, ay, az );
|
||||
part.renderDynamic( x, y, z, BusRenderHelper.instance, BusRenderer.instance.renderer );
|
||||
BusRenderHelper.INSTANCE.setOrientation( ax, ay, az );
|
||||
part.renderDynamic( x, y, z, BusRenderHelper.INSTANCE, BusRenderer.INSTANCE.renderer );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
public class ItemRenderer implements IItemRenderer
|
||||
{
|
||||
|
||||
public static final ItemRenderer instance = new ItemRenderer();
|
||||
public static final ItemRenderer INSTANCE = new ItemRenderer();
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
|
@ -56,7 +56,7 @@ public class ItemRenderer implements IItemRenderer
|
|||
if ( type == ItemRenderType.INVENTORY )
|
||||
GL11.glTranslatef( 0.0f, -0.1f, 0.0f );
|
||||
|
||||
WorldRender.instance.renderItemBlock( item, type, data );
|
||||
WorldRender.INSTANCE.renderItemBlock( item, type, data );
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.minecraftforge.client.IRenderHandler;
|
|||
public class SpatialSkyRender extends IRenderHandler
|
||||
{
|
||||
|
||||
private static final SpatialSkyRender instance = new SpatialSkyRender();
|
||||
private static final SpatialSkyRender INSTANCE = new SpatialSkyRender();
|
||||
|
||||
private final Random random = new Random();
|
||||
private long cycle = 0;
|
||||
|
@ -185,7 +185,7 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
|
||||
public static IRenderHandler getInstance()
|
||||
{
|
||||
return instance;
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
|||
|
||||
private final RenderBlocks renderer = new RenderBlocks();
|
||||
final int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
public static final WorldRender instance = new WorldRender();
|
||||
public static final WorldRender INSTANCE = new WorldRender();
|
||||
boolean hasError = false;
|
||||
|
||||
public final HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
|
||||
|
|
|
@ -201,14 +201,14 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
|||
return false;
|
||||
}
|
||||
|
||||
BusRenderer.instance.renderer.blockAccess = renderer.blockAccess;
|
||||
renderer = BusRenderer.instance.renderer;
|
||||
BusRenderer.INSTANCE.renderer.blockAccess = renderer.blockAccess;
|
||||
renderer = BusRenderer.INSTANCE.renderer;
|
||||
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
tma.lightCache = BusRenderHelper.instance.useSimplifiedRendering( x, y, z, this, tma.lightCache );
|
||||
tma.lightCache = BusRenderHelper.INSTANCE.useSimplifiedRendering( x, y, z, this, tma.lightCache );
|
||||
|
||||
BusRenderer.instance.renderer.isFacade = true;
|
||||
BusRenderer.INSTANCE.renderer.isFacade = true;
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
|
||||
ForgeDirection fdy = te.getUp();
|
||||
|
@ -262,12 +262,12 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
|||
this.renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
BusRenderHelper.instance.normalRendering();
|
||||
BusRenderHelper.INSTANCE.normalRendering();
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
renderer.renderAllFaces = false;
|
||||
BusRenderer.instance.renderer.isFacade = false;
|
||||
BusRenderer.INSTANCE.renderer.isFacade = false;
|
||||
|
||||
this.postRenderInWorld( renderer );
|
||||
|
||||
|
|
|
@ -74,9 +74,9 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
|||
|
||||
if ( formed && renderer.overrideBlockTexture == null )
|
||||
{
|
||||
renderer = BusRenderer.instance.renderer;
|
||||
BusRenderHelper i = BusRenderHelper.instance;
|
||||
BusRenderer.instance.renderer.isFacade = true;
|
||||
renderer = BusRenderer.INSTANCE.renderer;
|
||||
BusRenderHelper i = BusRenderHelper.INSTANCE;
|
||||
BusRenderer.INSTANCE.renderer.isFacade = true;
|
||||
|
||||
renderer.blockAccess = w;
|
||||
i.setPass( 0 );
|
||||
|
@ -122,7 +122,7 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
|||
this.handleSide( blk, meta, x, y, z, i, renderer, ct.getForward() == side ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
|
||||
}
|
||||
|
||||
BusRenderer.instance.renderer.isFacade = false;
|
||||
BusRenderer.INSTANCE.renderer.isFacade = false;
|
||||
i.setFacesToRender( EnumSet.allOf( ForgeDirection.class ) );
|
||||
i.normalRendering();
|
||||
|
||||
|
|
|
@ -108,11 +108,11 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
|||
int x = (int) p.posX;
|
||||
int y = (int) p.posY;
|
||||
int z = (int) p.posZ;
|
||||
CompassResult cr = CompassManager.instance.getCompassDirection( 0, x, y, z );
|
||||
CompassResult cr = CompassManager.INSTANCE.getCompassDirection( 0, x, y, z );
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
CompassManager.instance.getCompassDirection( 0, x + i - 1, y, z + j - 1 );
|
||||
CompassManager.INSTANCE.getCompassDirection( 0, x + i - 1, y, z + j - 1 );
|
||||
|
||||
if ( cr.hasResult )
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
|||
|
||||
CompassResult cr = null;
|
||||
if ( skyCompass.getForward() == ForgeDirection.UP || skyCompass.getForward() == ForgeDirection.DOWN )
|
||||
cr = CompassManager.instance.getCompassDirection( 0, tile.xCoord, tile.yCoord, tile.zCoord );
|
||||
cr = CompassManager.INSTANCE.getCompassDirection( 0, tile.xCoord, tile.yCoord, tile.zCoord );
|
||||
else
|
||||
cr = new CompassResult( false, true, 0 );
|
||||
|
||||
|
|
|
@ -51,14 +51,14 @@ public class RendererCableBus extends BaseBlockRender
|
|||
|
||||
if ( t instanceof TileCableBus )
|
||||
{
|
||||
BusRenderer.instance.renderer.renderAllFaces = true;
|
||||
BusRenderer.instance.renderer.blockAccess = renderer.blockAccess;
|
||||
BusRenderer.instance.renderer.overrideBlockTexture = renderer.overrideBlockTexture;
|
||||
BusRenderer.INSTANCE.renderer.renderAllFaces = true;
|
||||
BusRenderer.INSTANCE.renderer.blockAccess = renderer.blockAccess;
|
||||
BusRenderer.INSTANCE.renderer.overrideBlockTexture = renderer.overrideBlockTexture;
|
||||
((TileCableBus) t).cb.renderStatic( x, y, z );
|
||||
BusRenderer.instance.renderer.renderAllFaces = false;
|
||||
BusRenderer.INSTANCE.renderer.renderAllFaces = false;
|
||||
}
|
||||
|
||||
return BusRenderHelper.instance.getItemsRendered() > 0;
|
||||
return BusRenderHelper.INSTANCE.getItemsRendered() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,7 +66,7 @@ public class RendererCableBus extends BaseBlockRender
|
|||
{
|
||||
if ( t instanceof TileCableBus )
|
||||
{
|
||||
BusRenderer.instance.renderer.overrideBlockTexture = null;
|
||||
BusRenderer.INSTANCE.renderer.overrideBlockTexture = null;
|
||||
((TileCableBus) t).cb.renderDynamic( x, y, z );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LightningArcFX extends LightningFX
|
||||
{
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
|
||||
final double rx;
|
||||
final double ry;
|
||||
|
@ -48,9 +51,9 @@ public class LightningArcFX extends LightningFX
|
|||
double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
this.Steps[s][0] = (lastDirectionX + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][1] = (lastDirectionY + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][2] = (lastDirectionZ + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][0] = (lastDirectionX + ( RANDOM_GENERATOR.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][1] = (lastDirectionY + ( RANDOM_GENERATOR.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][2] = (lastDirectionZ + ( RANDOM_GENERATOR.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class LightningFX extends EntityFX
|
|||
{
|
||||
|
||||
final int steps = this.getSteps();
|
||||
static final Random rng = new Random();
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
final double[][] Steps;
|
||||
|
||||
protected LightningFX(World w, double x, double y, double z, double r, double g, double b, int maxAge) {
|
||||
|
@ -64,14 +64,14 @@ public class LightningFX extends EntityFX
|
|||
|
||||
protected void regen()
|
||||
{
|
||||
double lastDirectionX = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionY = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionZ = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionX = ( RANDOM_GENERATOR.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionY = ( RANDOM_GENERATOR.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionZ = ( RANDOM_GENERATOR.nextDouble() - 0.5) * 0.9;
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
this.Steps[s][0] = lastDirectionX = (lastDirectionX + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][1] = lastDirectionY = (lastDirectionY + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][2] = lastDirectionZ = (lastDirectionZ + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][0] = lastDirectionX = (lastDirectionX + ( RANDOM_GENERATOR.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][1] = lastDirectionY = (lastDirectionY + ( RANDOM_GENERATOR.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][2] = lastDirectionZ = (lastDirectionZ + ( RANDOM_GENERATOR.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ import net.minecraft.util.IIcon;
|
|||
public class TmpFlippableIcon extends FlippableIcon
|
||||
{
|
||||
|
||||
private static final IIcon nullIcon = new MissingIcon( Blocks.diamond_block );
|
||||
private static final IIcon NULL_ICON = new MissingIcon( Blocks.diamond_block );
|
||||
|
||||
public TmpFlippableIcon() {
|
||||
super( nullIcon );
|
||||
super( NULL_ICON );
|
||||
}
|
||||
|
||||
public void setOriginal(IIcon i)
|
||||
|
@ -47,7 +47,7 @@ public class TmpFlippableIcon extends FlippableIcon
|
|||
}
|
||||
|
||||
if ( i == null )
|
||||
this.original = nullIcon;
|
||||
this.original = NULL_ICON;
|
||||
else
|
||||
this.original = i;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||
|
||||
if ( s == this.middle )
|
||||
{
|
||||
for (ItemStack i : Inscribe.plates)
|
||||
for (ItemStack i : Inscribe.PLATES )
|
||||
{
|
||||
if ( Platform.isSameItemPrecise( i, is ) )
|
||||
return false;
|
||||
|
@ -106,7 +106,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||
boolean matches = false;
|
||||
boolean found = false;
|
||||
|
||||
for (InscriberRecipe i : Inscribe.recipes)
|
||||
for (InscriberRecipe i : Inscribe.RECIPES )
|
||||
{
|
||||
boolean matchA = (PlateA == null && i.plateA == null) || (Platform.isSameItemPrecise( PlateA, i.plateA )) && // and...
|
||||
(PlateB == null && i.plateB == null) | (Platform.isSameItemPrecise( PlateB, i.plateB ));
|
||||
|
@ -144,7 +144,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||
return AEApi.instance().materials().materialNamePress.sameAsStack( is );
|
||||
|
||||
// everything else
|
||||
for (InscriberRecipe i : Inscribe.recipes)
|
||||
for (InscriberRecipe i : Inscribe.RECIPES )
|
||||
{
|
||||
if ( Platform.isSameItemPrecise( i.plateA, otherSlot ) )
|
||||
{
|
||||
|
|
|
@ -181,7 +181,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||
if ( AEApi.instance().materials().materialNamePress.sameAsStack( i ) )
|
||||
return true;
|
||||
|
||||
for (ItemStack is : Inscribe.plates)
|
||||
for (ItemStack is : Inscribe.PLATES )
|
||||
if ( Platform.isSameItemPrecise( is, i ) )
|
||||
return true;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
|
|||
|
||||
public static AEConfig instance;
|
||||
|
||||
public static final double TunnelPowerLoss = 0.05;
|
||||
public static final double TUNNEL_POWER_LOSS = 0.05;
|
||||
|
||||
public String latestVersion = VERSION;
|
||||
public long latestTimeStamp = 0;
|
||||
|
|
|
@ -42,7 +42,7 @@ import appeng.util.Platform;
|
|||
public class Api implements IAppEngApi
|
||||
{
|
||||
|
||||
public static final Api instance = new Api();
|
||||
public static final Api INSTANCE = new Api();
|
||||
|
||||
private Api() {
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ public class AppEng
|
|||
public void serverStopping( FMLServerStoppingEvent event )
|
||||
{
|
||||
WorldSettings.getInstance().shutdown();
|
||||
TickHandler.instance.shutdown();
|
||||
TickHandler.INSTANCE.shutdown();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -252,12 +252,12 @@ public final class Registration
|
|||
RecipeSorter.register( "AE2-Shaped", ShapedRecipe.class, Category.SHAPED, "" );
|
||||
RecipeSorter.register( "AE2-Shapeless", ShapelessRecipe.class, Category.SHAPELESS, "" );
|
||||
|
||||
MinecraftForge.EVENT_BUS.register( OreDictionaryHandler.instance );
|
||||
MinecraftForge.EVENT_BUS.register( OreDictionaryHandler.INSTANCE );
|
||||
|
||||
Items items = Api.instance.items();
|
||||
Materials materials = Api.instance.materials();
|
||||
Parts parts = Api.instance.parts();
|
||||
Blocks blocks = Api.instance.blocks();
|
||||
Items items = Api.INSTANCE.items();
|
||||
Materials materials = Api.INSTANCE.materials();
|
||||
Parts parts = Api.INSTANCE.parts();
|
||||
Blocks blocks = Api.INSTANCE.blocks();
|
||||
|
||||
AEItemDefinition materialItem = this.addFeature( ItemMultiMaterial.class );
|
||||
|
||||
|
@ -573,8 +573,8 @@ public final class Registration
|
|||
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.RF ) )
|
||||
ph.registerNewLayer( "appeng.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyReceiver" );
|
||||
|
||||
FMLCommonHandler.instance().bus().register( TickHandler.instance );
|
||||
MinecraftForge.EVENT_BUS.register( TickHandler.instance );
|
||||
FMLCommonHandler.instance().bus().register( TickHandler.INSTANCE );
|
||||
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
||||
|
||||
PartPlacement pp = new PartPlacement();
|
||||
MinecraftForge.EVENT_BUS.register( pp );
|
||||
|
@ -627,7 +627,7 @@ public final class Registration
|
|||
PlayerMessages.values();
|
||||
GuiText.values();
|
||||
|
||||
Api.instance.partHelper.initFMPSupport();
|
||||
Api.INSTANCE.partHelper.initFMPSupport();
|
||||
( ( BlockCableBus ) blocks.blockMultiPart.block() ).setupTile();
|
||||
|
||||
// Interface
|
||||
|
@ -777,6 +777,6 @@ public final class Registration
|
|||
/**
|
||||
* initial recipe bake, if ore dictionary changes after this it re-bakes.
|
||||
*/
|
||||
OreDictionaryHandler.instance.bakeRecipes();
|
||||
OreDictionaryHandler.INSTANCE.bakeRecipes();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ public class WorldSettings extends Configuration
|
|||
}
|
||||
else
|
||||
{
|
||||
for ( PlayerColor pc : TickHandler.instance.getPlayerColors().values() )
|
||||
for ( PlayerColor pc : TickHandler.INSTANCE.getPlayerColors().values() )
|
||||
NetworkHandler.instance.sendToAll( pc.getPacket() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -331,7 +331,7 @@ public class ApiPart implements IPartHelper
|
|||
public void setItemBusRenderer(IPartItem i)
|
||||
{
|
||||
if ( Platform.isClient() && i instanceof Item )
|
||||
MinecraftForgeClient.registerItemRenderer( (Item) i, BusRenderer.instance );
|
||||
MinecraftForgeClient.registerItemRenderer( (Item) i, BusRenderer.INSTANCE );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -71,7 +71,7 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
|
|||
|
||||
this.addIngot( "Wheat", new ItemStack( Items.wheat ) );
|
||||
|
||||
OreDictionaryHandler.instance.observe( this );
|
||||
OreDictionaryHandler.INSTANCE.observe( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -127,7 +127,7 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
|
|||
}
|
||||
|
||||
public MatterCannonAmmoRegistry() {
|
||||
OreDictionaryHandler.instance.observe( this );
|
||||
OreDictionaryHandler.INSTANCE.observe( this );
|
||||
this.registerAmmo( new ItemStack( Items.gold_nugget ), 196.96655 );
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ public class RegistryContainer implements IRegistryContainer
|
|||
@Override
|
||||
public IWorldGen worldgen()
|
||||
{
|
||||
return WorldGenRegistry.instance;
|
||||
return WorldGenRegistry.INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class WorldGenRegistry implements IWorldGen
|
|||
|
||||
final TypeSet[] types;
|
||||
|
||||
static final public WorldGenRegistry instance = new WorldGenRegistry();
|
||||
static final public WorldGenRegistry INSTANCE = new WorldGenRegistry();
|
||||
|
||||
private WorldGenRegistry() {
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ import appeng.core.sync.packets.PacketValueConfig;
|
|||
public class AppEngPacketHandlerBase
|
||||
{
|
||||
|
||||
public static final Map<Class, PacketTypes> reverseLookup = new HashMap<Class, AppEngPacketHandlerBase.PacketTypes>();
|
||||
public static final Map<Class, PacketTypes> REVERSE_LOOKUP = new HashMap<Class, AppEngPacketHandlerBase.PacketTypes>();
|
||||
|
||||
public enum PacketTypes
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ public class AppEngPacketHandlerBase
|
|||
}
|
||||
|
||||
this.con = x;
|
||||
AppEngPacketHandlerBase.reverseLookup.put( this.pc, this );
|
||||
AppEngPacketHandlerBase.REVERSE_LOOKUP.put( this.pc, this );
|
||||
|
||||
if ( this.con == null )
|
||||
throw new RuntimeException( "Invalid Packet Class, must be constructable on DataInputStream" );
|
||||
|
@ -142,7 +142,7 @@ public class AppEngPacketHandlerBase
|
|||
|
||||
public static PacketTypes getID(Class<? extends AppEngPacket> c)
|
||||
{
|
||||
return AppEngPacketHandlerBase.reverseLookup.get( c );
|
||||
return AppEngPacketHandlerBase.REVERSE_LOOKUP.get( c );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class PacketCompassResponse extends AppEngPacket
|
|||
@Override
|
||||
public void clientPacketData(INetworkInfo network, AppEngPacket packet, EntityPlayer player)
|
||||
{
|
||||
CompassManager.instance.postResult( this.attunement, this.cx << 4, this.cdy << 5, this.cz << 4, this.cr );
|
||||
CompassManager.INSTANCE.postResult( this.attunement, this.cx << 4, this.cdy << 5, this.cz << 4, this.cr );
|
||||
}
|
||||
|
||||
// api
|
||||
|
|
|
@ -48,7 +48,7 @@ public class PacketPaintedEntity extends AppEngPacket
|
|||
public void clientPacketData(INetworkInfo network, AppEngPacket packet, EntityPlayer player)
|
||||
{
|
||||
PlayerColor pc = new PlayerColor( this.entityId, this.myColor, this.ticks );
|
||||
TickHandler.instance.getPlayerColors().put( this.entityId, pc );
|
||||
TickHandler.INSTANCE.getPlayerColors().put( this.entityId, pc );
|
||||
}
|
||||
|
||||
// api
|
||||
|
|
|
@ -159,7 +159,7 @@ public class CraftingJob implements Runnable, ICraftingJob
|
|||
{
|
||||
try
|
||||
{
|
||||
TickHandler.instance.registerCraftingSimulation( this.world, this );
|
||||
TickHandler.INSTANCE.registerCraftingSimulation( this.world, this );
|
||||
this.handlePausing();
|
||||
|
||||
Stopwatch timer = Stopwatch.createStarted();
|
||||
|
|
|
@ -60,7 +60,7 @@ public class TileCubeGenerator extends AEBaseTile
|
|||
|
||||
void spawn()
|
||||
{
|
||||
this.worldObj.setBlock( this.xCoord, this.yCoord, this.zCoord, Platform.air, 0, 3 );
|
||||
this.worldObj.setBlock( this.xCoord, this.yCoord, this.zCoord, Platform.AIR, 0, 3 );
|
||||
|
||||
Item i = this.is.getItem();
|
||||
int side = ForgeDirection.UP.ordinal();
|
||||
|
|
|
@ -33,10 +33,10 @@ import appeng.tile.AEBaseTile;
|
|||
public class TileItemGen extends AEBaseTile implements IInventory
|
||||
{
|
||||
|
||||
public static final Queue<ItemStack> possibleItems = new LinkedList<ItemStack>();
|
||||
public static final Queue<ItemStack> POSSIBLE_ITEMS = new LinkedList<ItemStack>();
|
||||
|
||||
public TileItemGen() {
|
||||
if ( possibleItems.isEmpty() )
|
||||
if ( POSSIBLE_ITEMS.isEmpty() )
|
||||
{
|
||||
for (Object obj : Item.itemRegistry)
|
||||
{
|
||||
|
@ -46,13 +46,13 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
|||
if ( mi.isDamageable() )
|
||||
{
|
||||
for (int dmg = 0; dmg < mi.getMaxDamage(); dmg++)
|
||||
possibleItems.add( new ItemStack( mi, 1, dmg ) );
|
||||
POSSIBLE_ITEMS.add( new ItemStack( mi, 1, dmg ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
mi.getSubItems( mi, mi.getCreativeTab(), list );
|
||||
possibleItems.addAll( list );
|
||||
POSSIBLE_ITEMS.addAll( list );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,15 +73,15 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
|||
|
||||
private ItemStack getRandomItem()
|
||||
{
|
||||
return possibleItems.peek();
|
||||
return POSSIBLE_ITEMS.peek();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j)
|
||||
{
|
||||
ItemStack a = possibleItems.poll();
|
||||
ItemStack a = POSSIBLE_ITEMS.poll();
|
||||
ItemStack out = a.copy();
|
||||
possibleItems.add( a );
|
||||
POSSIBLE_ITEMS.add( a );
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -94,8 +94,8 @@ public class TileItemGen extends AEBaseTile implements IInventory
|
|||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack)
|
||||
{
|
||||
ItemStack a = possibleItems.poll();
|
||||
possibleItems.add( a );
|
||||
ItemStack a = POSSIBLE_ITEMS.poll();
|
||||
POSSIBLE_ITEMS.add( a );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -75,7 +75,7 @@ public class ToolDebugCard extends AEBaseItem
|
|||
int grids = 0;
|
||||
int totalNodes = 0;
|
||||
|
||||
for (Grid g : TickHandler.instance.getGridList())
|
||||
for (Grid g : TickHandler.INSTANCE.getGridList())
|
||||
{
|
||||
grids++;
|
||||
totalNodes += g.getNodes().size();
|
||||
|
|
|
@ -70,7 +70,7 @@ public class ToolEraser extends AEBaseItem
|
|||
if ( c_blk == blk && c_meta == meta )
|
||||
{
|
||||
blocks++;
|
||||
world.setBlock( wc.x, wc.y, wc.z, Platform.air );
|
||||
world.setBlock( wc.x, wc.y, wc.z, Platform.AIR );
|
||||
|
||||
this.check( world, wc.x + 1, wc.y, wc.z, next );
|
||||
this.check( world, wc.x - 1, wc.y, wc.z, next );
|
||||
|
|
|
@ -84,7 +84,7 @@ import appeng.util.Platform;
|
|||
public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IRedstonePart, AEMultiTile
|
||||
{
|
||||
|
||||
final static Cuboid6[] sideTests = new Cuboid6[] {
|
||||
private final static Cuboid6[] SIDE_TESTS = new Cuboid6[] {
|
||||
|
||||
new Cuboid6( 6.0 / 16.0, 0, 6.0 / 16.0, 10.0 / 16.0, 6.0 / 16.0, 10.0 / 16.0 ), // DOWN(0, -1, 0),
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
|
|||
new Cuboid6( 10.0 / 16.0, 6.0 / 16.0, 6.0 / 16.0, 1.0, 10.0 / 16.0, 10.0 / 16.0 ),// EAST(1, 0, 0),
|
||||
};
|
||||
|
||||
public static final ThreadLocal<Boolean> disableFacadeOcclusion = new ThreadLocal<Boolean>();
|
||||
public static final ThreadLocal<Boolean> DISABLE_FACADE_OCCLUSION = new ThreadLocal<Boolean>();
|
||||
public CableBusContainer cb = new CableBusContainer( this );
|
||||
|
||||
@Override
|
||||
|
@ -299,7 +299,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
|
|||
{
|
||||
if ( pass == 0 || (pass == 1 && AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass )) )
|
||||
{
|
||||
BusRenderHelper.instance.setPass( pass );
|
||||
BusRenderHelper.INSTANCE.setPass( pass );
|
||||
this.cb.renderDynamic( pos.x, pos.y, pos.z );
|
||||
}
|
||||
}
|
||||
|
@ -309,12 +309,12 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
|
|||
{
|
||||
if ( pass == 0 || (pass == 1 && AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass )) )
|
||||
{
|
||||
BusRenderHelper.instance.setPass( pass );
|
||||
BusRenderer.instance.renderer.renderAllFaces = true;
|
||||
BusRenderer.instance.renderer.blockAccess = this.world();
|
||||
BusRenderer.instance.renderer.overrideBlockTexture = null;
|
||||
BusRenderHelper.INSTANCE.setPass( pass );
|
||||
BusRenderer.INSTANCE.renderer.renderAllFaces = true;
|
||||
BusRenderer.INSTANCE.renderer.blockAccess = this.world();
|
||||
BusRenderer.INSTANCE.renderer.overrideBlockTexture = null;
|
||||
this.cb.renderStatic( pos.x, pos.y, pos.z );
|
||||
return BusRenderHelper.instance.getItemsRendered() > 0;
|
||||
return BusRenderHelper.INSTANCE.getItemsRendered() > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -338,9 +338,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
|
|||
fp.getBoxes( bch, null );
|
||||
for (AxisAlignedBB bb : boxes)
|
||||
{
|
||||
disableFacadeOcclusion.set( true );
|
||||
DISABLE_FACADE_OCCLUSION.set( true );
|
||||
boolean canAdd = this.tile().canAddPart( new NormallyOccludedPart( new Cuboid6( bb ) ) );
|
||||
disableFacadeOcclusion.remove();
|
||||
DISABLE_FACADE_OCCLUSION.remove();
|
||||
if ( !canAdd )
|
||||
{
|
||||
return false;
|
||||
|
@ -454,7 +454,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
|
|||
public Iterable<Cuboid6> getOcclusionBoxes()
|
||||
{
|
||||
LinkedList<Cuboid6> l = new LinkedList<Cuboid6>();
|
||||
for (AxisAlignedBB b : this.cb.getSelectedBoundingBoxesFromPool( true, disableFacadeOcclusion.get() == null, null, true ))
|
||||
for (AxisAlignedBB b : this.cb.getSelectedBoundingBoxesFromPool( true, DISABLE_FACADE_OCCLUSION.get() == null, null, true ))
|
||||
{
|
||||
l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
|
||||
}
|
||||
|
@ -485,9 +485,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
|
|||
if ( side == null || side == ForgeDirection.UNKNOWN || this.tile() == null )
|
||||
return false;
|
||||
|
||||
disableFacadeOcclusion.set( true );
|
||||
boolean blocked = !this.tile().canAddPart( new NormallyOccludedPart( sideTests[side.ordinal()] ) );
|
||||
disableFacadeOcclusion.remove();
|
||||
DISABLE_FACADE_OCCLUSION.set( true );
|
||||
boolean blocked = !this.tile().canAddPart( new NormallyOccludedPart( SIDE_TESTS[side.ordinal()] ) );
|
||||
DISABLE_FACADE_OCCLUSION.remove();
|
||||
|
||||
return blocked;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class FMPPlacementHelper implements IPartHost
|
|||
|
||||
}
|
||||
|
||||
final private static CableBusStorage nullStorage = new NullStorage();
|
||||
final private static CableBusStorage NULL_STORAGE = new NullStorage();
|
||||
|
||||
private boolean hasPart = false;
|
||||
private TileMultipart myMP;
|
||||
|
@ -120,7 +120,7 @@ public class FMPPlacementHelper implements IPartHost
|
|||
public IFacadeContainer getFacadeContainer()
|
||||
{
|
||||
if ( this.myPart == null )
|
||||
return new FacadeContainer( nullStorage );
|
||||
return new FacadeContainer( NULL_STORAGE );
|
||||
return this.myPart.getFacadeContainer();
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public enum PartRegistry
|
|||
try
|
||||
{
|
||||
if ( this == CableBusPart )
|
||||
return (TMultiPart) Api.instance.partHelper.getCombinedInstance( this.part.getName() ).newInstance();
|
||||
return (TMultiPart) Api.INSTANCE.partHelper.getCombinedInstance( this.part.getName() ).newInstance();
|
||||
else
|
||||
return this.part.getConstructor( int.class ).newInstance( meta );
|
||||
}
|
||||
|
|
|
@ -34,6 +34,6 @@ public class AEGlassMaterial extends Material
|
|||
return false;
|
||||
}
|
||||
|
||||
public static final AEGlassMaterial instance = (new AEGlassMaterial( MapColor.airColor ));
|
||||
public static final AEGlassMaterial INSTANCE = (new AEGlassMaterial( MapColor.airColor ));
|
||||
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class MeteoritePlacer
|
|||
else if ( a > 0.5 )
|
||||
MeteoritePlacer.this.put( w, x, y, z, Blocks.gravel );
|
||||
else if ( a > 0.5 )
|
||||
MeteoritePlacer.this.put( w, x, y, z, Platform.air );
|
||||
MeteoritePlacer.this.put( w, x, y, z, Platform.AIR );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public class MeteoritePlacer
|
|||
if ( a > 0.9 )
|
||||
MeteoritePlacer.this.put( w, x, y, z, this.blk, this.meta );
|
||||
else if ( a > 0.8 )
|
||||
MeteoritePlacer.this.put( w, x, y, z, Platform.air );
|
||||
MeteoritePlacer.this.put( w, x, y, z, Platform.AIR );
|
||||
else
|
||||
this.getOther( w, x, y, z, a - 0.1 );
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ public class MeteoritePlacer
|
|||
{
|
||||
if ( this.range( x, y, z ) )
|
||||
return this.w.getBlock( x, y, z );
|
||||
return Platform.air;
|
||||
return Platform.AIR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -354,7 +354,7 @@ public class MeteoritePlacer
|
|||
{
|
||||
if ( this.range( x, y, z ) )
|
||||
return this.target.getBlock( x & 0xF, y, z & 0xF );
|
||||
return Platform.air;
|
||||
return Platform.AIR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -563,7 +563,7 @@ public class MeteoritePlacer
|
|||
boolean solid = true;
|
||||
for (int j = y - 15; j < y - 1; j++)
|
||||
{
|
||||
if ( w.getBlock( x, j, z ) == Platform.air )
|
||||
if ( w.getBlock( x, j, z ) == Platform.AIR )
|
||||
solid = false;
|
||||
}
|
||||
|
||||
|
@ -620,7 +620,7 @@ public class MeteoritePlacer
|
|||
this.put( w, i, j, k, Blocks.lava );
|
||||
}
|
||||
else
|
||||
changed = this.put( w, i, j, k, Platform.air ) || changed;
|
||||
changed = this.put( w, i, j, k, Platform.AIR ) || changed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -764,7 +764,7 @@ public class MeteoritePlacer
|
|||
|
||||
if ( blk.isReplaceable( w.getWorld(), i, j, k ) )
|
||||
{
|
||||
blk = Platform.air;
|
||||
blk = Platform.AIR;
|
||||
Block blk_b = w.getBlock( i, j + 1, k );
|
||||
|
||||
if ( blk_b != blk )
|
||||
|
@ -799,7 +799,7 @@ public class MeteoritePlacer
|
|||
{
|
||||
// decay.
|
||||
Block blk_b = w.getBlock( i, j + 1, k );
|
||||
if ( blk_b == Platform.air )
|
||||
if ( blk_b == Platform.AIR )
|
||||
{
|
||||
if ( Math.random() > 0.4 )
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ import appeng.core.sync.packets.PacketCompassRequest;
|
|||
public class CompassManager
|
||||
{
|
||||
|
||||
public static final CompassManager instance = new CompassManager();
|
||||
public static final CompassManager INSTANCE = new CompassManager();
|
||||
|
||||
static class CompassRequest
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ final public class MeteoriteWorldGen implements IWorldGenerator
|
|||
@Override
|
||||
public void generate(Random r, int chunkX, int chunkZ, World w, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
if ( WorldGenRegistry.instance.isWorldGenEnabled( WorldGenType.Meteorites, w ) )
|
||||
if ( WorldGenRegistry.INSTANCE.isWorldGenEnabled( WorldGenType.Meteorites, w ) )
|
||||
{
|
||||
// add new meteorites?
|
||||
if ( r.nextFloat() < AEConfig.instance.meteoriteSpawnChance )
|
||||
|
@ -67,10 +67,10 @@ final public class MeteoriteWorldGen implements IWorldGenerator
|
|||
int z = r.nextInt( 16 ) + (chunkZ << 4);
|
||||
|
||||
int depth = 180 + r.nextInt( 20 );
|
||||
TickHandler.instance.addCallable( w, new MeteoriteSpawn( x, depth, z, w ) );
|
||||
TickHandler.INSTANCE.addCallable( w, new MeteoriteSpawn( x, depth, z, w ) );
|
||||
}
|
||||
else
|
||||
TickHandler.instance.addCallable( w, new MeteoriteSpawn( chunkX << 4, 128, chunkZ << 4, w ) );
|
||||
TickHandler.INSTANCE.addCallable( w, new MeteoriteSpawn( chunkX << 4, 128, chunkZ << 4, w ) );
|
||||
}
|
||||
else
|
||||
WorldSettings.getInstance().getCompass().updateArea( w, chunkX, chunkZ );
|
||||
|
|
|
@ -75,7 +75,7 @@ final public class QuartzWorldGen implements IWorldGenerator
|
|||
boolean isCharged = r.nextFloat() > AEConfig.instance.spawnChargedChance;
|
||||
WorldGenMinable whichOre = isCharged ? this.oreCharged : this.oreNormal;
|
||||
|
||||
if ( WorldGenRegistry.instance.isWorldGenEnabled( isCharged ? WorldGenType.ChargedCertusQuartz : WorldGenType.CertusQuartz, w ) )
|
||||
if ( WorldGenRegistry.INSTANCE.isWorldGenEnabled( isCharged ? WorldGenType.ChargedCertusQuartz : WorldGenType.CertusQuartz, w ) )
|
||||
{
|
||||
int cx = chunkX * 16 + r.nextInt( 22 );
|
||||
int cy = r.nextInt( 40 * seaLevel / 64 ) + r.nextInt( 22 * seaLevel / 64 ) + 12 * seaLevel / 64;
|
||||
|
|
|
@ -74,7 +74,7 @@ public class TickHandler
|
|||
|
||||
}
|
||||
|
||||
final public static TickHandler instance = new TickHandler();
|
||||
public static final TickHandler INSTANCE = new TickHandler();
|
||||
|
||||
final private WeakHashMap<World, Queue<Callable>> callQueue = new WeakHashMap<World, Queue<Callable>>();
|
||||
final Queue<Callable> serverQueue = new LinkedList<Callable>();
|
||||
|
|
|
@ -62,7 +62,7 @@ public class IC2 extends BaseModule implements IIC2
|
|||
reg.addNewAttunement( this.getItem( "splitterCableItem" ), TunnelType.IC2_POWER );
|
||||
|
||||
// this is gone?
|
||||
// AEApi.instance().registries().matterCannon().registerAmmo( getItem( "uraniumDrop" ), 238.0289 );
|
||||
// AEApi.INSTANCE().registries().matterCannon().registerAmmo( getItem( "uraniumDrop" ), 238.0289 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -77,7 +77,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
|||
{
|
||||
if ( (outputId.equals( "inscriber" )) && (this.getClass() == NEIInscriberRecipeHandler.class) )
|
||||
{
|
||||
for (InscriberRecipe recipe : Inscribe.recipes)
|
||||
for (InscriberRecipe recipe : Inscribe.RECIPES )
|
||||
{
|
||||
CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
|
@ -93,7 +93,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result)
|
||||
{
|
||||
for (InscriberRecipe recipe : Inscribe.recipes)
|
||||
for (InscriberRecipe recipe : Inscribe.RECIPES )
|
||||
{
|
||||
if ( NEIServerUtils.areStacksSameTypeCrafting( recipe.output, result ) )
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient)
|
||||
{
|
||||
for (InscriberRecipe recipe : Inscribe.recipes)
|
||||
for (InscriberRecipe recipe : Inscribe.RECIPES )
|
||||
{
|
||||
CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe );
|
||||
|
||||
|
|
|
@ -134,11 +134,11 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
|||
}
|
||||
|
||||
// rather simple client side caching.
|
||||
static final WeakHashMap<ItemStack, ItemStack> simpleCache = new WeakHashMap<ItemStack, ItemStack>();
|
||||
static final WeakHashMap<ItemStack, ItemStack> SIMPLE_CACHE = new WeakHashMap<ItemStack, ItemStack>();
|
||||
|
||||
public ItemStack getOutput(ItemStack item)
|
||||
{
|
||||
ItemStack out = simpleCache.get( item );
|
||||
ItemStack out = SIMPLE_CACHE.get( item );
|
||||
if ( out != null )
|
||||
return out;
|
||||
|
||||
|
@ -151,7 +151,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
|||
if ( details == null )
|
||||
return null;
|
||||
|
||||
simpleCache.put( item, out = details.getCondensedOutputs()[0].getItemStack() );
|
||||
SIMPLE_CACHE.put( item, out = details.getCondensedOutputs()[0].getItemStack() );
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
|||
this.setFeature( EnumSet.of( AEFeature.Facades ) );
|
||||
this.setHasSubtypes( true );
|
||||
if ( Platform.isClient() )
|
||||
MinecraftForgeClient.registerItemRenderer( this, BusRenderer.instance );
|
||||
MinecraftForgeClient.registerItemRenderer( this, BusRenderer.INSTANCE );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -146,7 +146,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
|
|||
{
|
||||
if ( b.rotateBlock( w, x, y, z, ForgeDirection.getOrientation( side ) ) )
|
||||
{
|
||||
b.onNeighborBlockChange( w, x, y, z, Platform.air );
|
||||
b.onNeighborBlockChange( w, x, y, z, Platform.AIR );
|
||||
p.swingItem();
|
||||
return !w.isRemote;
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ import appeng.util.item.AEItemStack;
|
|||
public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCell, IItemGroup, IBlockTool, IMouseWheelItem
|
||||
{
|
||||
|
||||
final static Map<Integer, AEColor> oreToColor = new HashMap<Integer, AEColor>();
|
||||
final static Map<Integer, AEColor> ORE_TO_COLOR = new HashMap<Integer, AEColor>();
|
||||
|
||||
static
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||
if ( col == AEColor.Transparent )
|
||||
continue;
|
||||
|
||||
oreToColor.put( OreDictionary.getOreID( "dye" + col.name() ), col );
|
||||
ORE_TO_COLOR.put( OreDictionary.getOreID( "dye" + col.name() ), col );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -229,8 +229,8 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||
|
||||
for ( int oreID : id )
|
||||
{
|
||||
if ( oreToColor.containsKey( oreID ) )
|
||||
return oreToColor.get( oreID );
|
||||
if ( ORE_TO_COLOR.containsKey( oreID ) )
|
||||
return ORE_TO_COLOR.get( oreID );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
|||
|
||||
for ( int x : id )
|
||||
{
|
||||
if ( oreToColor.containsKey( x ) )
|
||||
if ( ORE_TO_COLOR.containsKey( x ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
|||
}
|
||||
else
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
}
|
||||
|
||||
if ( r.Drops != null )
|
||||
|
@ -175,7 +175,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
|||
}
|
||||
else
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
}
|
||||
|
||||
if ( r.Drops != null )
|
||||
|
@ -260,14 +260,14 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
|||
{
|
||||
if ( blockID instanceof BlockTNT )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
( (BlockTNT) blockID ).func_150114_a( w, x, y, z, 1, p );
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( blockID instanceof BlockTinyTNT )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
( (BlockTinyTNT) blockID ).startFuse( w, x, y, z, p );
|
||||
return true;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
|||
|
||||
if ( or.BlockItem == null )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -272,7 +272,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
|||
{
|
||||
int id = pos.entityHit.getEntityId();
|
||||
PlayerColor marker = new PlayerColor( id, col, 20 * 30 );
|
||||
TickHandler.instance.getPlayerColors().put( id, marker );
|
||||
TickHandler.INSTANCE.getPlayerColors().put( id, marker );
|
||||
|
||||
if ( pos.entityHit instanceof EntitySheep )
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
|
|||
ForgeDirection mySide = ForgeDirection.getOrientation( side );
|
||||
if ( b.rotateBlock( world, x, y, z, mySide ) )
|
||||
{
|
||||
b.onNeighborBlockChange( world, x, y, z, Platform.air );
|
||||
b.onNeighborBlockChange( world, x, y, z, Platform.AIR );
|
||||
player.swingItem();
|
||||
return !world.isRemote;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class Grid implements IGrid
|
|||
|
||||
this.postEvent( new MENetworkPostCacheConstruction() );
|
||||
|
||||
TickHandler.instance.addNetwork( this );
|
||||
TickHandler.INSTANCE.addNetwork( this );
|
||||
center.setGrid( this );
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class Grid implements IGrid
|
|||
else
|
||||
{
|
||||
this.pivot = null;
|
||||
TickHandler.instance.removeNetwork( this );
|
||||
TickHandler.INSTANCE.removeNetwork( this );
|
||||
this.myStorage.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import appeng.util.ReadOnlyCollection;
|
|||
public class GridConnection implements IGridConnection, IPathItem
|
||||
{
|
||||
|
||||
final static private MENetworkChannelsChanged event = new MENetworkChannelsChanged();
|
||||
private static final MENetworkChannelsChanged EVENT = new MENetworkChannelsChanged();
|
||||
|
||||
private GridNode sideA;
|
||||
private ForgeDirection fromAtoB;
|
||||
|
@ -234,10 +234,10 @@ public class GridConnection implements IGridConnection, IPathItem
|
|||
this.channelData |= this.channelData << 8;
|
||||
|
||||
if ( this.sideA.getInternalGrid() != null )
|
||||
this.sideA.getInternalGrid().postEventTo( this.sideA, event );
|
||||
this.sideA.getInternalGrid().postEventTo( this.sideA, EVENT );
|
||||
|
||||
if ( this.sideB.getInternalGrid() != null )
|
||||
this.sideB.getInternalGrid().postEventTo( this.sideB, event );
|
||||
this.sideB.getInternalGrid().postEventTo( this.sideB, EVENT );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ import appeng.util.ReadOnlyCollection;
|
|||
|
||||
public class GridNode implements IGridNode, IPathItem
|
||||
{
|
||||
private static final MENetworkChannelsChanged event = new MENetworkChannelsChanged();
|
||||
private static final int[] channelCount = new int[] { 0, 8, 32 };
|
||||
private static final MENetworkChannelsChanged EVENT = new MENetworkChannelsChanged();
|
||||
private static final int[] CHANNEL_COUNT = new int[] { 0, 8, 32 };
|
||||
|
||||
private final List<IGridConnection> connections = new LinkedList<IGridConnection>();
|
||||
private final IGridBlock gridProxy;
|
||||
|
@ -407,7 +407,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||
}
|
||||
catch ( FailedConnection e )
|
||||
{
|
||||
TickHandler.instance.addCallable( node.getWorld(), new MachineSecurityBreak( this ) );
|
||||
TickHandler.INSTANCE.addCallable( node.getWorld(), new MachineSecurityBreak( this ) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||
}
|
||||
catch ( FailedConnection e )
|
||||
{
|
||||
TickHandler.instance.addCallable( node.getWorld(), new MachineSecurityBreak( this ) );
|
||||
TickHandler.INSTANCE.addCallable( node.getWorld(), new MachineSecurityBreak( this ) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||
|
||||
public int getMaxChannels()
|
||||
{
|
||||
return channelCount[this.compressedData & 0x03];
|
||||
return CHANNEL_COUNT[this.compressedData & 0x03];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -590,7 +590,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||
this.channelData |= this.channelData << 8;
|
||||
|
||||
if ( this.getInternalGrid() != null )
|
||||
this.getInternalGrid().postEventTo( this, event );
|
||||
this.getInternalGrid().postEventTo( this, EVENT );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,14 +36,14 @@ import appeng.core.AELog;
|
|||
|
||||
public class NetworkEventBus
|
||||
{
|
||||
private static final Collection<Class> readClasses = new HashSet<Class>();
|
||||
private static final Map<Class<? extends MENetworkEvent>, Map<Class, MENetworkEventInfo>> events = new HashMap<Class<? extends MENetworkEvent>, Map<Class, MENetworkEventInfo>>();
|
||||
private static final Collection<Class> READ_CLASSES = new HashSet<Class>();
|
||||
private static final Map<Class<? extends MENetworkEvent>, Map<Class, MENetworkEventInfo>> EVENTS = new HashMap<Class<? extends MENetworkEvent>, Map<Class, MENetworkEventInfo>>();
|
||||
|
||||
public void readClass( Class listAs, Class c )
|
||||
{
|
||||
if ( readClasses.contains( c ) )
|
||||
if ( READ_CLASSES.contains( c ) )
|
||||
return;
|
||||
readClasses.add( c );
|
||||
READ_CLASSES.add( c );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -58,9 +58,9 @@ public class NetworkEventBus
|
|||
if ( MENetworkEvent.class.isAssignableFrom( types[0] ) )
|
||||
{
|
||||
|
||||
Map<Class, MENetworkEventInfo> classEvents = events.get( types[0] );
|
||||
Map<Class, MENetworkEventInfo> classEvents = EVENTS.get( types[0] );
|
||||
if ( classEvents == null )
|
||||
events.put( types[0], classEvents = new HashMap<Class, MENetworkEventInfo>() );
|
||||
EVENTS.put( types[0], classEvents = new HashMap<Class, MENetworkEventInfo>() );
|
||||
|
||||
MENetworkEventInfo thisEvent = classEvents.get( listAs );
|
||||
if ( thisEvent == null )
|
||||
|
@ -86,7 +86,7 @@ public class NetworkEventBus
|
|||
|
||||
public MENetworkEvent postEvent( Grid g, MENetworkEvent e )
|
||||
{
|
||||
Map<Class, MENetworkEventInfo> subscribers = events.get( e.getClass() );
|
||||
Map<Class, MENetworkEventInfo> subscribers = EVENTS.get( e.getClass() );
|
||||
int x = 0;
|
||||
|
||||
try
|
||||
|
@ -122,7 +122,7 @@ public class NetworkEventBus
|
|||
|
||||
public MENetworkEvent postEventTo( Grid grid, GridNode node, MENetworkEvent e )
|
||||
{
|
||||
Map<Class, MENetworkEventInfo> subscribers = events.get( e.getClass() );
|
||||
Map<Class, MENetworkEventInfo> subscribers = EVENTS.get( e.getClass() );
|
||||
int x = 0;
|
||||
|
||||
try
|
||||
|
|
|
@ -332,7 +332,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
|||
}
|
||||
}
|
||||
|
||||
static final Comparator<ICraftingPatternDetails> comp = new Comparator<ICraftingPatternDetails>()
|
||||
static final Comparator<ICraftingPatternDetails> COMPARATOR = new Comparator<ICraftingPatternDetails>()
|
||||
{
|
||||
@Override
|
||||
public int compare(ICraftingPatternDetails firstDetail, ICraftingPatternDetails nextDetail)
|
||||
|
@ -374,7 +374,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
|||
|
||||
if ( methods == null )
|
||||
{
|
||||
tmpCraft.put( out, methods = new TreeSet<ICraftingPatternDetails>( comp ) );
|
||||
tmpCraft.put( out, methods = new TreeSet<ICraftingPatternDetails>( COMPARATOR ) );
|
||||
}
|
||||
|
||||
methods.add( details );
|
||||
|
@ -604,7 +604,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
|||
return i == 1;
|
||||
}
|
||||
|
||||
final public static ExecutorService craftingPool;
|
||||
final public static ExecutorService CRAFTING_POOL;
|
||||
|
||||
static
|
||||
{
|
||||
|
@ -618,7 +618,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
|||
|
||||
};
|
||||
|
||||
craftingPool = Executors.newCachedThreadPool( factory );
|
||||
CRAFTING_POOL = Executors.newCachedThreadPool( factory );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -631,7 +631,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
|||
|
||||
CraftingJob job = new CraftingJob( world, grid, actionSrc, slotItem, cb );
|
||||
|
||||
return craftingPool.submit( job, (ICraftingJob) job );
|
||||
return CRAFTING_POOL.submit( job, (ICraftingJob) job );
|
||||
}
|
||||
|
||||
public boolean hasCpu(ICraftingCPU cpu)
|
||||
|
|
|
@ -64,7 +64,7 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
|
|||
this.myChannel = chan;
|
||||
}
|
||||
|
||||
final static public LinkedList depth = new LinkedList();
|
||||
final static public LinkedList DEPTH = new LinkedList();
|
||||
|
||||
@Override
|
||||
protected void postChangesToListeners(Iterable<T> changes, BaseActionSource src)
|
||||
|
@ -74,10 +74,10 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
|
|||
|
||||
protected void postChange(boolean Add, Iterable<T> changes, BaseActionSource src)
|
||||
{
|
||||
if ( depth.contains( this ) )
|
||||
if ( DEPTH.contains( this ) )
|
||||
return;
|
||||
|
||||
depth.push( this );
|
||||
DEPTH.push( this );
|
||||
|
||||
this.sendEvent = true;
|
||||
this.notifyListenersOfChange( changes, src );
|
||||
|
@ -113,7 +113,7 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
|
|||
}
|
||||
}
|
||||
|
||||
Object last = depth.pop();
|
||||
Object last = DEPTH.pop();
|
||||
if ( last != this )
|
||||
throw new RuntimeException( "Invalid Access to Networked Storage API detected." );
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||
final Map<ICraftingPatternDetails, TaskProgress> tasks = new HashMap<ICraftingPatternDetails, TaskProgress>();
|
||||
IItemList<IAEItemStack> waitingFor = AEApi.instance().storage().createItemList();
|
||||
|
||||
// instance sate
|
||||
// INSTANCE sate
|
||||
final private LinkedList<TileCraftingTile> tiles = new LinkedList<TileCraftingTile>();
|
||||
final private LinkedList<TileCraftingTile> storage = new LinkedList<TileCraftingTile>();
|
||||
final private LinkedList<TileCraftingMonitorTile> status = new LinkedList<TileCraftingMonitorTile>();
|
||||
|
|
|
@ -166,7 +166,7 @@ public class AENetworkProxy implements IGridBlock
|
|||
public void validate()
|
||||
{
|
||||
if ( this.gp instanceof AEBaseTile )
|
||||
TickHandler.instance.addInit( (AEBaseTile) this.gp );
|
||||
TickHandler.INSTANCE.addInit( (AEBaseTile) this.gp );
|
||||
}
|
||||
|
||||
public void onChunkUnload()
|
||||
|
|
|
@ -369,18 +369,18 @@ public class CellInventory implements ICellInventory
|
|||
return 8 - div;
|
||||
}
|
||||
|
||||
private static final HashSet<Integer> blackList = new HashSet<Integer>();
|
||||
private static final HashSet<Integer> BLACK_LIST = new HashSet<Integer>();
|
||||
|
||||
public static void addBasicBlackList(int itemID, int Meta)
|
||||
{
|
||||
blackList.add( (Meta << Platform.DEF_OFFSET) | itemID );
|
||||
BLACK_LIST.add( ( Meta << Platform.DEF_OFFSET ) | itemID );
|
||||
}
|
||||
|
||||
public static boolean isBlackListed(IAEItemStack input)
|
||||
{
|
||||
if ( blackList.contains( (OreDictionary.WILDCARD_VALUE << Platform.DEF_OFFSET) | Item.getIdFromItem( input.getItem() ) ) )
|
||||
if ( BLACK_LIST.contains( (OreDictionary.WILDCARD_VALUE << Platform.DEF_OFFSET) | Item.getIdFromItem( input.getItem() ) ) )
|
||||
return true;
|
||||
return blackList.contains( (input.getItemDamage() << Platform.DEF_OFFSET) | Item.getIdFromItem( input.getItem() ) );
|
||||
return BLACK_LIST.contains( (input.getItemDamage() << Platform.DEF_OFFSET) | Item.getIdFromItem( input.getItem() ) );
|
||||
}
|
||||
|
||||
private boolean isEmpty(IMEInventory meInventory)
|
||||
|
|
|
@ -45,7 +45,7 @@ import appeng.util.ItemSorters;
|
|||
public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHandler<T>
|
||||
{
|
||||
|
||||
private final static Comparator<Integer> prioritySorter = new Comparator<Integer>() {
|
||||
private final static Comparator<Integer> PRIORITY_SORTER = new Comparator<Integer>() {
|
||||
|
||||
@Override
|
||||
public int compare(Integer o1, Integer o2)
|
||||
|
@ -64,7 +64,7 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
|||
public NetworkInventoryHandler(StorageChannel chan, SecurityCache security) {
|
||||
this.myChannel = chan;
|
||||
this.security = security;
|
||||
this.priorityInventory = new ConcurrentSkipListMap<Integer, List<IMEInventoryHandler<T>>>( prioritySorter ); // TreeMultimap.create( prioritySorter, hashSorter );
|
||||
this.priorityInventory = new ConcurrentSkipListMap<Integer, List<IMEInventoryHandler<T>>>( PRIORITY_SORTER ); // TreeMultimap.create( prioritySorter, hashSorter );
|
||||
}
|
||||
|
||||
public void addNewStorage(IMEInventoryHandler<T> h)
|
||||
|
@ -79,12 +79,12 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
|||
|
||||
static int currentPass = 0;
|
||||
int myPass = 0;
|
||||
static final ThreadLocal<LinkedList> depthMod = new ThreadLocal<LinkedList>();
|
||||
static final ThreadLocal<LinkedList> depthSim = new ThreadLocal<LinkedList>();
|
||||
static final ThreadLocal<LinkedList> DEPTH_MOD = new ThreadLocal<LinkedList>();
|
||||
static final ThreadLocal<LinkedList> DEPTH_SIM = new ThreadLocal<LinkedList>();
|
||||
|
||||
private LinkedList getDepth(Actionable type)
|
||||
{
|
||||
ThreadLocal<LinkedList> depth = type == Actionable.MODULATE ? depthMod : depthSim;
|
||||
ThreadLocal<LinkedList> depth = type == Actionable.MODULATE ? DEPTH_MOD : DEPTH_SIM;
|
||||
|
||||
LinkedList s = depth.get();
|
||||
|
||||
|
|
|
@ -341,11 +341,11 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
|||
return null;
|
||||
}
|
||||
|
||||
private static final ThreadLocal<Boolean> isLoading = new ThreadLocal<Boolean>();
|
||||
private static final ThreadLocal<Boolean> IS_LOADING = new ThreadLocal<Boolean>();
|
||||
|
||||
public static boolean isLoading()
|
||||
{
|
||||
Boolean is = isLoading.get();
|
||||
Boolean is = IS_LOADING.get();
|
||||
return is != null && is;
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
|||
return;
|
||||
|
||||
this.inWorld = true;
|
||||
isLoading.set( true );
|
||||
IS_LOADING.set( true );
|
||||
|
||||
TileEntity te = this.getTile();
|
||||
|
||||
|
@ -403,7 +403,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
|||
|
||||
this.partChanged();
|
||||
|
||||
isLoading.set( false );
|
||||
IS_LOADING.set( false );
|
||||
}
|
||||
|
||||
public void removeFromWorld()
|
||||
|
|
|
@ -290,7 +290,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
|||
if ( eatForReal )
|
||||
{
|
||||
energy.extractAEPower( total, Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||
w.setBlock( x, y, z, Platform.air, 0, 3 );
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox( x - 0.2, y - 0.2, z - 0.2, x + 1.2, y + 1.2, z + 1.2 );
|
||||
for (Object ei : w.getEntitiesWithinAABB( EntityItem.class, box ))
|
||||
|
@ -325,7 +325,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
|||
else
|
||||
{
|
||||
this.breaking = true;
|
||||
TickHandler.instance.addCallable( this.tile.getWorldObj(), this );
|
||||
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this );
|
||||
return TickRateModulation.URGENT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class InvLayerData
|
|||
{
|
||||
|
||||
// a simple empty array for empty stuff..
|
||||
private final static int[] nullSides = new int[] {};
|
||||
private final static int[] NULL_SIDES = new int[] {};
|
||||
|
||||
// cache of inventory state.
|
||||
final private int[][] sides;
|
||||
|
@ -118,7 +118,7 @@ public class InvLayerData
|
|||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
{
|
||||
if ( this.sides == null || side < 0 || side > 5 )
|
||||
return nullSides;
|
||||
return NULL_SIDES;
|
||||
return this.sides[side];
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import appeng.api.parts.LayerBase;
|
|||
public class LayerIFluidHandler extends LayerBase implements IFluidHandler
|
||||
{
|
||||
|
||||
static final FluidTankInfo[] emptyList = new FluidTankInfo[0];
|
||||
static final FluidTankInfo[] EMPTY_LIST = new FluidTankInfo[0];
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
|
||||
|
@ -82,7 +82,7 @@ public class LayerIFluidHandler extends LayerBase implements IFluidHandler
|
|||
IPart part = this.getPart( from );
|
||||
if ( part instanceof IFluidHandler )
|
||||
return ((IFluidHandler) part).getTankInfo( from );
|
||||
return emptyList;
|
||||
return EMPTY_LIST;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
|
|||
{
|
||||
|
||||
// a simple empty array for empty stuff..
|
||||
private final static int[] nullSides = new int[] {};
|
||||
private final static int[] NULL_SIDES = new int[] {};
|
||||
|
||||
InvLayerData invLayer = null;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
|
|||
}
|
||||
else
|
||||
{
|
||||
sideData = new int[][] { nullSides, nullSides, nullSides, nullSides, nullSides, nullSides };
|
||||
sideData = new int[][] { NULL_SIDES, NULL_SIDES, NULL_SIDES, NULL_SIDES, NULL_SIDES, NULL_SIDES };
|
||||
slots = new ArrayList<InvSot>( Collections.nCopies( slotCount, (InvSot) null ) );
|
||||
|
||||
int offsetForLayer = 0;
|
||||
|
@ -195,7 +195,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
|
|||
if ( this.invLayer != null )
|
||||
return this.invLayer.getAccessibleSlotsFromSide( side );
|
||||
|
||||
return nullSides;
|
||||
return NULL_SIDES;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -266,11 +266,11 @@ public class PartDenseCable extends PartCable
|
|||
* rh.getBlock(); FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST ); ico.setFlip(
|
||||
* false, true ); }
|
||||
*
|
||||
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I(
|
||||
* Tessellator.INSTANCE.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.INSTANCE.setColorOpaque_I(
|
||||
* myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock)
|
||||
* rh.getBlock(), x, y, z, renderer );
|
||||
*
|
||||
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
|
||||
* Tessellator.INSTANCE.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
|
||||
* secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
||||
*
|
||||
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
|
||||
|
|
|
@ -112,7 +112,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
|||
}
|
||||
|
||||
/*
|
||||
* if ( AppEng.instance.isIntegrationEnabled( "TE" ) ) { ITE thermal = (ITE) AppEng.instance.getIntegration(
|
||||
* if ( AppEng.INSTANCE.isIntegrationEnabled( "TE" ) ) { ITE thermal = (ITE) AppEng.INSTANCE.getIntegration(
|
||||
* "TE" ); if ( thermal != null ) { if ( thermal.isPipe( te, side.getOpposite() ) ) { try { output = new
|
||||
* WrapperTEPipe( te, side.getOpposite() ); } catch (Throwable ignore) { } } } }
|
||||
*/
|
||||
|
|
|
@ -42,8 +42,8 @@ import appeng.me.GridAccessException;
|
|||
public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFluidHandler
|
||||
{
|
||||
|
||||
private final static FluidTankInfo[] activeTank = new FluidTankInfo[] { new FluidTankInfo( null, 10000 ) };
|
||||
private final static FluidTankInfo[] inactiveTank = new FluidTankInfo[] { new FluidTankInfo( null, 0 ) };
|
||||
private final static FluidTankInfo[] ACTIVE_TANK = new FluidTankInfo[] { new FluidTankInfo( null, 10000 ) };
|
||||
private final static FluidTankInfo[] INACTIVE_TANK = new FluidTankInfo[] { new FluidTankInfo( null, 0 ) };
|
||||
|
||||
@Override
|
||||
public TunnelType getTunnelType()
|
||||
|
@ -61,21 +61,21 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
|
|||
{
|
||||
PartP2PLiquids tun = this.getInput();
|
||||
if ( tun != null )
|
||||
return activeTank;
|
||||
return ACTIVE_TANK;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( !this.getOutputs().isEmpty() )
|
||||
return activeTank;
|
||||
return ACTIVE_TANK;
|
||||
}
|
||||
catch (GridAccessException e)
|
||||
{
|
||||
// :(
|
||||
}
|
||||
}
|
||||
return inactiveTank;
|
||||
return INACTIVE_TANK;
|
||||
}
|
||||
|
||||
IFluidHandler cachedTank;
|
||||
|
@ -151,14 +151,14 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
|
|||
return null;
|
||||
}
|
||||
|
||||
static final ThreadLocal<Stack<PartP2PLiquids>> depth = new ThreadLocal<Stack<PartP2PLiquids>>();
|
||||
static final ThreadLocal<Stack<PartP2PLiquids>> DEPTH = new ThreadLocal<Stack<PartP2PLiquids>>();
|
||||
|
||||
private Stack<PartP2PLiquids> getDepth()
|
||||
{
|
||||
Stack<PartP2PLiquids> s = depth.get();
|
||||
Stack<PartP2PLiquids> s = DEPTH.get();
|
||||
|
||||
if ( s == null )
|
||||
depth.set( s = new Stack<PartP2PLiquids>() );
|
||||
DEPTH.set( s = new Stack<PartP2PLiquids>() );
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
|||
|
||||
protected void QueueTunnelDrain(PowerUnits unit, double f)
|
||||
{
|
||||
double ae_to_tax = unit.convertTo( PowerUnits.AE, f * AEConfig.TunnelPowerLoss );
|
||||
double ae_to_tax = unit.convertTo( PowerUnits.AE, f * AEConfig.TUNNEL_POWER_LOSS );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -145,19 +145,19 @@ public class PartP2PTunnelME extends PartP2PTunnel<PartP2PTunnelME> implements I
|
|||
if ( !this.proxy.getEnergy().isNetworkPowered() )
|
||||
{
|
||||
this.connection.markDestroy();
|
||||
TickHandler.instance.addCallable( this.tile.getWorldObj(), this.connection );
|
||||
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.connection );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( this.proxy.isActive() )
|
||||
{
|
||||
this.connection.markCreate();
|
||||
TickHandler.instance.addCallable( this.tile.getWorldObj(), this.connection );
|
||||
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.connection );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.connection.markDestroy();
|
||||
TickHandler.instance.addCallable( this.tile.getWorldObj(), this.connection );
|
||||
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.connection );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,9 +59,9 @@ public class Inscribe implements ICraftHandler, IWebsiteSerializer
|
|||
|
||||
public boolean usePlates = false;
|
||||
|
||||
public static final HashSet<ItemStack> plates = new HashSet<ItemStack>();
|
||||
public static final HashSet<ItemStack> inputs = new HashSet<ItemStack>();
|
||||
public static final LinkedList<InscriberRecipe> recipes = new LinkedList<InscriberRecipe>();
|
||||
public static final HashSet<ItemStack> PLATES = new HashSet<ItemStack>();
|
||||
public static final HashSet<ItemStack> INPUTS = new HashSet<ItemStack>();
|
||||
public static final LinkedList<InscriberRecipe> RECIPES = new LinkedList<InscriberRecipe>();
|
||||
|
||||
IIngredient imprintable;
|
||||
|
||||
|
@ -97,17 +97,17 @@ public class Inscribe implements ICraftHandler, IWebsiteSerializer
|
|||
public void register() throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
if ( this.imprintable != null )
|
||||
Collections.addAll( inputs, this.imprintable.getItemStackSet() );
|
||||
Collections.addAll( INPUTS, this.imprintable.getItemStackSet() );
|
||||
|
||||
if ( this.plateA != null )
|
||||
Collections.addAll( plates, this.plateA.getItemStackSet() );
|
||||
Collections.addAll( PLATES, this.plateA.getItemStackSet() );
|
||||
|
||||
if ( this.plateB != null )
|
||||
Collections.addAll( plates, this.plateB.getItemStackSet() );
|
||||
Collections.addAll( PLATES, this.plateB.getItemStackSet() );
|
||||
|
||||
InscriberRecipe ir = new InscriberRecipe( this.imprintable.getItemStackSet(), this.plateA == null ? null : this.plateA.getItemStack(), this.plateB == null ? null
|
||||
: this.plateB.getItemStack(), this.output.getItemStack(), this.usePlates );
|
||||
recipes.add( ir );
|
||||
RECIPES.add( ir );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,7 +33,7 @@ import appeng.recipes.game.IRecipeBakeable;
|
|||
public class OreDictionaryHandler
|
||||
{
|
||||
|
||||
public static final OreDictionaryHandler instance = new OreDictionaryHandler();
|
||||
public static final OreDictionaryHandler INSTANCE = new OreDictionaryHandler();
|
||||
|
||||
private final List<IOreListener> ol = new ArrayList<IOreListener>();
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class CachedPlane
|
|||
public void setBlockIDWithMetadata(int y, Object[] blk)
|
||||
{
|
||||
if ( blk[0] == CachedPlane.this.matrixFrame )
|
||||
blk[0] = Platform.air;
|
||||
blk[0] = Platform.AIR;
|
||||
|
||||
ExtendedBlockStorage extendedBlockStorage = this.storage[y >> 4];
|
||||
extendedBlockStorage.func_150818_a( this.x, y & 15, this.z, (Block) blk[0] );
|
||||
|
@ -205,8 +205,8 @@ public class CachedPlane
|
|||
if ( blk != null && blk.isAir( c.worldObj, te.xCoord, te.yCoord, te.zCoord )
|
||||
&& blk.isReplaceable( c.worldObj, te.xCoord, te.yCoord, te.zCoord ) )
|
||||
{
|
||||
c.worldObj.setBlock( te.xCoord, te.yCoord, te.zCoord, Platform.air );
|
||||
c.worldObj.notifyBlocksOfNeighborChange( te.xCoord, te.yCoord, te.zCoord, Platform.air );
|
||||
c.worldObj.setBlock( te.xCoord, te.yCoord, te.zCoord, Platform.AIR );
|
||||
c.worldObj.notifyBlocksOfNeighborChange( te.xCoord, te.yCoord, te.zCoord, Platform.AIR );
|
||||
}
|
||||
else
|
||||
this.myColumns[te.xCoord - minX][te.zCoord - minZ].setSkip( te.yCoord );
|
||||
|
|
|
@ -34,15 +34,15 @@ import appeng.core.AEConfig;
|
|||
public class StorageChunkProvider extends ChunkProviderGenerate
|
||||
{
|
||||
|
||||
final static Block[] blocks;
|
||||
final static Block[] BLOCKS;
|
||||
|
||||
static {
|
||||
|
||||
blocks = new Block[255 * 256];
|
||||
BLOCKS = new Block[255 * 256];
|
||||
|
||||
Block matrixFrame = AEApi.instance().blocks().blockMatrixFrame.block();
|
||||
for (int x = 0; x < blocks.length; x++)
|
||||
blocks[x] = matrixFrame;
|
||||
for (int x = 0; x < BLOCKS.length; x++)
|
||||
BLOCKS[x] = matrixFrame;
|
||||
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class StorageChunkProvider extends ChunkProviderGenerate
|
|||
@Override
|
||||
public Chunk provideChunk(int x, int z)
|
||||
{
|
||||
Chunk chunk = new Chunk( this.w, blocks, x, z );
|
||||
Chunk chunk = new Chunk( this.w, BLOCKS, x, z );
|
||||
|
||||
byte[] biomes = chunk.getBiomeArray();
|
||||
AEConfig config = AEConfig.instance;
|
||||
|
|
|
@ -63,7 +63,7 @@ public class StorageHelper
|
|||
public void visit(int x, int y, int z)
|
||||
{
|
||||
Block blk = this.dst.getBlock( x, y, z );
|
||||
blk.onNeighborBlockChange( this.dst, x, y, z, Platform.air );
|
||||
blk.onNeighborBlockChange( this.dst, x, y, z, Platform.AIR );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,10 +317,10 @@ public class StorageHelper
|
|||
}
|
||||
|
||||
for (WorldCoord wc : cDst.updates)
|
||||
cDst.world.notifyBlockOfNeighborChange( wc.x, wc.y, wc.z, Platform.air );
|
||||
cDst.world.notifyBlockOfNeighborChange( wc.x, wc.y, wc.z, Platform.AIR );
|
||||
|
||||
for (WorldCoord wc : cSrc.updates)
|
||||
cSrc.world.notifyBlockOfNeighborChange( wc.x, wc.y, wc.z, Platform.air );
|
||||
cSrc.world.notifyBlockOfNeighborChange( wc.x, wc.y, wc.z, Platform.AIR );
|
||||
|
||||
this.transverseEdges( x - 1, y - 1, z - 1, x + scaleX + 1, y + scaleY + 1, z + scaleZ + 1, new TriggerUpdates( src ) );
|
||||
this.transverseEdges( i - 1, j - 1, k - 1, i + scaleX + 1, j + scaleY + 1, k + scaleZ + 1, new TriggerUpdates( dst ) );
|
||||
|
|
|
@ -58,22 +58,22 @@ import appeng.util.SettingsFrom;
|
|||
public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, ICustomNameObject
|
||||
{
|
||||
|
||||
static private final HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>> handlers = new HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>>();
|
||||
static private final HashMap<Class, ItemStackSrc> myItem = new HashMap<Class, ItemStackSrc>();
|
||||
static private final HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>> HANDLERS = new HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>>();
|
||||
static private final HashMap<Class, ItemStackSrc> ITEM_STACKS = new HashMap<Class, ItemStackSrc>();
|
||||
|
||||
private ForgeDirection forward = ForgeDirection.UNKNOWN;
|
||||
private ForgeDirection up = ForgeDirection.UNKNOWN;
|
||||
|
||||
public static final ThreadLocal<WeakReference<AEBaseTile>> dropNoItems = new ThreadLocal<WeakReference<AEBaseTile>>();
|
||||
public static final ThreadLocal<WeakReference<AEBaseTile>> DROP_NO_ITEMS = new ThreadLocal<WeakReference<AEBaseTile>>();
|
||||
|
||||
public void disableDrops()
|
||||
{
|
||||
dropNoItems.set( new WeakReference<AEBaseTile>( this ) );
|
||||
DROP_NO_ITEMS.set( new WeakReference<AEBaseTile>( this ) );
|
||||
}
|
||||
|
||||
public boolean dropItems()
|
||||
{
|
||||
WeakReference<AEBaseTile> what = dropNoItems.get();
|
||||
WeakReference<AEBaseTile> what = DROP_NO_ITEMS.get();
|
||||
return what == null || what.get() != this;
|
||||
}
|
||||
|
||||
|
@ -92,12 +92,12 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
|||
|
||||
static public void registerTileItem(Class c, ItemStackSrc wat)
|
||||
{
|
||||
myItem.put( c, wat );
|
||||
ITEM_STACKS.put( c, wat );
|
||||
}
|
||||
|
||||
protected ItemStack getItemFromTile(Object obj)
|
||||
{
|
||||
ItemStackSrc src = myItem.get( obj.getClass() );
|
||||
ItemStackSrc src = ITEM_STACKS.get( obj.getClass() );
|
||||
if ( src == null )
|
||||
return null;
|
||||
return src.stack( 1 );
|
||||
|
@ -112,11 +112,11 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
|||
protected List<AETileEventHandler> getHandlerListFor(TileEventType type)
|
||||
{
|
||||
Class clz = this.getClass();
|
||||
EnumMap<TileEventType, List<AETileEventHandler>> handlerSet = handlers.get( clz );
|
||||
EnumMap<TileEventType, List<AETileEventHandler>> handlerSet = HANDLERS.get( clz );
|
||||
|
||||
if ( handlerSet == null )
|
||||
{
|
||||
handlers.put( clz, handlerSet = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class ) );
|
||||
HANDLERS.put( clz, handlerSet = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class ) );
|
||||
|
||||
for (Method m : clz.getMethods())
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue