Compare commits
36 Commits
rv2.beta.4
...
rv2.beta.8
| Author | SHA1 | Date | |
|---|---|---|---|
| ef3cb0a455 | |||
| be82dfec1f | |||
| 8eb5ad01cf | |||
| a3c5e4cb05 | |||
| c35e057d96 | |||
| a5a80b58d5 | |||
| c10c809c9e | |||
| 3d2bd84450 | |||
| 2776b2d430 | |||
| f0d04699d1 | |||
| afbce77d0b | |||
| 3a5844a0fe | |||
| e2798aaaf4 | |||
| 99d86511a1 | |||
| a8c920932e | |||
| bd9eaa2d48 | |||
| c6f232ab63 | |||
| 29a4464e18 | |||
| 63e375f208 | |||
| 2f51568772 | |||
| 59adde7c6b | |||
| 52c512635d | |||
| e0175bac98 | |||
| 63ab2bbad0 | |||
| 33b04f6ff9 | |||
| 236f6f72e3 | |||
| 8920d949d2 | |||
| eed0c11d7f | |||
| 8179259afa | |||
| e38293a291 | |||
| 15ba197083 | |||
| ff903e65a5 | |||
| 305fc6c7f2 | |||
| ada69b9a95 | |||
| 97dabc4a5c | |||
| fec00fee17 |
+1
-1
@@ -18,7 +18,7 @@ fmp_version=1.1.0.311
|
||||
code_chicken_lib_version=1.1.1.105
|
||||
code_chicken_core_version=1.0.4.29
|
||||
nei_version=1.0.3.66
|
||||
waila_version=1.5.5_1.7.10
|
||||
waila_version=1.5.7a_1.7.10
|
||||
|
||||
#########################################################
|
||||
# API Stubs #
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -30,27 +30,27 @@ public enum AccessRestriction
|
||||
private final int permissionBit;
|
||||
|
||||
private AccessRestriction(int v) {
|
||||
permissionBit = v;
|
||||
this.permissionBit = v;
|
||||
}
|
||||
|
||||
public boolean hasPermission(AccessRestriction ar)
|
||||
{
|
||||
return (permissionBit & ar.permissionBit) == ar.permissionBit;
|
||||
return ( this.permissionBit & ar.permissionBit) == ar.permissionBit;
|
||||
}
|
||||
|
||||
public AccessRestriction restrictPermissions(AccessRestriction ar)
|
||||
{
|
||||
return getPermByBit( permissionBit & ar.permissionBit);
|
||||
return this.getPermByBit( this.permissionBit & ar.permissionBit);
|
||||
}
|
||||
|
||||
public AccessRestriction addPermissions(AccessRestriction ar)
|
||||
{
|
||||
return getPermByBit( permissionBit | ar.permissionBit);
|
||||
return this.getPermByBit( this.permissionBit | ar.permissionBit);
|
||||
}
|
||||
|
||||
public AccessRestriction removePermissions(AccessRestriction ar)
|
||||
{
|
||||
return getPermByBit( permissionBit & (~ar.permissionBit) );
|
||||
return this.getPermByBit( this.permissionBit & (~ar.permissionBit) );
|
||||
}
|
||||
|
||||
private AccessRestriction getPermByBit(int bit)
|
||||
|
||||
@@ -32,13 +32,13 @@ public enum FuzzyMode
|
||||
final public float percentage;
|
||||
|
||||
private FuzzyMode(float p) {
|
||||
percentage = p;
|
||||
breakPoint = p / 100.0f;
|
||||
this.percentage = p;
|
||||
this.breakPoint = p / 100.0f;
|
||||
}
|
||||
|
||||
public int calculateBreakPoint(int maxDamage)
|
||||
{
|
||||
return (int) ((percentage * maxDamage) / 100.0f);
|
||||
return (int) (( this.percentage * maxDamage) / 100.0f);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,11 +34,11 @@ public enum PowerMultiplier
|
||||
|
||||
public double multiply(double in)
|
||||
{
|
||||
return in * multiplier;
|
||||
return in * this.multiplier;
|
||||
}
|
||||
|
||||
public double divide(double in)
|
||||
{
|
||||
return in / multiplier;
|
||||
return in / this.multiplier;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public enum PowerUnits
|
||||
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
|
||||
|
||||
private PowerUnits(String un) {
|
||||
unlocalizedName = un;
|
||||
this.unlocalizedName = un;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,7 +59,7 @@ public enum PowerUnits
|
||||
*/
|
||||
public double convertTo(PowerUnits target, double value)
|
||||
{
|
||||
return (value * conversionRatio) / target.conversionRatio;
|
||||
return (value * this.conversionRatio ) / target.conversionRatio;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,15 +56,15 @@ public enum SecurityPermissions
|
||||
*/
|
||||
SECURITY;
|
||||
|
||||
final private String unlocalizedName = "gui.appliedenergistics2.security." + name().toLowerCase();
|
||||
final private String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
|
||||
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return unlocalizedName + ".name";
|
||||
return this.unlocalizedName + ".name";
|
||||
}
|
||||
|
||||
public String getUnlocalizedTip()
|
||||
{
|
||||
return unlocalizedName + ".tip";
|
||||
return this.unlocalizedName + ".tip";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,47 +23,50 @@
|
||||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
|
||||
public enum Settings
|
||||
{
|
||||
LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )),
|
||||
LEVEL_EMITTER_MODE( EnumSet.allOf( LevelEmitterMode.class ) ),
|
||||
|
||||
REDSTONE_EMITTER(EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL )), REDSTONE_CONTROLLED(EnumSet.allOf( RedstoneMode.class )),
|
||||
REDSTONE_EMITTER( EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL ) ), REDSTONE_CONTROLLED( EnumSet.allOf( RedstoneMode.class ) ),
|
||||
|
||||
CONDENSER_OUTPUT(EnumSet.allOf( CondenserOutput.class )),
|
||||
CONDENSER_OUTPUT( EnumSet.allOf( CondenserOutput.class ) ),
|
||||
|
||||
POWER_UNITS(EnumSet.allOf( PowerUnits.class )), ACCESS(EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE )),
|
||||
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ), ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
|
||||
|
||||
SORT_DIRECTION(EnumSet.allOf( SortDir.class )), SORT_BY(EnumSet.allOf( SortOrder.class )),
|
||||
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ), SORT_BY( EnumSet.allOf( SortOrder.class ) ),
|
||||
|
||||
SEARCH_TOOLTIPS(EnumSet.of( YesNo.YES, YesNo.NO )), VIEW_MODE(EnumSet.allOf( ViewItems.class )), SEARCH_MODE(EnumSet.allOf( SearchBoxMode.class )),
|
||||
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ), VIEW_MODE( EnumSet.allOf( ViewItems.class ) ), SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
|
||||
|
||||
ACTIONS(EnumSet.allOf( ActionItems.class )), IO_DIRECTION(EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT )),
|
||||
ACTIONS( EnumSet.allOf( ActionItems.class ) ), IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
|
||||
|
||||
BLOCK(EnumSet.of( YesNo.YES, YesNo.NO )), OPERATION_MODE(EnumSet.allOf( OperationMode.class )),
|
||||
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ), OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
|
||||
|
||||
FULLNESS_MODE(EnumSet.allOf( FullnessMode.class )), CRAFT_ONLY(EnumSet.of( YesNo.YES, YesNo.NO )),
|
||||
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ), CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
FUZZY_MODE(EnumSet.allOf( FuzzyMode.class )), LEVEL_TYPE(EnumSet.allOf( LevelType.class )),
|
||||
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ), LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
|
||||
|
||||
TERMINAL_STYLE(EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL )), COPY_MODE(EnumSet.allOf( CopyMode.class )),
|
||||
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ), COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
|
||||
|
||||
INTERFACE_TERMINAL(EnumSet.of( YesNo.YES, YesNo.NO )), CRAFT_VIA_REDSTONE(EnumSet.of( YesNo.YES, YesNo.NO )),
|
||||
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
STORAGE_FILTER(EnumSet.allOf( StorageFilter.class ));
|
||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
||||
|
||||
private EnumSet values;
|
||||
private final EnumSet values;
|
||||
|
||||
public EnumSet getPossibleValues()
|
||||
{
|
||||
return values;
|
||||
return this.values;
|
||||
}
|
||||
|
||||
private Settings(EnumSet set) {
|
||||
private Settings( EnumSet set )
|
||||
{
|
||||
if ( set == null || set.isEmpty() )
|
||||
throw new RuntimeException( "Invalid configuration." );
|
||||
values = set;
|
||||
this.values = set;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ public class LocatableEventAnnounce extends Event
|
||||
final public LocatableEvent change;
|
||||
|
||||
public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) {
|
||||
target = o;
|
||||
change = ev;
|
||||
this.target = o;
|
||||
this.change = ev;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TransitionResult
|
||||
public final double energyUsage;
|
||||
|
||||
public TransitionResult(boolean _success, double power) {
|
||||
success = _success;
|
||||
energyUsage = power;
|
||||
this.success = _success;
|
||||
this.energyUsage = power;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public interface IPartStorageMonitor extends IPartMonitor, IPart, IGridHost, INe
|
||||
* IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the
|
||||
* FluidStack/ItemStack acquired from it.
|
||||
*/
|
||||
IAEStack getDisplayed();
|
||||
IAEStack<?> getDisplayed();
|
||||
|
||||
/**
|
||||
* @return the current locked state of the Storage Monitor
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -35,7 +35,7 @@ public class MENetworkChannelChanged extends MENetworkEvent
|
||||
public final IGridNode node;
|
||||
|
||||
public MENetworkChannelChanged(IGridNode n) {
|
||||
node = n;
|
||||
this.node = n;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class MENetworkCraftingCpuChange extends MENetworkEvent
|
||||
public final IGridNode node;
|
||||
|
||||
public MENetworkCraftingCpuChange(IGridNode n) {
|
||||
node = n;
|
||||
this.node = n;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ public class MENetworkCraftingPatternChange extends MENetworkEvent
|
||||
public final IGridNode node;
|
||||
|
||||
public MENetworkCraftingPatternChange(ICraftingProvider p, IGridNode n) {
|
||||
provider = p;
|
||||
node = n;
|
||||
this.provider = p;
|
||||
this.node = n;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class MENetworkEvent
|
||||
*/
|
||||
public void cancel()
|
||||
{
|
||||
canceled = true;
|
||||
this.canceled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ public class MENetworkEvent
|
||||
*/
|
||||
public boolean isCanceled()
|
||||
{
|
||||
return canceled;
|
||||
return this.canceled;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ public class MENetworkEvent
|
||||
*/
|
||||
public int getVisitedObjects()
|
||||
{
|
||||
return visited;
|
||||
return this.visited;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,6 +71,6 @@ public class MENetworkEvent
|
||||
*/
|
||||
public void setVisitedObjects(int v)
|
||||
{
|
||||
visited = v;
|
||||
this.visited = v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MENetworkPowerIdleChange extends MENetworkEvent
|
||||
public final IGridNode node;
|
||||
|
||||
public MENetworkPowerIdleChange(IGridNode nodeThatChanged) {
|
||||
node = nodeThatChanged;
|
||||
this.node = nodeThatChanged;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ public class MENetworkPowerStorage extends MENetworkEvent
|
||||
public final PowerEventType type;
|
||||
|
||||
public MENetworkPowerStorage(IAEPowerStorage t, PowerEventType y) {
|
||||
storage = t;
|
||||
type = y;
|
||||
this.storage = t;
|
||||
this.type = y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ package appeng.api.networking.events;
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
/**
|
||||
* An event that is posted whenever a spatial IO is actived, called for IGridCache
|
||||
* An event that is posted whenever a spatial IO is active, called for IGridCache
|
||||
*/
|
||||
public class MENetworkSpatialEvent extends MENetworkEvent
|
||||
{
|
||||
@@ -34,12 +34,12 @@ 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)
|
||||
{
|
||||
host = SpatialIO;
|
||||
spatialEnergyUsage = EnergyUsage;
|
||||
this.host = SpatialIO;
|
||||
this.spatialEnergyUsage = EnergyUsage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ public class MENetworkStorageEvent extends MENetworkEvent
|
||||
public final StorageChannel channel;
|
||||
|
||||
public MENetworkStorageEvent(IMEMonitor o, StorageChannel chan) {
|
||||
monitor = o;
|
||||
channel = chan;
|
||||
this.monitor = o;
|
||||
this.channel = chan;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface IPathingGrid extends IGridCache
|
||||
ControllerState getControllerState();
|
||||
|
||||
/**
|
||||
* trigger a network reset, booting, pathfinding and all.
|
||||
* trigger a network reset, booting, path-finding and all.
|
||||
*/
|
||||
void repath();
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class MachineSource extends BaseActionSource
|
||||
}
|
||||
|
||||
public MachineSource(IActionHost v) {
|
||||
via = v;
|
||||
this.via = v;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ public class PlayerSource extends BaseActionSource
|
||||
}
|
||||
|
||||
public PlayerSource(EntityPlayer p, IActionHost v) {
|
||||
player = p;
|
||||
via = v;
|
||||
this.player = p;
|
||||
this.via = v;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,10 +68,10 @@ public class TickingRequest
|
||||
public final boolean canBeAlerted;
|
||||
|
||||
public TickingRequest(int min, int max, boolean sleep, boolean alertable) {
|
||||
minTickRate = min;
|
||||
maxTickRate = max;
|
||||
isSleeping = sleep;
|
||||
canBeAlerted = alertable;
|
||||
this.minTickRate = min;
|
||||
this.maxTickRate = max;
|
||||
this.isSleeping = sleep;
|
||||
this.canBeAlerted = alertable;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,6 +35,6 @@ public enum CableRenderMode
|
||||
|
||||
private CableRenderMode(boolean hideFacades) {
|
||||
this.transparentFacades = hideFacades;
|
||||
opaqueFacades = !hideFacades;
|
||||
this.opaqueFacades = !hideFacades;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -47,19 +47,19 @@ public class SelectedPart
|
||||
public final ForgeDirection side;
|
||||
|
||||
public SelectedPart() {
|
||||
part = null;
|
||||
facade = null;
|
||||
side = ForgeDirection.UNKNOWN;
|
||||
this.part = null;
|
||||
this.facade = null;
|
||||
this.side = ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
||||
public SelectedPart(IPart part, ForgeDirection side) {
|
||||
this.part = part;
|
||||
facade = null;
|
||||
this.facade = null;
|
||||
this.side = side;
|
||||
}
|
||||
|
||||
public SelectedPart(IFacadePart facade, ForgeDirection side) {
|
||||
part = null;
|
||||
this.part = null;
|
||||
this.facade = facade;
|
||||
this.side = side;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public interface IIngredient {
|
||||
public int getQty();
|
||||
|
||||
/**
|
||||
* Bakes the lists in for faster runtime lookups.
|
||||
* Bakes the lists in for faster runtime look-ups.
|
||||
* @throws MissingIngredientError
|
||||
* @throws RegistrationError
|
||||
*/
|
||||
|
||||
@@ -33,15 +33,15 @@ public class ResolverResult
|
||||
final public NBTTagCompound compound;
|
||||
|
||||
public ResolverResult(String name, int damage) {
|
||||
itemName = name;
|
||||
damageValue = damage;
|
||||
compound = null;
|
||||
this.itemName = name;
|
||||
this.damageValue = damage;
|
||||
this.compound = null;
|
||||
}
|
||||
|
||||
public ResolverResult(String name, int damage, NBTTagCompound data) {
|
||||
itemName = name;
|
||||
damageValue = damage;
|
||||
compound = data;
|
||||
this.itemName = name;
|
||||
this.damageValue = damage;
|
||||
this.compound = data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ public class ResolverResultSet
|
||||
public final List<ItemStack> results;
|
||||
|
||||
public ResolverResultSet(String myName, ItemStack... set) {
|
||||
results = Arrays.asList( set );
|
||||
name = myName;
|
||||
this.results = Arrays.asList( set );
|
||||
this.name = myName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ package appeng.api.storage;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
|
||||
/**
|
||||
* Represents a IGridhost that contributes to storage, such as a ME Chest, or ME Drive.
|
||||
* Represents an {@link appeng.api.networking.IGridHost} that contributes to storage, such as a ME Chest, or ME Drive.
|
||||
*/
|
||||
public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvider
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -51,23 +51,23 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
|
||||
protected IMEInventoryHandler<StackType> getHandler()
|
||||
{
|
||||
return internalHandler;
|
||||
return this.internalHandler;
|
||||
}
|
||||
|
||||
protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners()
|
||||
{
|
||||
return listeners.entrySet().iterator();
|
||||
return this.listeners.entrySet().iterator();
|
||||
}
|
||||
|
||||
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src)
|
||||
{
|
||||
notifyListenersOfChange( changes, src );
|
||||
this.notifyListenersOfChange( changes, src );
|
||||
}
|
||||
|
||||
protected void notifyListenersOfChange(Iterable<StackType> diff, BaseActionSource src)
|
||||
{
|
||||
hasChanged = true;// need to update the cache.
|
||||
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = getListeners();
|
||||
this.hasChanged = true;// need to update the cache.
|
||||
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners();
|
||||
while (i.hasNext())
|
||||
{
|
||||
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
||||
@@ -89,108 +89,108 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
diff.decStackSize( leftOvers.getStackSize() );
|
||||
|
||||
if ( diff.getStackSize() != 0 )
|
||||
postChangesToListeners( ImmutableList.of( diff ), src );
|
||||
this.postChangesToListeners( ImmutableList.of( diff ), src );
|
||||
|
||||
return leftOvers;
|
||||
}
|
||||
|
||||
public MEMonitorHandler(IMEInventoryHandler<StackType> t) {
|
||||
internalHandler = t;
|
||||
cachedList = (IItemList<StackType>) t.getChannel().createList();
|
||||
this.internalHandler = t;
|
||||
this.cachedList = (IItemList<StackType>) t.getChannel().createList();
|
||||
}
|
||||
|
||||
public MEMonitorHandler(IMEInventoryHandler<StackType> t, StorageChannel chan) {
|
||||
internalHandler = t;
|
||||
cachedList = (IItemList<StackType>) chan.createList();
|
||||
this.internalHandler = t;
|
||||
this.cachedList = (IItemList<StackType>) chan.createList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(IMEMonitorHandlerReceiver<StackType> l, Object verificationToken)
|
||||
{
|
||||
listeners.put( l, verificationToken );
|
||||
this.listeners.put( l, verificationToken );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeListener(IMEMonitorHandlerReceiver<StackType> l)
|
||||
{
|
||||
listeners.remove( l );
|
||||
this.listeners.remove( l );
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackType injectItems(StackType input, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
return getHandler().injectItems( input, mode, src );
|
||||
return monitorDifference(input.copy(), getHandler().injectItems(input, mode, src), false, src);
|
||||
return this.getHandler().injectItems( input, mode, src );
|
||||
return this.monitorDifference(input.copy(), this.getHandler().injectItems(input, mode, src), false, src);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackType extractItems(StackType request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
return getHandler().extractItems( request, mode, src );
|
||||
return monitorDifference(request.copy(), getHandler().extractItems(request, mode, src), true, src);
|
||||
return this.getHandler().extractItems( request, mode, src );
|
||||
return this.monitorDifference(request.copy(), this.getHandler().extractItems(request, mode, src), true, src);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemList<StackType> getStorageList()
|
||||
{
|
||||
if ( hasChanged )
|
||||
if ( this.hasChanged )
|
||||
{
|
||||
hasChanged = false;
|
||||
cachedList.resetStatus();
|
||||
return getAvailableItems( cachedList );
|
||||
this.hasChanged = false;
|
||||
this.cachedList.resetStatus();
|
||||
return this.getAvailableItems( this.cachedList );
|
||||
}
|
||||
|
||||
return cachedList;
|
||||
return this.cachedList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemList<StackType> getAvailableItems(IItemList out)
|
||||
{
|
||||
return getHandler().getAvailableItems( out );
|
||||
return this.getHandler().getAvailableItems( out );
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageChannel getChannel()
|
||||
{
|
||||
return getHandler().getChannel();
|
||||
return this.getHandler().getChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessRestriction getAccess()
|
||||
{
|
||||
return getHandler().getAccess();
|
||||
return this.getHandler().getAccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPrioritized(StackType input)
|
||||
{
|
||||
return getHandler().isPrioritized( input );
|
||||
return this.getHandler().isPrioritized( input );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAccept(StackType input)
|
||||
{
|
||||
return getHandler().canAccept( input );
|
||||
return this.getHandler().canAccept( input );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return getHandler().getPriority();
|
||||
return this.getHandler().getPriority();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlot()
|
||||
{
|
||||
return getHandler().getSlot();
|
||||
return this.getHandler().getSlot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validForPass(int i)
|
||||
{
|
||||
return getHandler().validForPass( i );
|
||||
return this.getHandler().validForPass( i );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public enum StorageChannel
|
||||
public final Class<? extends IAEStack> type;
|
||||
|
||||
private StorageChannel( Class<? extends IAEStack> t ) {
|
||||
type = t;
|
||||
this.type = t;
|
||||
}
|
||||
|
||||
public IItemList createList() {
|
||||
|
||||
@@ -89,9 +89,9 @@ public enum AEColor
|
||||
|
||||
AEColor(String unlocalizedName, int blackHex, int medHex, int whiteHex) {
|
||||
this.unlocalizedName = unlocalizedName;
|
||||
blackVariant = blackHex;
|
||||
mediumVariant = medHex;
|
||||
whiteVariant = whiteHex;
|
||||
this.blackVariant = blackHex;
|
||||
this.mediumVariant = medHex;
|
||||
this.whiteVariant = whiteHex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,13 +99,13 @@ public enum AEColor
|
||||
*/
|
||||
public boolean matches(AEColor color)
|
||||
{
|
||||
return equals(Transparent) || color.equals(Transparent) || equals(color);
|
||||
return this == Transparent || color == Transparent || this == color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return StatCollector.translateToLocal( unlocalizedName );
|
||||
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,20 +37,20 @@ public class DimensionalCoord extends WorldCoord
|
||||
|
||||
public DimensionalCoord(DimensionalCoord s) {
|
||||
super( s.x, s.y, s.z );
|
||||
w = s.w;
|
||||
dimId = s.dimId;
|
||||
this.w = s.w;
|
||||
this.dimId = s.dimId;
|
||||
}
|
||||
|
||||
public DimensionalCoord(TileEntity s) {
|
||||
super( s );
|
||||
w = s.getWorldObj();
|
||||
dimId = w.provider.dimensionId;
|
||||
this.w = s.getWorldObj();
|
||||
this.dimId = this.w.provider.dimensionId;
|
||||
}
|
||||
|
||||
public DimensionalCoord(World _w, int _x, int _y, int _z) {
|
||||
super( _x, _y, _z );
|
||||
w = _w;
|
||||
dimId = _w.provider.dimensionId;
|
||||
this.w = _w;
|
||||
this.dimId = _w.provider.dimensionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,34 +61,34 @@ public class DimensionalCoord extends WorldCoord
|
||||
|
||||
public boolean isEqual(DimensionalCoord c)
|
||||
{
|
||||
return x == c.x && y == c.y && z == c.z && c.w == this.w;
|
||||
return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return obj instanceof DimensionalCoord && isEqual((DimensionalCoord) obj);
|
||||
return obj instanceof DimensionalCoord && this.isEqual((DimensionalCoord) obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return super.hashCode() ^ dimId;
|
||||
return super.hashCode() ^ this.dimId;
|
||||
}
|
||||
|
||||
public boolean isInWorld(World world)
|
||||
{
|
||||
return w == world;
|
||||
return this.w == world;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return dimId + "," + super.toString();
|
||||
return this.dimId + "," + super.toString();
|
||||
}
|
||||
|
||||
public World getWorld()
|
||||
{
|
||||
return w;
|
||||
return this.w;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,56 +39,56 @@ public class WorldCoord
|
||||
|
||||
public WorldCoord add(ForgeDirection direction, int length)
|
||||
{
|
||||
x += direction.offsetX * length;
|
||||
y += direction.offsetY * length;
|
||||
z += direction.offsetZ * length;
|
||||
this.x += direction.offsetX * length;
|
||||
this.y += direction.offsetY * length;
|
||||
this.z += direction.offsetZ * length;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WorldCoord subtract(ForgeDirection direction, int length)
|
||||
{
|
||||
x -= direction.offsetX * length;
|
||||
y -= direction.offsetY * length;
|
||||
z -= direction.offsetZ * length;
|
||||
this.x -= direction.offsetX * length;
|
||||
this.y -= direction.offsetY * length;
|
||||
this.z -= direction.offsetZ * length;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WorldCoord add(int _x, int _y, int _z)
|
||||
{
|
||||
x += _x;
|
||||
y += _y;
|
||||
z += _z;
|
||||
this.x += _x;
|
||||
this.y += _y;
|
||||
this.z += _z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WorldCoord subtract(int _x, int _y, int _z)
|
||||
{
|
||||
x -= _x;
|
||||
y -= _y;
|
||||
z -= _z;
|
||||
this.x -= _x;
|
||||
this.y -= _y;
|
||||
this.z -= _z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WorldCoord multiple(int _x, int _y, int _z)
|
||||
{
|
||||
x *= _x;
|
||||
y *= _y;
|
||||
z *= _z;
|
||||
this.x *= _x;
|
||||
this.y *= _y;
|
||||
this.z *= _z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WorldCoord divide(int _x, int _y, int _z)
|
||||
{
|
||||
x /= _x;
|
||||
y /= _y;
|
||||
z /= _z;
|
||||
this.x /= _x;
|
||||
this.y /= _y;
|
||||
this.z /= _z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WorldCoord(int _x, int _y, int _z) {
|
||||
x = _x;
|
||||
y = _y;
|
||||
z = _z;
|
||||
this.x = _x;
|
||||
this.y = _y;
|
||||
this.z = _z;
|
||||
}
|
||||
|
||||
public WorldCoord(TileEntity s) {
|
||||
@@ -100,9 +100,9 @@ public class WorldCoord
|
||||
*/
|
||||
public ForgeDirection directionTo(WorldCoord loc)
|
||||
{
|
||||
int ox = x - loc.x;
|
||||
int oy = y - loc.y;
|
||||
int oz = z - loc.z;
|
||||
int ox = this.x - loc.x;
|
||||
int oy = this.y - loc.y;
|
||||
int oz = this.z - loc.z;
|
||||
|
||||
int xlen = Math.abs( ox );
|
||||
int ylen = Math.abs( oy );
|
||||
@@ -131,29 +131,29 @@ public class WorldCoord
|
||||
|
||||
public boolean isEqual(WorldCoord c)
|
||||
{
|
||||
return x == c.x && y == c.y && z == c.z;
|
||||
return this.x == c.x && this.y == c.y && this.z == c.z;
|
||||
}
|
||||
|
||||
public WorldCoord copy()
|
||||
{
|
||||
return new WorldCoord( x, y, z );
|
||||
return new WorldCoord( this.x, this.y, this.z );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return obj instanceof WorldCoord && isEqual((WorldCoord) obj);
|
||||
return obj instanceof WorldCoord && this.isEqual((WorldCoord) obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "" + x + "," + y + "," + z;
|
||||
return "" + this.x + "," + this.y + "," + this.z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return (y << 24) ^ x ^ z;
|
||||
return ( this.y << 24) ^ this.x ^ this.z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -752,19 +752,19 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||
west = dx;
|
||||
|
||||
if ( dir.equals( forward ) )
|
||||
if ( dir == forward )
|
||||
return ForgeDirection.SOUTH;
|
||||
if ( dir.equals( forward.getOpposite() ) )
|
||||
if ( dir == forward.getOpposite() )
|
||||
return ForgeDirection.NORTH;
|
||||
|
||||
if ( dir.equals( up ) )
|
||||
if ( dir == up )
|
||||
return ForgeDirection.UP;
|
||||
if ( dir.equals( up.getOpposite() ) )
|
||||
if ( dir == up.getOpposite() )
|
||||
return ForgeDirection.DOWN;
|
||||
|
||||
if ( dir.equals( west ) )
|
||||
if ( dir == west )
|
||||
return ForgeDirection.WEST;
|
||||
if ( dir.equals( west.getOpposite() ) )
|
||||
if ( dir == west.getOpposite() )
|
||||
return ForgeDirection.EAST;
|
||||
|
||||
return ForgeDirection.UNKNOWN;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -47,6 +47,7 @@ public class BlockCrank extends AEBaseBlock
|
||||
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
||||
this.setTileEntity( TileCrank.class );
|
||||
this.setLightOpacity( 0 );
|
||||
this.setHarvestLevel( "axe", 0 );
|
||||
this.isFullSize = this.isOpaque = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
@@ -18,59 +18,79 @@
|
||||
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerFormationPlane;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.parts.automation.PartFormationPlane;
|
||||
|
||||
|
||||
public class GuiFormationPlane extends GuiUpgradeable
|
||||
{
|
||||
|
||||
GuiTabButton priority;
|
||||
GuiImgButton placeMode;
|
||||
|
||||
public GuiFormationPlane(InventoryPlayer inventoryPlayer, PartFormationPlane te) {
|
||||
public GuiFormationPlane( InventoryPlayer inventoryPlayer, PartFormationPlane te )
|
||||
{
|
||||
super( new ContainerFormationPlane( inventoryPlayer, te ) );
|
||||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( this.fuzzyMode != null )
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
|
||||
if ( this.placeMode != null )
|
||||
this.placeMode.set( ( ( ContainerFormationPlane ) this.cvb ).placeMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.placeMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.PLACE_BLOCK, YesNo.YES );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
|
||||
this.buttonList.add( this.placeMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton btn)
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == this.priority )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
else if ( btn == this.placeMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.placeMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -155,6 +155,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
this.registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsNo );
|
||||
this.registerApp( 16 * 3 + 6, Settings.STORAGE_FILTER, StorageFilter.NONE, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsYes );
|
||||
|
||||
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
|
||||
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +365,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class ButtonAppearance
|
||||
{
|
||||
public int index;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
@@ -82,193 +82,193 @@ public class BaseBlockRender
|
||||
|
||||
static public int getOrientation(ForgeDirection in, ForgeDirection forward, ForgeDirection up)
|
||||
{
|
||||
if ( in == null || in.equals( ForgeDirection.UNKNOWN ) // 1
|
||||
|| forward == null || forward.equals( ForgeDirection.UNKNOWN ) // 2
|
||||
|| up == null || up.equals( ForgeDirection.UNKNOWN ) )
|
||||
if ( in == null || in == ForgeDirection.UNKNOWN // 1
|
||||
|| forward == null || forward == ForgeDirection.UNKNOWN // 2
|
||||
|| up == null || up == ForgeDirection.UNKNOWN )
|
||||
return 0;
|
||||
|
||||
int a = in.ordinal();
|
||||
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 ) )
|
||||
{
|
||||
@@ -277,7 +277,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public void setTexture(IIcon Down, IIcon Up, IIcon North, IIcon South, IIcon West, IIcon East)
|
||||
{
|
||||
IIcon list[] = new IIcon[6];
|
||||
IIcon[] list = new IIcon[6];
|
||||
|
||||
list[0] = Down;
|
||||
list[1] = Up;
|
||||
@@ -309,19 +309,19 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||
west = dx;
|
||||
|
||||
if ( dir.equals( forward ) )
|
||||
if ( dir == forward )
|
||||
return ForgeDirection.SOUTH;
|
||||
if ( dir.equals( forward.getOpposite() ) )
|
||||
if ( dir == forward.getOpposite() )
|
||||
return ForgeDirection.NORTH;
|
||||
|
||||
if ( dir.equals( up ) )
|
||||
if ( dir == up )
|
||||
return ForgeDirection.UP;
|
||||
if ( dir.equals( up.getOpposite() ) )
|
||||
if ( dir == up.getOpposite() )
|
||||
return ForgeDirection.DOWN;
|
||||
|
||||
if ( dir.equals( west ) )
|
||||
if ( dir == west )
|
||||
return ForgeDirection.WEST;
|
||||
if ( dir.equals( west.getOpposite() ) )
|
||||
if ( dir == west.getOpposite() )
|
||||
return ForgeDirection.EAST;
|
||||
|
||||
return ForgeDirection.UNKNOWN;
|
||||
@@ -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 );
|
||||
@@ -116,13 +116,13 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
i.prepareBounds( renderer );
|
||||
|
||||
boolean LocalEmit = emitsLight;
|
||||
if ( blk instanceof BlockCraftingMonitor && !ct.getForward().equals( side ) )
|
||||
if ( blk instanceof BlockCraftingMonitor && ct.getForward() != side )
|
||||
LocalEmit = false;
|
||||
|
||||
this.handleSide( blk, meta, x, y, z, i, renderer, ct.getForward().equals( side ) ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
|
||||
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();
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||
{
|
||||
// super.renderInWorld( imb, world, x, y, z, renderer );
|
||||
|
||||
IIcon icoSet[] = new IIcon[] { imb.getIcon( 0, 0 ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
|
||||
IIcon[] icoSet = new IIcon[] { imb.getIcon( 0, 0 ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
|
||||
ForgeDirection sides[] = new ForgeDirection[] { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
ForgeDirection[] sides = new ForgeDirection[] { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
|
||||
int s = 1;
|
||||
|
||||
@@ -147,7 +147,7 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
|
||||
ForgeDirection sides[] = new ForgeDirection[] { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
ForgeDirection[] sides = new ForgeDirection[] { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
|
||||
int s = 1;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import appeng.client.texture.OffsetIcon;
|
||||
public class RenderQuartzGlass extends BaseBlockRender
|
||||
{
|
||||
|
||||
static byte offsets[][][];
|
||||
static byte[][][] offsets;
|
||||
|
||||
public RenderQuartzGlass() {
|
||||
super( false, 0 );
|
||||
|
||||
@@ -172,7 +172,7 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||
private IIcon getBlockTextureFromSideOutside(AEBaseBlock blk, TileSpatialPylon sp, int displayBits, ForgeDirection ori, ForgeDirection dir)
|
||||
{
|
||||
|
||||
if ( ori.equals( dir ) || ori.getOpposite().equals( dir ) )
|
||||
if ( ori == dir || ori.getOpposite() == dir )
|
||||
return blk.getRendererInstance().getTexture( dir );
|
||||
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
||||
@@ -191,7 +191,7 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||
{
|
||||
boolean good = (displayBits & sp.DISPLAY_ENABLED) == sp.DISPLAY_ENABLED;
|
||||
|
||||
if ( ori.equals( dir ) || ori.getOpposite().equals( dir ) )
|
||||
if ( ori == dir || ori.getOpposite() == dir )
|
||||
return good ? ExtraBlockTextures.BlockSpatialPylon_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylon_red.getIcon();
|
||||
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
||||
|
||||
@@ -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,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.World;
|
||||
@@ -27,6 +28,7 @@ import appeng.client.EffectType;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.entity.EntityFloatingItem;
|
||||
|
||||
|
||||
public class AssemblerFX extends EntityFX
|
||||
{
|
||||
|
||||
@@ -35,7 +37,8 @@ public class AssemblerFX extends EntityFX
|
||||
float time = 0;
|
||||
final float speed;
|
||||
|
||||
public AssemblerFX(World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is) {
|
||||
public AssemblerFX( World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is )
|
||||
{
|
||||
super( w, x, y, z, r, g, b );
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
@@ -44,11 +47,12 @@ public class AssemblerFX extends EntityFX
|
||||
this.speed = speed;
|
||||
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( this.fi );
|
||||
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
this.particleMaxAge = ( int ) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender(float par1)
|
||||
public int getBrightnessForRender( float par1 )
|
||||
{
|
||||
int j1 = 13;
|
||||
return j1 << 20 | j1 << 4;
|
||||
@@ -63,20 +67,20 @@ public class AssemblerFX extends EntityFX
|
||||
this.fi.setDead();
|
||||
else
|
||||
{
|
||||
float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
float lifeSpan = ( float ) this.particleAge / ( float ) this.particleMaxAge;
|
||||
this.fi.setProgress( lifeSpan );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY)
|
||||
public void renderParticle( Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY )
|
||||
{
|
||||
this.time += l;
|
||||
if ( this.time > 4.0 )
|
||||
{
|
||||
this.time -= 4.0;
|
||||
// if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
for (int x = 0; x < (int) Math.ceil( this.speed / 5 ); x++)
|
||||
for ( int x = 0; x < ( int ) Math.ceil( this.speed / 5 ); x++ )
|
||||
CommonHelper.proxy.spawnEffect( EffectType.Crafting, this.worldObj, this.posX, this.posY, this.posZ, null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,19 +18,22 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityReddustFX;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class ChargedOreFX extends EntityReddustFX
|
||||
{
|
||||
|
||||
public ChargedOreFX(World w, double x, double y, double z, float r, float g, float b) {
|
||||
public ChargedOreFX( World w, double x, double y, double z, float r, float g, float b )
|
||||
{
|
||||
super( w, x, y, z, 0.21f, 0.61f, 1.0f );
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender(float par1)
|
||||
public int getBrightnessForRender( float par1 )
|
||||
{
|
||||
int j1 = super.getBrightnessForRender( par1 );
|
||||
j1 = Math.max( j1 >> 20, j1 >> 4 );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -31,7 +32,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class CraftingFx extends EntityBreakingFX
|
||||
{
|
||||
|
||||
@@ -47,7 +49,8 @@ public class CraftingFx extends EntityBreakingFX
|
||||
return 1;
|
||||
}
|
||||
|
||||
public CraftingFx(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
public CraftingFx( World par1World, double par2, double par4, double par6, Item par8Item )
|
||||
{
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 1;
|
||||
@@ -61,9 +64,11 @@ public class CraftingFx extends EntityBreakingFX
|
||||
this.startBlkX = MathHelper.floor_double( this.posX );
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
public void fromItem( ForgeDirection d )
|
||||
{
|
||||
this.posX += 0.2 * d.offsetX;
|
||||
this.posY += 0.2 * d.offsetY;
|
||||
@@ -80,7 +85,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz)
|
||||
public void renderParticle( Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz )
|
||||
{
|
||||
if ( partialTick < 0 || partialTick > 1 )
|
||||
return;
|
||||
@@ -91,9 +96,9 @@ public class CraftingFx extends EntityBreakingFX
|
||||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float scale = 0.1F * this.particleScale;
|
||||
|
||||
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTick);
|
||||
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * partialTick);
|
||||
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * partialTick);
|
||||
float offX = ( float ) ( this.prevPosX + ( this.posX - this.prevPosX ) * partialTick );
|
||||
float offY = ( float ) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTick );
|
||||
float offZ = ( float ) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTick );
|
||||
float f14 = 1.0F;
|
||||
|
||||
int blkX = MathHelper.floor_double( offX );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -31,7 +32,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class EnergyFx extends EntityBreakingFX
|
||||
{
|
||||
|
||||
@@ -47,7 +49,8 @@ public class EnergyFx extends EntityBreakingFX
|
||||
return 1;
|
||||
}
|
||||
|
||||
public EnergyFx(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
public EnergyFx( World par1World, double par2, double par4, double par6, Item par8Item )
|
||||
{
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 255;
|
||||
@@ -60,9 +63,11 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.startBlkX = MathHelper.floor_double( this.posX );
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
public void fromItem( ForgeDirection d )
|
||||
{
|
||||
this.posX += 0.2 * d.offsetX;
|
||||
this.posY += 0.2 * d.offsetY;
|
||||
@@ -79,7 +84,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
public void renderParticle( Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7 )
|
||||
{
|
||||
float f6 = this.particleTextureIndex.getMinU();
|
||||
float f7 = this.particleTextureIndex.getMaxU();
|
||||
@@ -87,9 +92,9 @@ public class EnergyFx extends EntityBreakingFX
|
||||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float f10 = 0.1F * this.particleScale;
|
||||
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
float f11 = ( float ) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
|
||||
float f12 = ( float ) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
|
||||
float f13 = ( float ) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
float f14 = 1.0F;
|
||||
|
||||
int blkX = MathHelper.floor_double( this.posX );
|
||||
|
||||
@@ -18,17 +18,24 @@
|
||||
|
||||
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;
|
||||
final double rz;
|
||||
|
||||
public LightningArcFX(World w, double x, double y, double z, double ex, double ey, double ez, double r, double g, double b) {
|
||||
public LightningArcFX( World w, double x, double y, double z, double ex, double ey, double ez, double r, double g, double b )
|
||||
{
|
||||
super( w, x, y, z, r, g, b, 6 );
|
||||
this.noClip = true;
|
||||
|
||||
this.rx = ex - x;
|
||||
this.ry = ey - y;
|
||||
@@ -40,17 +47,17 @@ public class LightningArcFX extends LightningFX
|
||||
@Override
|
||||
protected void regen()
|
||||
{
|
||||
double i = 1.0 / (this.steps - 1);
|
||||
double i = 1.0 / ( this.steps - 1 );
|
||||
double lastDirectionX = this.rx * i;
|
||||
double lastDirectionY = this.ry * i;
|
||||
double lastDirectionZ = this.rz * i;
|
||||
|
||||
double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -27,20 +28,23 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
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) {
|
||||
protected LightningFX( World w, double x, double y, double z, double r, double g, double b, int maxAge )
|
||||
{
|
||||
super( w, x, y, z, r, g, b );
|
||||
this.Steps = new double[this.steps][3];
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.particleMaxAge = maxAge;
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
private int getSteps()
|
||||
@@ -48,7 +52,8 @@ public class LightningFX extends EntityFX
|
||||
return 5;
|
||||
}
|
||||
|
||||
public LightningFX(World w, double x, double y, double z, double r, double g, double b) {
|
||||
public LightningFX( World w, double x, double y, double z, double r, double g, double b )
|
||||
{
|
||||
this( w, x, y, z, r, g, b, 6 );
|
||||
this.regen();
|
||||
}
|
||||
@@ -56,7 +61,7 @@ public class LightningFX extends EntityFX
|
||||
float currentPoint = 0;
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender(float par1)
|
||||
public int getBrightnessForRender( float par1 )
|
||||
{
|
||||
int j1 = 13;
|
||||
return j1 << 20 | j1 << 4;
|
||||
@@ -64,19 +69,19 @@ 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;
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY)
|
||||
public void renderParticle( Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY )
|
||||
{
|
||||
float j = 1.0f;
|
||||
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
|
||||
@@ -94,8 +99,8 @@ public class LightningFX extends EntityFX
|
||||
|
||||
double scale = 0.02;// 0.02F * this.particleScale;
|
||||
|
||||
double a[] = new double[3];
|
||||
double b[] = new double[3];
|
||||
double[] a = new double[3];
|
||||
double[] b = new double[3];
|
||||
|
||||
double ox = 0;
|
||||
double oy = 0;
|
||||
@@ -103,10 +108,10 @@ public class LightningFX extends EntityFX
|
||||
|
||||
EntityPlayer p = Minecraft.getMinecraft().thePlayer;
|
||||
double offX = -rZ;
|
||||
double offY = MathHelper.cos( (float) (Math.PI / 2.0f + p.rotationPitch * 0.017453292F) );
|
||||
double offY = MathHelper.cos( ( float ) ( Math.PI / 2.0f + p.rotationPitch * 0.017453292F ) );
|
||||
double offZ = rX;
|
||||
|
||||
for (int layer = 0; layer < 2; layer++)
|
||||
for ( int layer = 0; layer < 2; layer++ )
|
||||
{
|
||||
if ( layer == 0 )
|
||||
{
|
||||
@@ -125,15 +130,15 @@ public class LightningFX extends EntityFX
|
||||
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.65f, this.particleBlue * j * 0.85f, this.particleAlpha );
|
||||
}
|
||||
|
||||
for (int cycle = 0; cycle < 3; cycle++)
|
||||
for ( int cycle = 0; cycle < 3; cycle++ )
|
||||
{
|
||||
this.clear();
|
||||
|
||||
double x = (this.prevPosX + (this.posX - this.prevPosX) * l - interpPosX) - offX;
|
||||
double y = (this.prevPosY + (this.posY - this.prevPosY) * l - interpPosY) - offY;
|
||||
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * l - interpPosZ) - offZ;
|
||||
double x = ( this.prevPosX + ( this.posX - this.prevPosX ) * l - interpPosX ) - offX;
|
||||
double y = ( this.prevPosY + ( this.posY - this.prevPosY ) * l - interpPosY ) - offY;
|
||||
double z = ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * l - interpPosZ ) - offZ;
|
||||
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
for ( int s = 0; s < this.steps; s++ )
|
||||
{
|
||||
double xN = x + this.Steps[s][0];
|
||||
double yN = y + this.Steps[s][1];
|
||||
@@ -145,24 +150,24 @@ public class LightningFX extends EntityFX
|
||||
|
||||
if ( cycle == 0 )
|
||||
{
|
||||
ox = (yD * 0) - (1 * zD);
|
||||
oy = (zD * 0) - (0 * xD);
|
||||
oz = (xD * 1) - (0 * yD);
|
||||
ox = ( yD * 0 ) - ( 1 * zD );
|
||||
oy = ( zD * 0 ) - ( 0 * xD );
|
||||
oz = ( xD * 1 ) - ( 0 * yD );
|
||||
}
|
||||
if ( cycle == 1 )
|
||||
{
|
||||
ox = (yD * 1) - (0 * zD);
|
||||
oy = (zD * 0) - (1 * xD);
|
||||
oz = (xD * 0) - (0 * yD);
|
||||
ox = ( yD * 1 ) - ( 0 * zD );
|
||||
oy = ( zD * 0 ) - ( 1 * xD );
|
||||
oz = ( xD * 0 ) - ( 0 * yD );
|
||||
}
|
||||
if ( cycle == 2 )
|
||||
{
|
||||
ox = (yD * 0) - (0 * zD);
|
||||
oy = (zD * 1) - (0 * xD);
|
||||
oz = (xD * 0) - (1 * yD);
|
||||
ox = ( yD * 0 ) - ( 0 * zD );
|
||||
oy = ( zD * 1 ) - ( 0 * xD );
|
||||
oz = ( xD * 0 ) - ( 1 * yD );
|
||||
}
|
||||
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) this.steps - (double) s) / this.steps) * scale);
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( ( double ) this.steps - ( double ) s ) / this.steps ) * scale );
|
||||
ox /= ss;
|
||||
oy /= ss;
|
||||
oz /= ss;
|
||||
@@ -193,7 +198,7 @@ public class LightningFX extends EntityFX
|
||||
final double[] I = new double[3];
|
||||
final double[] K = new double[3];
|
||||
|
||||
private void draw(Tessellator tess, double[] a, double[] b, double f6, double f8)
|
||||
private void draw( Tessellator tess, double[] a, double[] b, double f6, double f8 )
|
||||
{
|
||||
if ( this.hasData )
|
||||
{
|
||||
@@ -203,7 +208,7 @@ public class LightningFX extends EntityFX
|
||||
tess.addVertexWithUV( b[0], b[1], b[2], f6, f8 );
|
||||
}
|
||||
this.hasData = true;
|
||||
for (int x = 0; x < 3; x++)
|
||||
for ( int x = 0; x < 3; x++ )
|
||||
{
|
||||
this.I[x] = a[x];
|
||||
this.K[x] = b[x];
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -27,12 +28,14 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
public class MatterCannonFX extends EntityBreakingFX
|
||||
{
|
||||
|
||||
private final IIcon particleTextureIndex;
|
||||
|
||||
public MatterCannonFX(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
public MatterCannonFX( World par1World, double par2, double par4, double par6, Item par8Item )
|
||||
{
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 255;
|
||||
@@ -44,9 +47,10 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
this.motionY = 0.0f;
|
||||
this.motionZ = 0.0f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockMatterCannonParticle.getIcon();
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
public void fromItem( ForgeDirection d )
|
||||
{
|
||||
this.particleScale *= 1.2f;
|
||||
}
|
||||
@@ -66,7 +70,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
public void renderParticle( Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7 )
|
||||
{
|
||||
float f6 = this.particleTextureIndex.getMinU();
|
||||
float f7 = this.particleTextureIndex.getMaxU();
|
||||
@@ -74,9 +78,9 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float f10 = 0.05F * this.particleScale;
|
||||
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
float f11 = ( float ) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
|
||||
float f12 = ( float ) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
|
||||
float f13 = ( float ) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
float f14 = 1.0F;
|
||||
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
|
||||
@@ -18,17 +18,20 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class VibrantFX extends EntityFX
|
||||
{
|
||||
|
||||
public VibrantFX(World par1World, double x, double y, double z, double par8, double par10, double par12) {
|
||||
public VibrantFX( World par1World, double x, double y, double z, double par8, double par10, double par12 )
|
||||
{
|
||||
super( par1World, x, y, z, par8, par10, par12 );
|
||||
float f = this.rand.nextFloat() * 0.1F + 0.8F;
|
||||
this.particleRed = f * 0.7f;
|
||||
@@ -43,12 +46,12 @@ public class VibrantFX extends EntityFX
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.particleMaxAge = (int) (20.0D / (Math.random() * 0.8D + 0.1D));
|
||||
this.particleMaxAge = ( int ) ( 20.0D / ( Math.random() * 0.8D + 0.1D ) );
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness(float par1)
|
||||
public float getBrightness( float par1 )
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class FullIcon implements IIcon
|
||||
{
|
||||
|
||||
private IIcon p;
|
||||
private final IIcon p;
|
||||
|
||||
public FullIcon(IIcon o) {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class OffsetIcon implements IIcon
|
||||
final float offsetX;
|
||||
final float offsetY;
|
||||
|
||||
private IIcon p;
|
||||
private final IIcon p;
|
||||
|
||||
public OffsetIcon(IIcon o, float x, float y) {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class TaughtIcon implements IIcon
|
||||
|
||||
final float tightness;
|
||||
|
||||
private IIcon p;
|
||||
private final IIcon p;
|
||||
|
||||
public TaughtIcon(IIcon o, float tightness) {
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -26,18 +26,25 @@ import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.slot.OptionalSlotFakeTypeOnly;
|
||||
import appeng.container.slot.SlotFakeTypeOnly;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.parts.automation.PartFormationPlane;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
{
|
||||
|
||||
final PartFormationPlane storageBus;
|
||||
|
||||
public ContainerFormationPlane(InventoryPlayer ip, PartFormationPlane te) {
|
||||
@GuiSync( 6 )
|
||||
public YesNo placeMode;
|
||||
|
||||
public ContainerFormationPlane( InventoryPlayer ip, PartFormationPlane te )
|
||||
{
|
||||
super( ip, te );
|
||||
this.storageBus = te;
|
||||
}
|
||||
@@ -61,7 +68,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSlotEnabled(int idx)
|
||||
public boolean isSlotEnabled( int idx )
|
||||
{
|
||||
int upgrades = this.upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
|
||||
@@ -75,9 +82,9 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
int yo = 23 + 6;
|
||||
|
||||
IInventory config = this.upgradeable.getInventoryByName( "config" );
|
||||
for (int y = 0; y < 7; y++)
|
||||
for ( int y = 0; y < 7; y++ )
|
||||
{
|
||||
for (int x = 0; x < 9; x++)
|
||||
for ( int x = 0; x < 9; x++ )
|
||||
{
|
||||
if ( y < 2 )
|
||||
this.addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
|
||||
@@ -87,11 +94,11 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer ) ).setNotDraggable() );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer ) ).setNotDraggable() );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer ) ).setNotDraggable() );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer ) ).setNotDraggable() );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.invPlayer ) ).setNotDraggable() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,7 +108,8 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||
this.fzMode = ( FuzzyMode ) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||
this.placeMode = ( YesNo ) this.upgradeable.getConfigManager().getSetting( Settings.PLACE_BLOCK );
|
||||
}
|
||||
|
||||
this.standardDetectAndSendChanges();
|
||||
|
||||
@@ -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 ) )
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
return true;
|
||||
}
|
||||
|
||||
public void postCraft( EntityPlayer p, IMEMonitor<IAEItemStack> inv, ItemStack set[], ItemStack result )
|
||||
public void postCraft( EntityPlayer p, IMEMonitor<IAEItemStack> inv, ItemStack[] set, ItemStack result )
|
||||
{
|
||||
List<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -120,7 +120,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
|
||||
public double spatialPowerExponent = 1.35;
|
||||
public double spatialPowerMultiplier = 1250.0;
|
||||
|
||||
public String grinderOres[] = {
|
||||
public String[] grinderOres = {
|
||||
// Vanilla Items
|
||||
"Obsidian", "Ender", "EnderPearl", "Coal", "Iron", "Gold", "Charcoal", "NetherQuartz",
|
||||
// Common Mod Ores
|
||||
|
||||
@@ -29,7 +29,7 @@ import appeng.util.Platform;
|
||||
public class AELog
|
||||
{
|
||||
|
||||
public static cpw.mods.fml.relauncher.FMLRelaunchLog instance = cpw.mods.fml.relauncher.FMLRelaunchLog.log;
|
||||
public static final FMLRelaunchLog instance = FMLRelaunchLog.log;
|
||||
|
||||
private AELog() {
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
|
||||
@Override
|
||||
public ItemStack[] allStacks(int stackSize)
|
||||
{
|
||||
ItemStack is[] = new ItemStack[this.colors.length];
|
||||
ItemStack[] is = new ItemStack[this.colors.length];
|
||||
for (int x = 0; x < is.length; x++)
|
||||
is[x] = this.colors[x].stack( 1 );
|
||||
return is;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user