Merge branch 'rv2' of https://github.com/AppliedEnergistics/Applied-Energistics-2 into rv2
This commit is contained in:
commit
b3e6c89775
255 changed files with 1773 additions and 1767 deletions
|
@ -29,12 +29,17 @@ configurations.all {
|
||||||
resolutionStrategy.cacheDynamicVersionsFor 7200, 'hours'
|
resolutionStrategy.cacheDynamicVersionsFor 7200, 'hours'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||||
targetCompatibility = JavaVersion.VERSION_1_6
|
targetCompatibility = JavaVersion.VERSION_1_6
|
||||||
|
|
||||||
version = config.version + "-" + config.aechannel + "-" + config.build
|
version = config.version + "-" + config.aechannel + "-" + config.build
|
||||||
group = config.group
|
group = config.group
|
||||||
archivesBaseName = config.archivesBaseName
|
archivesBaseName = config.archivesBaseName
|
||||||
|
|
||||||
|
if (hasProperty("teamcity")) {
|
||||||
|
version = teamcity["build.number"]
|
||||||
|
}
|
||||||
|
|
||||||
// Add Coremod Manifest
|
// Add Coremod Manifest
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
|
|
|
@ -1,14 +1,41 @@
|
||||||
version=rv2
|
version=rv2
|
||||||
aechannel=alpha
|
aechannel=alpha
|
||||||
build=_
|
build=0
|
||||||
group=appeng
|
group=appeng
|
||||||
archivesBaseName=appliedenergistics2
|
archivesBaseName=appliedenergistics2
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
# Versions #
|
||||||
|
#########################################################
|
||||||
minecraft_version=1.7.10
|
minecraft_version=1.7.10
|
||||||
forge_version=10.13.1.1217
|
forge_version=10.13.1.1217
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
# APIs used for development #
|
||||||
|
#########################################################
|
||||||
cb_minecraft_version=1.7.10
|
cb_minecraft_version=1.7.10
|
||||||
fmp_version=1.1.0.306
|
fmp_version=1.1.0.306
|
||||||
code_chicken_lib_version=1.1.1.104
|
code_chicken_lib_version=1.1.1.104
|
||||||
code_chicken_core_version=1.0.3.26
|
code_chicken_core_version=1.0.3.26
|
||||||
nei_version=1.0.3.56
|
nei_version=1.0.3.56
|
||||||
ic2_version=2.2.643
|
|
||||||
waila_version=1.5.3a_1.7.10
|
waila_version=1.5.3a_1.7.10
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
# API Stubs #
|
||||||
|
# Note: Do not edit these version numbers as they are #
|
||||||
|
# not the version of the mod, but stub code for AE2 to #
|
||||||
|
# compile #
|
||||||
|
#########################################################
|
||||||
|
api_betterstorage_version=1
|
||||||
|
api_coloredlightscore_version=1
|
||||||
|
api_craftguide_version=1
|
||||||
|
api_ic2_version=1
|
||||||
|
api_immibis_version=1
|
||||||
|
api_invtweaks_version=1
|
||||||
|
api_mekansim_version=1
|
||||||
|
api_mfr_version=1
|
||||||
|
api_railcraft_version=1
|
||||||
|
api_rblocks_version=1
|
||||||
|
api_rf_version=1
|
||||||
|
api_rotarycraft_version=1
|
||||||
|
dev_buildcraft_version=1
|
|
@ -11,7 +11,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name "FireBall API Depo"
|
name "FireBall API Depot"
|
||||||
url "http://dl.tsr.me/artifactory/libs-release-local"
|
url "http://dl.tsr.me/artifactory/libs-release-local"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,19 +25,19 @@ dependencies {
|
||||||
|
|
||||||
compile "mcp.mobius.waila:Waila:${config.waila_version}"
|
compile "mcp.mobius.waila:Waila:${config.waila_version}"
|
||||||
|
|
||||||
compile(group: 'api', name: 'betterstorage', version: '1')
|
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
|
||||||
compile(group: 'api', name: 'coloredlightscore', version: '1')
|
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
|
||||||
compile(group: 'api', name: 'craftguide', version: '1')
|
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
|
||||||
compile(group: 'api', name: 'ic2', version: '1')
|
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
|
||||||
compile(group: 'api', name: 'immibis', version: '1')
|
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
|
||||||
compile(group: 'api', name: 'invtweaks', version: '1')
|
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
|
||||||
compile(group: 'api', name: 'mekansim', version: '1')
|
compile(group: 'api', name: 'mekansim', version: "${config.api_mekansim_version}")
|
||||||
compile(group: 'api', name: 'mfr', version: '1')
|
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
|
||||||
compile(group: 'api', name: 'railcraft', version: '1')
|
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
|
||||||
compile(group: 'api', name: 'rblocks', version: '1')
|
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
|
||||||
compile(group: 'api', name: 'rf', version: '1')
|
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
|
||||||
compile(group: 'api', name: 'rotarycraft', version: '1')
|
compile(group: 'api', name: 'rotarycraft', version: "${config.api_rotarycraft_version}")
|
||||||
compile(group: 'dev', name: 'buildcraft', version: '1')
|
compile(group: 'dev', name: 'buildcraft', version: "${config.dev_buildcraft_version}")
|
||||||
|
|
||||||
// add hacked buildcraft jar to compile time (for facades)
|
// add hacked buildcraft jar to compile time (for facades)
|
||||||
compile fileTree(dir: 'libs', include: '*.jar')
|
compile fileTree(dir: 'libs', include: '*.jar')
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 74e4e50c76e812cc227bea020f3c8646eacfedb1
|
Subproject commit 65dfd7ace777c4972e920df715b34d84530ec637
|
|
@ -60,8 +60,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public class AEBaseBlock extends BlockContainer implements IAEFeature
|
public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
{
|
{
|
||||||
|
|
||||||
private String FeatureFullname;
|
private String featureFullName;
|
||||||
private String FeatureSubname;
|
private String featureSubName;
|
||||||
private AEFeatureHandler feature;
|
private AEFeatureHandler feature;
|
||||||
|
|
||||||
private Class<? extends TileEntity> tileEntityType = null;
|
private Class<? extends TileEntity> tileEntityType = null;
|
||||||
|
@ -79,7 +79,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return FeatureFullname;
|
return featureFullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
@ -178,14 +178,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
protected void setTileEntity(Class<? extends TileEntity> c)
|
protected void setTileEntity(Class<? extends TileEntity> c)
|
||||||
{
|
{
|
||||||
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
|
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
|
||||||
GameRegistry.registerTileEntity( tileEntityType = c, FeatureFullname );
|
GameRegistry.registerTileEntity( tileEntityType = c, featureFullName );
|
||||||
isInventory = IInventory.class.isAssignableFrom( c );
|
isInventory = IInventory.class.isAssignableFrom( c );
|
||||||
setTileProvider( hasBlockTileEntity() );
|
setTileProvider( hasBlockTileEntity() );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setFeature(EnumSet<AEFeature> f)
|
protected void setFeature(EnumSet<AEFeature> f)
|
||||||
{
|
{
|
||||||
feature = new AEFeatureHandler( f, this, FeatureSubname );
|
feature = new AEFeatureHandler( f, this, featureSubName );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AEBaseBlock(Class<?> c, Material mat) {
|
protected AEBaseBlock(Class<?> c, Material mat) {
|
||||||
|
@ -203,7 +203,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
|
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AEBaseBlock(Class<?> c, Material mat, String subname) {
|
protected AEBaseBlock(Class<?> c, Material mat, String subName) {
|
||||||
super( mat );
|
super( mat );
|
||||||
|
|
||||||
if ( mat == AEGlassMaterial.instance )
|
if ( mat == AEGlassMaterial.instance )
|
||||||
|
@ -215,8 +215,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
else
|
else
|
||||||
setStepSound( Block.soundTypeMetal );
|
setStepSound( Block.soundTypeMetal );
|
||||||
|
|
||||||
FeatureFullname = AEFeatureHandler.getName( c, subname );
|
featureFullName = AEFeatureHandler.getName( c, subName );
|
||||||
FeatureSubname = subname;
|
featureSubName = subName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -689,7 +689,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
|
|
||||||
if ( is.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus) )
|
if ( is.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus) )
|
||||||
{
|
{
|
||||||
IMemoryCard memc = (IMemoryCard) is.getItem();
|
IMemoryCard memoryCard = (IMemoryCard) is.getItem();
|
||||||
if ( player.isSneaking() )
|
if ( player.isSneaking() )
|
||||||
{
|
{
|
||||||
AEBaseTile t = getTileEntity( w, x, y, z );
|
AEBaseTile t = getTileEntity( w, x, y, z );
|
||||||
|
@ -699,24 +699,24 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
|
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
|
||||||
if ( data != null )
|
if ( data != null )
|
||||||
{
|
{
|
||||||
memc.setMemoryCardContents( is, name, data );
|
memoryCard.setMemoryCardContents( is, name, data );
|
||||||
memc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
|
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String name = memc.getSettingsName( is );
|
String name = memoryCard.getSettingsName( is );
|
||||||
NBTTagCompound data = memc.getData( is );
|
NBTTagCompound data = memoryCard.getData( is );
|
||||||
if ( getUnlocalizedName().equals( name ) )
|
if ( getUnlocalizedName().equals( name ) )
|
||||||
{
|
{
|
||||||
AEBaseTile t = getTileEntity( w, x, y, z );
|
AEBaseTile t = getTileEntity( w, x, y, z );
|
||||||
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
|
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
|
||||||
memc.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
memc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class BlockCellWorkbench extends AEBaseBlock
|
||||||
if ( tg != null )
|
if ( tg != null )
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELLWORKBENCH );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -52,15 +52,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||||
if ( !AEConfig.instance.enableEffects )
|
if ( !AEConfig.instance.enableEffects )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TileQuartzGrowthAccelerator tqga = getTileEntity( w, x, y, z );
|
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = getTileEntity( w, x, y, z );
|
||||||
|
|
||||||
if ( tqga != null && tqga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||||
{
|
{
|
||||||
double d0 = (double) (r.nextFloat() - 0.5F);
|
double d0 = (double) (r.nextFloat() - 0.5F);
|
||||||
double d1 = (double) (r.nextFloat() - 0.5F);
|
double d1 = (double) (r.nextFloat() - 0.5F);
|
||||||
|
|
||||||
ForgeDirection up = tqga.getUp();
|
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
|
||||||
ForgeDirection forward = tqga.getForward();
|
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
|
||||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||||
|
|
||||||
double rx = 0.5 + x;
|
double rx = 0.5 + x;
|
||||||
|
|
|
@ -127,19 +127,19 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||||
{
|
{
|
||||||
if ( !w.isRemote )
|
if ( !w.isRemote )
|
||||||
{
|
{
|
||||||
EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() );
|
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() );
|
||||||
entitytntprimed.fuse = w.rand.nextInt( entitytntprimed.fuse / 4 ) + entitytntprimed.fuse / 8;
|
primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8;
|
||||||
w.spawnEntityInWorld( entitytntprimed );
|
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startFuse(World w, int x, int y, int z, EntityLivingBase ignitor)
|
public void startFuse(World w, int x, int y, int z, EntityLivingBase igniter)
|
||||||
{
|
{
|
||||||
if ( !w.isRemote )
|
if ( !w.isRemote )
|
||||||
{
|
{
|
||||||
EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, ignitor );
|
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, igniter );
|
||||||
w.spawnEntityInWorld( entitytntprimed );
|
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||||
w.playSoundAtEntity( entitytntprimed, "game.tnt.primed", 1.0F, 1.0F );
|
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockVibrationChamber extends AEBaseBlock
|
||||||
TileVibrationChamber tc = getTileEntity( w, x, y, z );
|
TileVibrationChamber tc = getTileEntity( w, x, y, z );
|
||||||
if ( tc != null && !player.isSneaking() )
|
if ( tc != null && !player.isSneaking() )
|
||||||
{
|
{
|
||||||
Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATIONCHAMBER );
|
Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATION_CHAMBER );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,10 +92,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
|
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
|
||||||
{
|
{
|
||||||
Object pobj = cb( world, target.blockX, target.blockY, target.blockZ );
|
Object object = cb( world, target.blockX, target.blockY, target.blockZ );
|
||||||
if ( pobj instanceof IPartHost )
|
if ( object instanceof IPartHost )
|
||||||
{
|
{
|
||||||
IPartHost host = (IPartHost) pobj;
|
IPartHost host = (IPartHost) object;
|
||||||
|
|
||||||
for (ForgeDirection side : ForgeDirection.values())
|
for (ForgeDirection side : ForgeDirection.values())
|
||||||
{
|
{
|
||||||
|
@ -138,10 +138,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
|
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
|
||||||
{
|
{
|
||||||
Object pobj = cb( world, x, y, z );
|
Object object = cb( world, x, y, z );
|
||||||
if ( pobj instanceof IPartHost )
|
if ( object instanceof IPartHost )
|
||||||
{
|
{
|
||||||
IPartHost host = (IPartHost) pobj;
|
IPartHost host = (IPartHost) object;
|
||||||
|
|
||||||
for (ForgeDirection side : ForgeDirection.values())
|
for (ForgeDirection side : ForgeDirection.values())
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber)
|
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber)
|
||||||
{
|
{
|
||||||
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
|
||||||
if ( bridge != null )
|
if ( bridge != null )
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber)
|
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber)
|
||||||
{
|
{
|
||||||
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
|
||||||
if ( bridge != null )
|
if ( bridge != null )
|
||||||
|
|
|
@ -113,11 +113,11 @@ public class OreQuartz extends AEBaseBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockid, float something, int meta)
|
public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockID, float something, int meta)
|
||||||
{
|
{
|
||||||
super.dropBlockAsItemWithChance( w, x, y, z, blockid, something, meta );
|
super.dropBlockAsItemWithChance( w, x, y, z, blockID, something, meta );
|
||||||
|
|
||||||
if ( getItemDropped( blockid, w.rand, meta ) != Item.getItemFromBlock( this ) )
|
if ( getItemDropped( blockID, w.rand, meta ) != Item.getItemFromBlock( this ) )
|
||||||
{
|
{
|
||||||
int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class BlockSpatialIOPort extends AEBaseBlock
|
||||||
if ( tg != null )
|
if ( tg != null )
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIALIOPORT );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class ClientHelper extends ServerHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postinit()
|
public void postInit()
|
||||||
{
|
{
|
||||||
RenderingRegistry.registerBlockHandler( WorldRender.instance );
|
RenderingRegistry.registerBlockHandler( WorldRender.instance );
|
||||||
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
||||||
|
|
|
@ -127,7 +127,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
((AEBaseContainer) inventorySlots).setTargetStack( item );
|
((AEBaseContainer) inventorySlots).setTargetStack( item );
|
||||||
InventoryAction direction = wheel > 0 ? InventoryAction.ROLLDOWN : InventoryAction.ROLLUP;
|
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
|
||||||
int times = Math.abs( wheel );
|
int times = Math.abs( wheel );
|
||||||
for (int h = 0; h < times; h++)
|
for (int h = 0; h < times; h++)
|
||||||
{
|
{
|
||||||
|
@ -187,7 +187,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
if ( slot instanceof SlotFake )
|
if ( slot instanceof SlotFake )
|
||||||
{
|
{
|
||||||
InventoryAction action = null;
|
InventoryAction action = null;
|
||||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
|
|
||||||
if ( drag_click.size() > 1 )
|
if ( drag_click.size() > 1 )
|
||||||
return;
|
return;
|
||||||
|
@ -283,7 +283,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case 0: // pickup / set-down.
|
case 0: // pickup / set-down.
|
||||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||||
|
@ -327,11 +327,11 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case 0: // pickup / set-down.
|
case 0: // pickup / set-down.
|
||||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
stack = ((SlotME) slot).getAEStack();
|
stack = ((SlotME) slot).getAEStack();
|
||||||
|
|
||||||
if ( stack != null && action == InventoryAction.PICKUP_OR_SETDOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
if ( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||||
action = InventoryAction.AUTOCRAFT;
|
action = InventoryAction.AUTO_CRAFT;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -343,7 +343,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
|
|
||||||
stack = ((SlotME) slot).getAEStack();
|
stack = ((SlotME) slot).getAEStack();
|
||||||
if ( stack != null && stack.isCraftable() )
|
if ( stack != null && stack.isCraftable() )
|
||||||
action = InventoryAction.AUTOCRAFT;
|
action = InventoryAction.AUTO_CRAFT;
|
||||||
|
|
||||||
else if ( player.capabilities.isCreativeMode )
|
else if ( player.capabilities.isCreativeMode )
|
||||||
{
|
{
|
||||||
|
@ -428,7 +428,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
{
|
{
|
||||||
for (Slot dr : drag_click)
|
for (Slot dr : drag_click)
|
||||||
{
|
{
|
||||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SETDOWN : InventoryAction.PLACE_SINGLE,
|
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
|
||||||
dr.slotNumber, 0 );
|
dr.slotNumber, 0 );
|
||||||
NetworkHandler.instance.sendToServer( p );
|
NetworkHandler.instance.sendToServer( p );
|
||||||
}
|
}
|
||||||
|
@ -724,14 +724,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Slot getSlot(int mousex, int mousey)
|
protected Slot getSlot(int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); ++j1)
|
for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); ++j1)
|
||||||
{
|
{
|
||||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get( j1 );
|
Slot slot = (Slot) this.inventorySlots.inventorySlots.get( j1 );
|
||||||
|
|
||||||
// isPointInRegion
|
// isPointInRegion
|
||||||
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mousex, mousey ) )
|
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||||
{
|
{
|
||||||
return slot;
|
return slot;
|
||||||
}
|
}
|
||||||
|
@ -743,11 +743,11 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
protected static String join(Collection<?> s, String delimiter)
|
protected static String join(Collection<?> s, String delimiter)
|
||||||
{
|
{
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
Iterator iter = s.iterator();
|
Iterator iterator = s.iterator();
|
||||||
while (iter.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
builder.append( iter.next() );
|
builder.append( iterator.next() );
|
||||||
if ( !iter.hasNext() )
|
if ( !iterator.hasNext() )
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -758,16 +758,16 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
|
|
||||||
boolean useNEI = false;
|
boolean useNEI = false;
|
||||||
|
|
||||||
private RenderItem setItemRender(RenderItem aeri2)
|
private RenderItem setItemRender(RenderItem item)
|
||||||
{
|
{
|
||||||
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) )
|
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) )
|
||||||
{
|
{
|
||||||
return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( aeri2 );
|
return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( item );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RenderItem ri = itemRender;
|
RenderItem ri = itemRender;
|
||||||
itemRender = aeri2;
|
itemRender = item;
|
||||||
return ri;
|
return ri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -788,7 +788,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AppEngRenderItem aeri = new AppEngRenderItem();
|
AppEngRenderItem aeRenderItem = new AppEngRenderItem();
|
||||||
|
|
||||||
protected boolean isPowered()
|
protected boolean isPowered()
|
||||||
{
|
{
|
||||||
|
@ -809,7 +809,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
{
|
{
|
||||||
if ( s instanceof SlotME )
|
if ( s instanceof SlotME )
|
||||||
{
|
{
|
||||||
RenderItem pIR = setItemRender( aeri );
|
RenderItem pIR = setItemRender( aeRenderItem );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.zLevel = 100.0F;
|
this.zLevel = 100.0F;
|
||||||
|
@ -826,9 +826,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||||
itemRender.zLevel = 0.0F;
|
itemRender.zLevel = 0.0F;
|
||||||
|
|
||||||
if ( s instanceof SlotME )
|
if ( s instanceof SlotME )
|
||||||
aeri.aestack = ((SlotME) s).getAEStack();
|
aeRenderItem.aeStack = ((SlotME) s).getAEStack();
|
||||||
else
|
else
|
||||||
aeri.aestack = null;
|
aeRenderItem.aeStack = null;
|
||||||
|
|
||||||
safeDrawSlot( s );
|
safeDrawSlot( s );
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,11 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||||
super( container );
|
super( container );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> handleItemTooltip(ItemStack stack, int mousex, int mousey, List<String> currenttip)
|
public List<String> handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
|
||||||
{
|
{
|
||||||
if ( stack != null )
|
if ( stack != null )
|
||||||
{
|
{
|
||||||
Slot s = getSlot( mousex, mousey );
|
Slot s = getSlot( mouseX, mouseY );
|
||||||
if ( s instanceof SlotME )
|
if ( s instanceof SlotME )
|
||||||
{
|
{
|
||||||
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||||
|
@ -41,18 +41,18 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||||
if ( myStack != null )
|
if ( myStack != null )
|
||||||
{
|
{
|
||||||
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
|
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
|
||||||
currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||||
|
|
||||||
if ( myStack.getCountRequestable() > 0 )
|
if ( myStack.getCountRequestable() > 0 )
|
||||||
currenttip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
currentToolTip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||||
}
|
}
|
||||||
else if ( stack.stackSize > BigNumber || (stack.stackSize > 1 && stack.isItemDamaged()) )
|
else if ( stack.stackSize > BigNumber || (stack.stackSize > 1 && stack.isItemDamaged()) )
|
||||||
{
|
{
|
||||||
currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return currenttip;
|
return currentToolTip;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vanilla version...
|
// Vanilla version...
|
||||||
|
@ -78,15 +78,15 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||||
|
|
||||||
if ( myStack != null )
|
if ( myStack != null )
|
||||||
{
|
{
|
||||||
List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||||
|
|
||||||
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
|
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
|
||||||
currenttip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||||
|
|
||||||
if ( myStack.getCountRequestable() > 0 )
|
if ( myStack.getCountRequestable() > 0 )
|
||||||
currenttip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||||
|
|
||||||
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
|
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||||
}
|
}
|
||||||
else if ( stack != null && stack.stackSize > BigNumber )
|
else if ( stack != null && stack.stackSize > BigNumber )
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ import appeng.util.Platform;
|
||||||
public class GuiCellWorkbench extends GuiUpgradeable
|
public class GuiCellWorkbench extends GuiUpgradeable
|
||||||
{
|
{
|
||||||
|
|
||||||
ContainerCellWorkbench ccwb;
|
ContainerCellWorkbench workbench;
|
||||||
TileCellWorkbench tcw;
|
TileCellWorkbench tcw;
|
||||||
|
|
||||||
GuiImgButton clear;
|
GuiImgButton clear;
|
||||||
|
@ -36,7 +36,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||||
|
|
||||||
public GuiCellWorkbench(InventoryPlayer inventoryPlayer, TileCellWorkbench te) {
|
public GuiCellWorkbench(InventoryPlayer inventoryPlayer, TileCellWorkbench te) {
|
||||||
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
|
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
|
||||||
ccwb = (ContainerCellWorkbench) inventorySlots;
|
workbench = (ContainerCellWorkbench) inventorySlots;
|
||||||
ySize = 251;
|
ySize = 251;
|
||||||
tcw = te;
|
tcw = te;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||||
@Override
|
@Override
|
||||||
protected boolean drawUpgrades()
|
protected boolean drawUpgrades()
|
||||||
{
|
{
|
||||||
return ccwb.availableUpgrades() > 0;
|
return workbench.availableUpgrades() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,17 +62,17 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
|
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
|
||||||
if ( drawUpgrades() )
|
if ( drawUpgrades() )
|
||||||
{
|
{
|
||||||
if ( ccwb.availableUpgrades() <= 8 )
|
if ( workbench.availableUpgrades() <= 8 )
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + ccwb.availableUpgrades() * 18 );
|
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + workbench.availableUpgrades() * 18 );
|
||||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (ccwb.availableUpgrades()) * 18), 177, 151, 35, 7 );
|
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (workbench.availableUpgrades()) * 18), 177, 151, 35, 7 );
|
||||||
}
|
}
|
||||||
else if ( ccwb.availableUpgrades() <= 16 )
|
else if ( workbench.availableUpgrades() <= 16 )
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 );
|
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 );
|
||||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (8) * 18), 177, 151, 35, 7 );
|
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (8) * 18), 177, 151, 35, 7 );
|
||||||
|
|
||||||
int dx = ccwb.availableUpgrades() - 8;
|
int dx = workbench.availableUpgrades() - 8;
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||||
if ( dx == 8 )
|
if ( dx == 8 )
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
||||||
|
@ -88,7 +88,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 );
|
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 );
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (8) * 18), 186, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (8) * 18), 186, 151, 35 - 8, 7 );
|
||||||
|
|
||||||
int dx = ccwb.availableUpgrades() - 16;
|
int dx = workbench.availableUpgrades() - 16;
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||||
if ( dx == 8 )
|
if ( dx == 8 )
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
||||||
|
@ -150,10 +150,10 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||||
|
|
||||||
protected void handleButtonVisibility()
|
protected void handleButtonVisibility()
|
||||||
{
|
{
|
||||||
copyMode.setState( ccwb.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
||||||
|
|
||||||
boolean hasFuzzy = false;
|
boolean hasFuzzy = false;
|
||||||
IInventory inv = ccwb.getCellUpgradeInventory();
|
IInventory inv = workbench.getCellUpgradeInventory();
|
||||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||||
{
|
{
|
||||||
ItemStack is = inv.getStackInSlot( x );
|
ItemStack is = inv.getStackInSlot( x );
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||||
|
|
||||||
GuiButton cancel;
|
GuiButton cancel;
|
||||||
GuiButton start;
|
GuiButton start;
|
||||||
GuiButton selectcpu;
|
GuiButton selectCPU;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui()
|
public void initGui()
|
||||||
|
@ -95,10 +95,10 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||||
start.enabled = false;
|
start.enabled = false;
|
||||||
buttonList.add( start );
|
buttonList.add( start );
|
||||||
|
|
||||||
selectcpu = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
|
selectCPU = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
|
||||||
+ GuiText.Automatic );
|
+ GuiText.Automatic );
|
||||||
selectcpu.enabled = false;
|
selectCPU.enabled = false;
|
||||||
buttonList.add( selectcpu );
|
buttonList.add( selectCPU );
|
||||||
|
|
||||||
if ( OriginalGui != null )
|
if ( OriginalGui != null )
|
||||||
cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||||
|
@ -123,7 +123,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||||
if ( ccc.noCPU )
|
if ( ccc.noCPU )
|
||||||
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
||||||
|
|
||||||
selectcpu.displayString = btnTextText;
|
selectCPU.displayString = btnTextText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -133,7 +133,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||||
|
|
||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
boolean backwards = Mouse.isButtonDown( 1 );
|
||||||
|
|
||||||
if ( btn == selectcpu )
|
if ( btn == selectCPU )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -315,25 +315,25 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||||
updateCPUButtonText();
|
updateCPUButtonText();
|
||||||
|
|
||||||
start.enabled = ccc.noCPU || isSimulation() ? false : true;
|
start.enabled = ccc.noCPU || isSimulation() ? false : true;
|
||||||
selectcpu.enabled = isSimulation() ? false : true;
|
selectCPU.enabled = isSimulation() ? false : true;
|
||||||
|
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
|
||||||
int gx = (width - xSize) / 2;
|
int gx = (width - xSize) / 2;
|
||||||
int gy = (height - ySize) / 2;
|
int gy = (height - ySize) / 2;
|
||||||
int yoff = 23;
|
int offY = 23;
|
||||||
|
|
||||||
tooltip = -1;
|
tooltip = -1;
|
||||||
|
|
||||||
for (int z = 0; z <= 4 * 5; z++)
|
for (int z = 0; z <= 4 * 5; z++)
|
||||||
{
|
{
|
||||||
int minX = gx + 9 + x * 67;
|
int minX = gx + 9 + x * 67;
|
||||||
int minY = gy + 22 + y * yoff;
|
int minY = gy + 22 + y * offY;
|
||||||
|
|
||||||
if ( minX < mouse_x && minX + 67 > mouse_x )
|
if ( minX < mouse_x && minX + 67 > mouse_x )
|
||||||
{
|
{
|
||||||
if ( minY < mouse_y && minY + yoff - 2 > mouse_y )
|
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
|
||||||
{
|
{
|
||||||
tooltip = z;
|
tooltip = z;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -223,18 +223,18 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||||
|
|
||||||
int gx = (width - xSize) / 2;
|
int gx = (width - xSize) / 2;
|
||||||
int gy = (height - ySize) / 2;
|
int gy = (height - ySize) / 2;
|
||||||
int yoff = 23;
|
int offY = 23;
|
||||||
|
|
||||||
tooltip = -1;
|
tooltip = -1;
|
||||||
|
|
||||||
for (int z = 0; z <= 4 * 5; z++)
|
for (int z = 0; z <= 4 * 5; z++)
|
||||||
{
|
{
|
||||||
int minX = gx + 9 + x * 67;
|
int minX = gx + 9 + x * 67;
|
||||||
int minY = gy + 22 + y * yoff;
|
int minY = gy + 22 + y * offY;
|
||||||
|
|
||||||
if ( minX < mouse_x && minX + 67 > mouse_x )
|
if ( minX < mouse_x && minX + 67 > mouse_x )
|
||||||
{
|
{
|
||||||
if ( minY < mouse_y && minY + yoff - 2 > mouse_y )
|
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
|
||||||
{
|
{
|
||||||
tooltip = z;
|
tooltip = z;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||||
{
|
{
|
||||||
|
|
||||||
ContainerCraftingStatus ccc;
|
ContainerCraftingStatus ccc;
|
||||||
GuiButton selectcpu;
|
GuiButton selectCPU;
|
||||||
|
|
||||||
GuiTabButton originalGuiBtn;
|
GuiTabButton originalGuiBtn;
|
||||||
GuiBridge OriginalGui;
|
GuiBridge OriginalGui;
|
||||||
|
@ -74,7 +74,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||||
|
|
||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
boolean backwards = Mouse.isButtonDown( 1 );
|
||||||
|
|
||||||
if ( btn == selectcpu )
|
if ( btn == selectCPU )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -110,9 +110,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||||
{
|
{
|
||||||
super.initGui();
|
super.initGui();
|
||||||
|
|
||||||
selectcpu = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||||
// selectcpu.enabled = false;
|
// selectCPU.enabled = false;
|
||||||
buttonList.add( selectcpu );
|
buttonList.add( selectCPU );
|
||||||
|
|
||||||
if ( myIcon != null )
|
if ( myIcon != null )
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||||
if ( ccc.noCPU )
|
if ( ccc.noCPU )
|
||||||
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
||||||
|
|
||||||
selectcpu.displayString = btnTextText;
|
selectCPU.displayString = btnTextText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -183,12 +183,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||||
{
|
{
|
||||||
lines.add( n );
|
lines.add( n );
|
||||||
|
|
||||||
ArrayList<ClientDCInternalInv> lset = new ArrayList();
|
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList();
|
||||||
lset.addAll( byName.get( n ) );
|
clientInventories.addAll( byName.get( n ) );
|
||||||
|
|
||||||
Collections.sort( lset );
|
Collections.sort( clientInventories );
|
||||||
|
|
||||||
for (ClientDCInternalInv i : lset)
|
for (ClientDCInternalInv i : clientInventories)
|
||||||
{
|
{
|
||||||
lines.add( i );
|
lines.add( i );
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler;
|
||||||
public class GuiMAC extends GuiUpgradeable
|
public class GuiMAC extends GuiUpgradeable
|
||||||
{
|
{
|
||||||
|
|
||||||
ContainerMAC cmac;
|
ContainerMAC container;
|
||||||
GuiProgressBar pb;
|
GuiProgressBar pb;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -37,7 +37,7 @@ public class GuiMAC extends GuiUpgradeable
|
||||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
pb.max = 100;
|
pb.max = 100;
|
||||||
pb.current = cmac.craftProgress;
|
pb.current = container.craftProgress;
|
||||||
pb.FullMsg = pb.current + "%";
|
pb.FullMsg = pb.current + "%";
|
||||||
|
|
||||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||||
|
@ -58,7 +58,7 @@ public class GuiMAC extends GuiUpgradeable
|
||||||
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) {
|
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) {
|
||||||
super( new ContainerMAC( inventoryPlayer, te ) );
|
super( new ContainerMAC( inventoryPlayer, te ) );
|
||||||
this.ySize = 197;
|
this.ySize = 197;
|
||||||
this.cmac = (ContainerMAC) this.inventorySlots;
|
this.container = (ContainerMAC) this.inventorySlots;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected GuiText getName()
|
protected GuiText getName()
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
|
|
||||||
GuiText myName;
|
GuiText myName;
|
||||||
|
|
||||||
int xoffset = 9;
|
int offsetX = 9;
|
||||||
int perRow = 9;
|
int perRow = 9;
|
||||||
int reservedSpace = 0;
|
int reservedSpace = 0;
|
||||||
int lowerTextureOffset = 0;
|
int lowerTextureOffset = 0;
|
||||||
|
@ -83,7 +83,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
boolean viewCell;
|
boolean viewCell;
|
||||||
|
|
||||||
ItemStack myCurrentViewCells[] = new ItemStack[5];
|
ItemStack myCurrentViewCells[] = new ItemStack[5];
|
||||||
ContainerMEMonitorable mecontainer;
|
ContainerMEMonitorable monitorableContainer;
|
||||||
|
|
||||||
public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||||
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) );
|
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) );
|
||||||
|
@ -104,7 +104,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
standardSize = xSize;
|
standardSize = xSize;
|
||||||
|
|
||||||
configSrc = ((IConfigurableObject) inventorySlots).getConfigManager();
|
configSrc = ((IConfigurableObject) inventorySlots).getConfigManager();
|
||||||
(mecontainer = (ContainerMEMonitorable) inventorySlots).gui = this;
|
(monitorableContainer = (ContainerMEMonitorable) inventorySlots).gui = this;
|
||||||
|
|
||||||
viewCell = te instanceof IViewCellStorage;
|
viewCell = te instanceof IViewCellStorage;
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
{
|
{
|
||||||
for (int x = 0; x < perRow; x++)
|
for (int x = 0; x < perRow; x++)
|
||||||
{
|
{
|
||||||
meSlots.add( new InternalSlotME( repo, x + y * perRow, xoffset + x * 18, 18 + y * 18 ) );
|
meSlots.add( new InternalSlotME( repo, x + y * perRow, offsetX + x * 18, 18 + y * 18 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
.getSetting( Settings.TERMINAL_STYLE ) ) );
|
.getSetting( Settings.TERMINAL_STYLE ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
|
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, offsetX ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
|
||||||
searchField.setEnableBackgroundDrawing( false );
|
searchField.setEnableBackgroundDrawing( false );
|
||||||
searchField.setMaxStringLength( 25 );
|
searchField.setMaxStringLength( 25 );
|
||||||
searchField.setTextColor( 0xFFFFFF );
|
searchField.setTextColor( 0xFFFFFF );
|
||||||
|
@ -373,7 +373,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
@Override
|
@Override
|
||||||
public void updateScreen()
|
public void updateScreen()
|
||||||
{
|
{
|
||||||
repo.setPower( mecontainer.hasPower );
|
repo.setPower( monitorableContainer.hasPower );
|
||||||
super.updateScreen();
|
super.updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,10 +399,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||||
|
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
if ( myCurrentViewCells[i] != mecontainer.cellView[i].getStack() )
|
if ( myCurrentViewCells[i] != monitorableContainer.cellView[i].getStack() )
|
||||||
{
|
{
|
||||||
update = true;
|
update = true;
|
||||||
myCurrentViewCells[i] = mecontainer.cellView[i].getStack();
|
myCurrentViewCells[i] = monitorableContainer.cellView[i].getStack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,11 +213,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override - NEI
|
// @Override - NEI
|
||||||
public List<String> handleItemTooltip(ItemStack stack, int mousex, int mousey, List<String> currenttip)
|
public List<String> handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
|
||||||
{
|
{
|
||||||
if ( stack != null )
|
if ( stack != null )
|
||||||
{
|
{
|
||||||
Slot s = getSlot( mousex, mousey );
|
Slot s = getSlot( mouseX, mouseY );
|
||||||
if ( s instanceof SlotME )
|
if ( s instanceof SlotME )
|
||||||
{
|
{
|
||||||
IAEItemStack myStack = null;
|
IAEItemStack myStack = null;
|
||||||
|
@ -233,13 +233,13 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||||
|
|
||||||
if ( myStack != null )
|
if ( myStack != null )
|
||||||
{
|
{
|
||||||
while (currenttip.size() > 1)
|
while (currentToolTip.size() > 1)
|
||||||
currenttip.remove( 1 );
|
currentToolTip.remove( 1 );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return currenttip;
|
return currentToolTip;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vanilla version...
|
// Vanilla version...
|
||||||
|
@ -261,15 +261,15 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||||
|
|
||||||
if ( myStack != null )
|
if ( myStack != null )
|
||||||
{
|
{
|
||||||
List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||||
|
|
||||||
while (currenttip.size() > 1)
|
while (currentToolTip.size() > 1)
|
||||||
currenttip.remove( 1 );
|
currentToolTip.remove( 1 );
|
||||||
|
|
||||||
currenttip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
|
currentToolTip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
|
||||||
currenttip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
||||||
|
|
||||||
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
|
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// super.drawItemStackTooltip( stack, x, y );
|
// super.drawItemStackTooltip( stack, x, y );
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class GuiPriority extends AEBaseGui
|
||||||
if ( target instanceof PartFormationPlane )
|
if ( target instanceof PartFormationPlane )
|
||||||
{
|
{
|
||||||
myIcon = AEApi.instance().parts().partFormationPlane.stack( 1 );
|
myIcon = AEApi.instance().parts().partFormationPlane.stack( 1 );
|
||||||
OriginalGui = GuiBridge.GUI_FPLANE;
|
OriginalGui = GuiBridge.GUI_FORMATION_PLANE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( target instanceof TileDrive )
|
if ( target instanceof TileDrive )
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
protected String getBackground()
|
protected String getBackground()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,13 +17,13 @@ import appeng.util.Platform;
|
||||||
public class GuiSpatialIOPort extends AEBaseGui
|
public class GuiSpatialIOPort extends AEBaseGui
|
||||||
{
|
{
|
||||||
|
|
||||||
ContainerSpatialIOPort csiop;
|
ContainerSpatialIOPort container;
|
||||||
GuiImgButton units;
|
GuiImgButton units;
|
||||||
|
|
||||||
public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) {
|
public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) {
|
||||||
super( new ContainerSpatialIOPort( inventoryPlayer, te ) );
|
super( new ContainerSpatialIOPort( inventoryPlayer, te ) );
|
||||||
this.ySize = 199;
|
this.ySize = 199;
|
||||||
csiop = (ContainerSpatialIOPort) inventorySlots;
|
container = (ContainerSpatialIOPort) inventorySlots;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,10 +59,10 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||||
@Override
|
@Override
|
||||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.currentPower, false ), 13, 21, 4210752 );
|
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( container.currentPower, false ), 13, 21, 4210752 );
|
||||||
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( csiop.maxPower, false ), 13, 31, 4210752 );
|
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( container.maxPower, false ), 13, 31, 4210752 );
|
||||||
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.reqPower, false ), 13, 78, 4210752 );
|
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( container.reqPower, false ), 13, 78, 4210752 );
|
||||||
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) csiop.eff) / 100) + "%", 13, 88, 4210752 );
|
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) container.eff) / 100) + "%", 13, 88, 4210752 );
|
||||||
|
|
||||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
|
fontRendererObj.drawString( getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
|
||||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96, 4210752 );
|
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96, 4210752 );
|
||||||
|
|
|
@ -96,9 +96,6 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||||
else if ( btn == priority )
|
else if ( btn == priority )
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
|
|
||||||
else if ( btn == fuzzyMode )
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
|
||||||
|
|
||||||
else if ( btn == rwMode )
|
else if ( btn == rwMode )
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( rwMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( rwMode.getSetting(), backwards ) );
|
||||||
|
|
||||||
|
|
|
@ -64,13 +64,13 @@ public class GuiWireless extends AEBaseGui
|
||||||
|
|
||||||
if ( cw.range > 0 )
|
if ( cw.range > 0 )
|
||||||
{
|
{
|
||||||
String msga = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m";
|
String firstMessage = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m";
|
||||||
String msgb = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
|
String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
|
||||||
|
|
||||||
int strWidth = Math.max( fontRendererObj.getStringWidth( msga ), fontRendererObj.getStringWidth( msgb ) );
|
int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) );
|
||||||
int cOffset = (this.xSize / 2) - (strWidth / 2);
|
int cOffset = (this.xSize / 2) - (strWidth / 2);
|
||||||
fontRendererObj.drawString( msga, cOffset, 20, 4210752 );
|
fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 );
|
||||||
fontRendererObj.drawString( msgb, cOffset, 20 + 12, 4210752 );
|
fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
return d.setting.equals( setting ) && d.value.equals( value );
|
return d.setting.equals( setting ) && d.value.equals( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
class BtnAppearance
|
class BtnAppearance
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
public int index;
|
public int index;
|
||||||
public String DisplayName;
|
public String DisplayName;
|
||||||
public String DisplayValue;
|
public String DisplayValue;
|
||||||
};
|
}
|
||||||
|
|
||||||
public boolean halfSize = false;
|
public boolean halfSize = false;
|
||||||
public String FillVar;
|
public String FillVar;
|
||||||
|
|
|
@ -11,7 +11,7 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||||
public enum Direction
|
public enum Direction
|
||||||
{
|
{
|
||||||
HORIZONTAL, VERTICAL
|
HORIZONTAL, VERTICAL
|
||||||
};
|
}
|
||||||
|
|
||||||
private ResourceLocation texture;
|
private ResourceLocation texture;
|
||||||
private int fill_u;
|
private int fill_u;
|
||||||
|
|
|
@ -122,9 +122,9 @@ public class ItemRepo
|
||||||
view.ensureCapacity( list.size() );
|
view.ensureCapacity( list.size() );
|
||||||
dsp.ensureCapacity( list.size() );
|
dsp.ensureCapacity( list.size() );
|
||||||
|
|
||||||
Enum vmode = sortSrc.getSortDisplay();
|
Enum viewMode = sortSrc.getSortDisplay();
|
||||||
Enum mode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||||
if ( mode == SearchBoxMode.NEI_AUTOSEARCH || mode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
if ( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||||
updateNEI( searchString );
|
updateNEI( searchString );
|
||||||
|
|
||||||
innerSearch = searchString;
|
innerSearch = searchString;
|
||||||
|
@ -164,16 +164,16 @@ public class ItemRepo
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( vmode == ViewItems.CRAFTABLE && !is.isCraftable() )
|
if ( viewMode == ViewItems.CRAFTABLE && !is.isCraftable() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( vmode == ViewItems.CRAFTABLE )
|
if ( viewMode == ViewItems.CRAFTABLE )
|
||||||
{
|
{
|
||||||
is = is.copy();
|
is = is.copy();
|
||||||
is.setStackSize( 0 );
|
is.setStackSize( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( vmode == ViewItems.STORED && is.getStackSize() == 0 )
|
if ( viewMode == ViewItems.STORED && is.getStackSize() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||||
|
|
|
@ -14,7 +14,7 @@ import appeng.core.AEConfig;
|
||||||
public class AppEngRenderItem extends RenderItem
|
public class AppEngRenderItem extends RenderItem
|
||||||
{
|
{
|
||||||
|
|
||||||
public IAEItemStack aestack;
|
public IAEItemStack aeStack;
|
||||||
|
|
||||||
private void renderQuad(Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
|
private void renderQuad(Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ public class AppEngRenderItem extends RenderItem
|
||||||
GL11.glEnable( GL11.GL_DEPTH_TEST );
|
GL11.glEnable( GL11.GL_DEPTH_TEST );
|
||||||
}
|
}
|
||||||
|
|
||||||
long amount = aestack != null ? aestack.getStackSize() : is.stackSize;
|
long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize;
|
||||||
if ( amount > 999999999999L )
|
if ( amount > 999999999999L )
|
||||||
amount = 999999999999L;
|
amount = 999999999999L;
|
||||||
|
|
||||||
|
|
|
@ -255,9 +255,9 @@ public class BaseBlockRender
|
||||||
this( false, 20 );
|
this( false, 20 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBlockRender(boolean enableTESR, double TESRrange) {
|
public BaseBlockRender(boolean enableTESR, double tileEntitySpecialRendererRange) {
|
||||||
hasTESR = enableTESR;
|
hasTESR = enableTESR;
|
||||||
MAX_DISTANCE = TESRrange;
|
MAX_DISTANCE = tileEntitySpecialRendererRange;
|
||||||
setOriMap();
|
setOriMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,52 +587,52 @@ public class BaseBlockRender
|
||||||
Tessellator tess = Tessellator.instance;
|
Tessellator tess = Tessellator.instance;
|
||||||
|
|
||||||
double offsetX = 0.0, offsetY = 0.0, offsetZ = 0.0;
|
double offsetX = 0.0, offsetY = 0.0, offsetZ = 0.0;
|
||||||
double layaX = 0.0, layaY = 0.0, layaZ = 0.0;
|
double layerAX = 0.0, layerAY = 0.0, layerAZ = 0.0;
|
||||||
double laybX = 0.0, laybY = 0.0, laybZ = 0.0;
|
double layerBX = 0.0, layerBY = 0.0, layerBZ = 0.0;
|
||||||
|
|
||||||
boolean flip = false;
|
boolean flip = false;
|
||||||
switch (orientation)
|
switch (orientation)
|
||||||
{
|
{
|
||||||
case NORTH:
|
case NORTH:
|
||||||
|
|
||||||
layaX = 1.0;
|
layerAX = 1.0;
|
||||||
laybY = 1.0;
|
layerBY = 1.0;
|
||||||
flip = true;
|
flip = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
|
|
||||||
layaX = 1.0;
|
layerAX = 1.0;
|
||||||
laybY = 1.0;
|
layerBY = 1.0;
|
||||||
offsetZ = 1.0;
|
offsetZ = 1.0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case EAST:
|
case EAST:
|
||||||
|
|
||||||
flip = true;
|
flip = true;
|
||||||
layaZ = 1.0;
|
layerAZ = 1.0;
|
||||||
laybY = 1.0;
|
layerBY = 1.0;
|
||||||
offsetX = 1.0;
|
offsetX = 1.0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WEST:
|
case WEST:
|
||||||
|
|
||||||
layaZ = 1.0;
|
layerAZ = 1.0;
|
||||||
laybY = 1.0;
|
layerBY = 1.0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case UP:
|
case UP:
|
||||||
|
|
||||||
flip = true;
|
flip = true;
|
||||||
layaX = 1.0;
|
layerAX = 1.0;
|
||||||
laybZ = 1.0;
|
layerBZ = 1.0;
|
||||||
offsetY = 1.0;
|
offsetY = 1.0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DOWN:
|
case DOWN:
|
||||||
|
|
||||||
layaX = 1.0;
|
layerAX = 1.0;
|
||||||
laybZ = 1.0;
|
layerBZ = 1.0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -643,25 +643,25 @@ public class BaseBlockRender
|
||||||
offsetY += y;
|
offsetY += y;
|
||||||
offsetZ += z;
|
offsetZ += z;
|
||||||
|
|
||||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||||
// u -> u
|
// u -> u
|
||||||
0, 1.0,
|
0, 1.0,
|
||||||
// v -> v
|
// v -> v
|
||||||
0, edgeThickness, ico, flip );
|
0, edgeThickness, ico, flip );
|
||||||
|
|
||||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||||
// u -> u
|
// u -> u
|
||||||
0.0, edgeThickness,
|
0.0, edgeThickness,
|
||||||
// v -> v
|
// v -> v
|
||||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
||||||
|
|
||||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||||
// u -> u
|
// u -> u
|
||||||
1.0 - edgeThickness, 1.0,
|
1.0 - edgeThickness, 1.0,
|
||||||
// v -> v
|
// v -> v
|
||||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
||||||
|
|
||||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||||
// u -> u
|
// u -> u
|
||||||
0, 1.0,
|
0, 1.0,
|
||||||
// v -> v
|
// v -> v
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
BoundBoxCalculator bbc = new BoundBoxCalculator();
|
BoundBoxCalculator bbc = new BoundBoxCalculator();
|
||||||
|
|
||||||
|
@ -209,14 +209,14 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBounds(float minx, float miny, float minz, float maxx, float maxy, float maxz)
|
public void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
|
||||||
{
|
{
|
||||||
minX = minx;
|
this.minX = minX;
|
||||||
minY = miny;
|
this.minY = minY;
|
||||||
minZ = minz;
|
this.minZ = minZ;
|
||||||
maxX = maxx;
|
this.maxX = maxX;
|
||||||
maxY = maxy;
|
this.maxY = maxY;
|
||||||
maxZ = maxz;
|
this.maxZ = maxZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getBound(ForgeDirection side)
|
public double getBound(ForgeDirection side)
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||||
lightHash = 0;
|
lightHash = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
private LightingCache lightState = new LightingCache();
|
private LightingCache lightState = new LightingCache();
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public class TESRWrapper extends TileEntitySpecialRenderer
|
public class TESRWrapper extends TileEntitySpecialRenderer
|
||||||
{
|
{
|
||||||
|
|
||||||
final public RenderBlocks rbinstance = new RenderBlocks();
|
final public RenderBlocks renderBlocksInstance = new RenderBlocks();
|
||||||
|
|
||||||
final BaseBlockRender blkRender;
|
final BaseBlockRender blkRender;
|
||||||
final double MAX_DISTANCE;
|
final double MAX_DISTANCE;
|
||||||
|
@ -51,8 +51,8 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||||
|
|
||||||
rbinstance.blockAccess = te.getWorldObj();
|
renderBlocksInstance.blockAccess = te.getWorldObj();
|
||||||
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, rbinstance );
|
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, renderBlocksInstance );
|
||||||
|
|
||||||
if ( Platform.isDrawing( tess ) )
|
if ( Platform.isDrawing( tess ) )
|
||||||
throw new RuntimeException( "Error during rendering." );
|
throw new RuntimeException( "Error during rendering." );
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class RenderBlockCrank extends BaseBlockRender
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks rbinstance)
|
public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderBlocks)
|
||||||
{
|
{
|
||||||
TileCrank tc = (TileCrank) tile;
|
TileCrank tc = (TileCrank) tile;
|
||||||
if ( tc.getUp() == null || tc.getUp() == ForgeDirection.UNKNOWN )
|
if ( tc.getUp() == null || tc.getUp() == ForgeDirection.UNKNOWN )
|
||||||
|
@ -69,16 +69,16 @@ public class RenderBlockCrank extends BaseBlockRender
|
||||||
|
|
||||||
tess.setTranslation( -tc.xCoord, -tc.yCoord, -tc.zCoord );
|
tess.setTranslation( -tc.xCoord, -tc.yCoord, -tc.zCoord );
|
||||||
tess.startDrawingQuads();
|
tess.startDrawingQuads();
|
||||||
rbinstance.renderAllFaces = true;
|
renderBlocks.renderAllFaces = true;
|
||||||
rbinstance.blockAccess = tc.getWorldObj();
|
renderBlocks.blockAccess = tc.getWorldObj();
|
||||||
|
|
||||||
rbinstance.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
|
renderBlocks.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
|
||||||
|
|
||||||
rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
||||||
|
|
||||||
rbinstance.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
|
renderBlocks.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
|
||||||
|
|
||||||
rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
||||||
|
|
||||||
tess.draw();
|
tess.draw();
|
||||||
tess.setTranslation( 0, 0, 0 );
|
tess.setTranslation( 0, 0, 0 );
|
||||||
|
|
|
@ -144,17 +144,17 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||||
float press = 0.2f;
|
float press = 0.2f;
|
||||||
float base = 0.4f;
|
float base = 0.4f;
|
||||||
|
|
||||||
long lprogress = 0;
|
long absoluteProgress = 0;
|
||||||
if ( inv.smash )
|
if ( inv.smash )
|
||||||
{
|
{
|
||||||
long currentTime = System.currentTimeMillis();
|
long currentTime = System.currentTimeMillis();
|
||||||
lprogress = currentTime - inv.clientStart;
|
absoluteProgress = currentTime - inv.clientStart;
|
||||||
if ( lprogress > 800 )
|
if ( absoluteProgress > 800 )
|
||||||
inv.smash = false;
|
inv.smash = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float rprogress = (float) (lprogress % 800) / 400.0f;
|
float relativeProgress = (float) (absoluteProgress % 800) / 400.0f;
|
||||||
float progress = rprogress;
|
float progress = relativeProgress;
|
||||||
|
|
||||||
if ( progress > 1.0f )
|
if ( progress > 1.0f )
|
||||||
progress = 1.0f - (progress - 1.0f);
|
progress = 1.0f - (progress - 1.0f);
|
||||||
|
@ -197,7 +197,7 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||||
if ( inv.getStackInSlot( 2 ) != null )
|
if ( inv.getStackInSlot( 2 ) != null )
|
||||||
items++;
|
items++;
|
||||||
|
|
||||||
if ( rprogress > 1.0f || items == 0 )
|
if ( relativeProgress > 1.0f || items == 0 )
|
||||||
{
|
{
|
||||||
ItemStack is = inv.getStackInSlot( 3 );
|
ItemStack is = inv.getStackInSlot( 3 );
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package appeng.client.render.blocks;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
|
import appeng.helpers.Splotch;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -12,7 +13,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.client.texture.ExtraBlockTextures;
|
import appeng.client.texture.ExtraBlockTextures;
|
||||||
import appeng.helpers.Splot;
|
|
||||||
import appeng.tile.misc.TilePaint;
|
import appeng.tile.misc.TilePaint;
|
||||||
|
|
||||||
public class RenderBlockPaint extends BaseBlockRender
|
public class RenderBlockPaint extends BaseBlockRender
|
||||||
|
@ -42,9 +42,9 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||||
Tessellator tess = Tessellator.instance;
|
Tessellator tess = Tessellator.instance;
|
||||||
|
|
||||||
int lumen = 14 << 20 | 14 << 4;
|
int lumen = 14 << 20 | 14 << 4;
|
||||||
int worldb = imb.getMixedBrightnessForBlock( world, x, y, z );
|
int brightness = imb.getMixedBrightnessForBlock( world, x, y, z );
|
||||||
|
|
||||||
double offoff = 0.001;
|
double offsetConstant = 0.001;
|
||||||
|
|
||||||
EnumSet<ForgeDirection> validSides = EnumSet.noneOf( ForgeDirection.class );
|
EnumSet<ForgeDirection> validSides = EnumSet.noneOf( ForgeDirection.class );
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||||
validSides.add( side );
|
validSides.add( side );
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Splot s : tp.getDots())
|
for (Splotch s : tp.getDots())
|
||||||
{
|
{
|
||||||
if ( !validSides.contains( s.side ) )
|
if ( !validSides.contains( s.side ) )
|
||||||
continue;
|
continue;
|
||||||
|
@ -67,11 +67,11 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tess.setColorOpaque_I( s.color.mediumVariant );
|
tess.setColorOpaque_I( s.color.mediumVariant );
|
||||||
tess.setBrightness( worldb );
|
tess.setBrightness( brightness );
|
||||||
}
|
}
|
||||||
|
|
||||||
double offset = offoff;
|
double offset = offsetConstant;
|
||||||
offoff += 0.001;
|
offsetConstant += 0.001;
|
||||||
|
|
||||||
double H = 0.1;
|
double H = 0.1;
|
||||||
|
|
||||||
|
|
|
@ -39,13 +39,13 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||||
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
||||||
|
|
||||||
float lidangle = 0.0f;
|
float lidAngle = 0.0f;
|
||||||
|
|
||||||
GL11.glScalef( 1.0F, -1F, -1F );
|
GL11.glScalef( 1.0F, -1F, -1F );
|
||||||
GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
|
GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
|
||||||
|
|
||||||
model.chestLid.offsetY = -(0.9f / 16.0f);
|
model.chestLid.offsetY = -(0.9f / 16.0f);
|
||||||
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||||
model.renderAll();
|
model.renderAll();
|
||||||
|
|
||||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||||
|
@ -100,12 +100,12 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||||
if ( skyChest.lidAngle < 0.0f )
|
if ( skyChest.lidAngle < 0.0f )
|
||||||
skyChest.lidAngle = 0.0f;
|
skyChest.lidAngle = 0.0f;
|
||||||
|
|
||||||
float lidangle = skyChest.lidAngle;
|
float lidAngle = skyChest.lidAngle;
|
||||||
lidangle = 1.0F - lidangle;
|
lidAngle = 1.0F - lidAngle;
|
||||||
lidangle = 1.0F - lidangle * lidangle * lidangle;
|
lidAngle = 1.0F - lidAngle * lidAngle * lidAngle;
|
||||||
|
|
||||||
model.chestLid.offsetY = -(1.01f / 16.0f);
|
model.chestLid.offsetY = -(1.01f / 16.0f);
|
||||||
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||||
model.renderAll();
|
model.renderAll();
|
||||||
|
|
||||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||||
|
|
|
@ -30,9 +30,9 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||||
public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
||||||
{
|
{
|
||||||
this.blk = blk;
|
this.blk = blk;
|
||||||
cenx = 0;
|
centerX = 0;
|
||||||
ceny = 0;
|
centerY = 0;
|
||||||
cenz = 0;
|
centerZ = 0;
|
||||||
hasChan = false;
|
hasChan = false;
|
||||||
hasPower = false;
|
hasPower = false;
|
||||||
BlockRenderInfo ri = blk.getRendererInstance();
|
BlockRenderInfo ri = blk.getRendererInstance();
|
||||||
|
@ -83,9 +83,9 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cenx = 0;
|
int centerX = 0;
|
||||||
int ceny = 0;
|
int centerY = 0;
|
||||||
int cenz = 0;
|
int centerZ = 0;
|
||||||
AEBaseBlock blk;
|
AEBaseBlock blk;
|
||||||
boolean hasChan = false;
|
boolean hasChan = false;
|
||||||
boolean hasPower = false;
|
boolean hasPower = false;
|
||||||
|
@ -118,9 +118,9 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||||
renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
|
renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
|
||||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||||
|
|
||||||
cenx = x;
|
centerX = x;
|
||||||
ceny = y;
|
centerY = y;
|
||||||
cenz = z;
|
centerZ = z;
|
||||||
ri.setTemporaryRenderIcon( null );
|
ri.setTemporaryRenderIcon( null );
|
||||||
|
|
||||||
renderTorchAtAngle( renderer, fdx, fdy, fdz );
|
renderTorchAtAngle( renderer, fdx, fdy, fdz );
|
||||||
|
@ -235,14 +235,14 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||||
|
|
||||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||||
renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
|
renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
|
||||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, y );
|
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y );
|
||||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, y.getOpposite() );
|
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y.getOpposite() );
|
||||||
|
|
||||||
renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
|
renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
|
||||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, x );
|
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x );
|
||||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, x.getOpposite() );
|
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x.getOpposite() );
|
||||||
|
|
||||||
renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
|
renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
|
||||||
renderFace( cenx, ceny, cenz, blk, r, renderer, z );
|
renderFace( centerX, centerY, centerZ, blk, r, renderer, z );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,16 +237,16 @@ public class RenderDrive extends BaseBlockRender
|
||||||
|
|
||||||
if ( stat != 0 )
|
if ( stat != 0 )
|
||||||
{
|
{
|
||||||
IIcon wico = ExtraBlockTextures.White.getIcon();
|
IIcon whiteIcon = ExtraBlockTextures.White.getIcon();
|
||||||
u1 = wico.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 );
|
u1 = whiteIcon.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 );
|
||||||
u2 = wico.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 );
|
u2 = whiteIcon.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 );
|
||||||
u3 = wico.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 );
|
u3 = whiteIcon.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 );
|
||||||
u4 = wico.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 );
|
u4 = whiteIcon.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 );
|
||||||
|
|
||||||
v1 = wico.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 );
|
v1 = whiteIcon.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 );
|
||||||
v2 = wico.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 );
|
v2 = whiteIcon.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 );
|
||||||
v3 = wico.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 );
|
v3 = whiteIcon.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 );
|
||||||
v4 = wico.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 );
|
v4 = whiteIcon.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 );
|
||||||
|
|
||||||
if ( sp.isPowered() )
|
if ( sp.isPowered() )
|
||||||
tess.setBrightness( 15 << 20 | 15 << 4 );
|
tess.setBrightness( 15 << 20 | 15 << 4 );
|
||||||
|
|
|
@ -68,26 +68,26 @@ public class RenderMEChest extends BaseBlockRender
|
||||||
Tessellator.instance.setBrightness( b );
|
Tessellator.instance.setBrightness( b );
|
||||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||||
|
|
||||||
FlippableIcon fico = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
|
FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
|
||||||
if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) )
|
if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) )
|
||||||
fico.setFlip( true, false );
|
flippableIcon.setFlip( true, false );
|
||||||
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST )
|
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST )
|
||||||
fico.setFlip( false, true );
|
flippableIcon.setFlip( false, true );
|
||||||
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.WEST )
|
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.WEST )
|
||||||
fico.setFlip( true, false );
|
flippableIcon.setFlip( true, false );
|
||||||
else if ( forward == ForgeDirection.DOWN && up == ForgeDirection.EAST )
|
else if ( forward == ForgeDirection.DOWN && up == ForgeDirection.EAST )
|
||||||
fico.setFlip( false, true );
|
flippableIcon.setFlip( false, true );
|
||||||
else if ( forward == ForgeDirection.DOWN )
|
else if ( forward == ForgeDirection.DOWN )
|
||||||
fico.setFlip( true, false );
|
flippableIcon.setFlip( true, false );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 1.7.2
|
* 1.7.2
|
||||||
*
|
*
|
||||||
* else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) fico.setFlip( true, false ); else if (
|
* else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false ); else if (
|
||||||
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) fico.setFlip( true, false );
|
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
renderFace( x, y, z, imb, fico, renderer, forward );
|
renderFace( x, y, z, imb, flippableIcon, renderer, forward );
|
||||||
|
|
||||||
if ( stat != 0 )
|
if ( stat != 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,9 +74,9 @@ public class RenderQNB extends BaseBlockRender
|
||||||
@Override
|
@Override
|
||||||
public void renderInventory(AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
public void renderInventory(AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
||||||
{
|
{
|
||||||
float px = 2.0f / 16.0f;
|
float minPx = 2.0f / 16.0f;
|
||||||
float maxpx = 14.0f / 16.0f;
|
float maxPx = 14.0f / 16.0f;
|
||||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
renderer.setRenderBounds( minPx, minPx, minPx, maxPx, maxPx, maxPx );
|
||||||
|
|
||||||
super.renderInventory( block, item, renderer, type, obj );
|
super.renderInventory( block, item, renderer, type, obj );
|
||||||
}
|
}
|
||||||
|
@ -94,20 +94,20 @@ public class RenderQNB extends BaseBlockRender
|
||||||
{
|
{
|
||||||
if ( tqb.isFormed() )
|
if ( tqb.isFormed() )
|
||||||
{
|
{
|
||||||
AEColoredItemDefinition cabldef = AEApi.instance().parts().partCableGlass;
|
AEColoredItemDefinition glassCableDefinition = AEApi.instance().parts().partCableGlass;
|
||||||
Item cable = cabldef.item( AEColor.Transparent );
|
Item transparentGlassCable = glassCableDefinition.item( AEColor.Transparent );
|
||||||
|
|
||||||
AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered;
|
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
|
||||||
Item ccable = ccabldef.item( AEColor.Transparent );
|
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
|
||||||
|
|
||||||
EnumSet<ForgeDirection> sides = tqb.getConnections();
|
EnumSet<ForgeDirection> sides = tqb.getConnections();
|
||||||
renderCableAt( 0.11D, world, x, y, z, block, renderer, cable.getIconIndex( cabldef.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
|
renderCableAt( 0.11D, world, x, y, z, block, renderer, transparentGlassCable.getIconIndex( glassCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
|
||||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
||||||
}
|
}
|
||||||
|
|
||||||
float px = 2.0f / 16.0f;
|
float renderMin = 2.0f / 16.0f;
|
||||||
float maxpx = 14.0f / 16.0f;
|
float renderMax = 14.0f / 16.0f;
|
||||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||||
renderer.renderStandardBlock( block, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
// super.renderWorldBlock(world, x, y, z, block, modelId, renderer);
|
// super.renderWorldBlock(world, x, y, z, block, modelId, renderer);
|
||||||
}
|
}
|
||||||
|
@ -115,9 +115,9 @@ public class RenderQNB extends BaseBlockRender
|
||||||
{
|
{
|
||||||
if ( !tqb.isFormed() )
|
if ( !tqb.isFormed() )
|
||||||
{
|
{
|
||||||
float px = 2.0f / 16.0f;
|
float renderMin = 2.0f / 16.0f;
|
||||||
float maxpx = 14.0f / 16.0f;
|
float renderMax = 14.0f / 16.0f;
|
||||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||||
renderer.renderStandardBlock( block, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
}
|
}
|
||||||
else if ( tqb.isCorner() )
|
else if ( tqb.isCorner() )
|
||||||
|
@ -125,24 +125,24 @@ public class RenderQNB extends BaseBlockRender
|
||||||
// renderCableAt(0.11D, world, x, y, z, block, modelId,
|
// renderCableAt(0.11D, world, x, y, z, block, modelId,
|
||||||
// renderer,
|
// renderer,
|
||||||
// AppEngTextureRegistry.Blocks.MECable.get(), true, 0.0D);
|
// AppEngTextureRegistry.Blocks.MECable.get(), true, 0.0D);
|
||||||
AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered;
|
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
|
||||||
Item ccable = ccabldef.item( AEColor.Transparent );
|
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
|
||||||
|
|
||||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.05D,
|
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.05D,
|
||||||
tqb.getConnections() );
|
tqb.getConnections() );
|
||||||
|
|
||||||
float px = 4.0f / 16.0f;
|
float renderMin = 4.0f / 16.0f;
|
||||||
float maxpx = 12.0f / 16.0f;
|
float renderMax = 12.0f / 16.0f;
|
||||||
|
|
||||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||||
renderer.renderStandardBlock( block, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
if ( tqb.isPowered() )
|
if ( tqb.isPowered() )
|
||||||
{
|
{
|
||||||
|
|
||||||
px = 3.9f / 16.0f;
|
renderMin = 3.9f / 16.0f;
|
||||||
maxpx = 12.1f / 16.0f;
|
renderMax = 12.1f / 16.0f;
|
||||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||||
|
|
||||||
int bn = 15;
|
int bn = 15;
|
||||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||||
|
@ -154,22 +154,22 @@ public class RenderQNB extends BaseBlockRender
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float px = 2.0f / 16.0f;
|
float renderMin = 2.0f / 16.0f;
|
||||||
float maxpx = 14.0f / 16.0f;
|
float renderMax = 14.0f / 16.0f;
|
||||||
renderer.setRenderBounds( 0, px, px, 1, maxpx, maxpx );
|
renderer.setRenderBounds( 0, renderMin, renderMin, 1, renderMax, renderMax );
|
||||||
renderer.renderStandardBlock( block, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
renderer.setRenderBounds( px, 0, px, maxpx, 1, maxpx );
|
renderer.setRenderBounds( renderMin, 0, renderMin, renderMax, 1, renderMax );
|
||||||
renderer.renderStandardBlock( block, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
renderer.setRenderBounds( px, px, 0, maxpx, maxpx, 1 );
|
renderer.setRenderBounds( renderMin, renderMin, 0, renderMax, renderMax, 1 );
|
||||||
renderer.renderStandardBlock( block, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
if ( tqb.isPowered() )
|
if ( tqb.isPowered() )
|
||||||
{
|
{
|
||||||
px = -0.01f / 16.0f;
|
renderMin = -0.01f / 16.0f;
|
||||||
maxpx = 16.01f / 16.0f;
|
renderMax = 16.01f / 16.0f;
|
||||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||||
|
|
||||||
int bn = 15;
|
int bn = 15;
|
||||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||||
|
|
|
@ -32,9 +32,9 @@ public class RenderQuartzTorch extends BaseBlockRender
|
||||||
float Point13 = 10.0f / 16.0f;
|
float Point13 = 10.0f / 16.0f;
|
||||||
float Point12 = 9.0f / 16.0f;
|
float Point12 = 9.0f / 16.0f;
|
||||||
|
|
||||||
float Onepx = 1.0f / 16.0f;
|
float singlePixel = 1.0f / 16.0f;
|
||||||
float rbottom = 5.0f / 16.0f;
|
float renderBottom = 5.0f / 16.0f;
|
||||||
float rtop = 10.0f / 16.0f;
|
float renderTop = 10.0f / 16.0f;
|
||||||
|
|
||||||
float bottom = 7.0f / 16.0f;
|
float bottom = 7.0f / 16.0f;
|
||||||
float top = 8.0f / 16.0f;
|
float top = 8.0f / 16.0f;
|
||||||
|
@ -43,13 +43,13 @@ public class RenderQuartzTorch extends BaseBlockRender
|
||||||
float yOff = 0.0f;
|
float yOff = 0.0f;
|
||||||
float zOff = 0.0f;
|
float zOff = 0.0f;
|
||||||
|
|
||||||
renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
|
||||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff );
|
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
|
||||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
|
||||||
|
|
||||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||||
|
|
||||||
|
@ -86,9 +86,9 @@ public class RenderQuartzTorch extends BaseBlockRender
|
||||||
float Point13 = 10.0f / 16.0f;
|
float Point13 = 10.0f / 16.0f;
|
||||||
float Point12 = 9.0f / 16.0f;
|
float Point12 = 9.0f / 16.0f;
|
||||||
|
|
||||||
float Onepx = 1.0f / 16.0f;
|
float singlePixel = 1.0f / 16.0f;
|
||||||
float rbottom = 5.0f / 16.0f;
|
float renderBottom = 5.0f / 16.0f;
|
||||||
float rtop = 10.0f / 16.0f;
|
float renderTop = 10.0f / 16.0f;
|
||||||
|
|
||||||
float bottom = 7.0f / 16.0f;
|
float bottom = 7.0f / 16.0f;
|
||||||
float top = 8.0f / 16.0f;
|
float top = 8.0f / 16.0f;
|
||||||
|
@ -106,24 +106,24 @@ public class RenderQuartzTorch extends BaseBlockRender
|
||||||
zOff = forward.offsetZ * -(4.0f / 16.0f);
|
zOff = forward.offsetZ * -(4.0f / 16.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
|
||||||
super.renderInWorld( block, world, x, y, z, renderer );
|
super.renderInWorld( block, world, x, y, z, renderer );
|
||||||
|
|
||||||
int r = (x + y + z) % 2;
|
int r = (x + y + z) % 2;
|
||||||
if ( r == 0 )
|
if ( r == 0 )
|
||||||
{
|
{
|
||||||
renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff );
|
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
|
||||||
super.renderInWorld( block, world, x, y, z, renderer );
|
super.renderInWorld( block, world, x, y, z, renderer );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
|
||||||
super.renderInWorld( block, world, x, y, z, renderer );
|
super.renderInWorld( block, world, x, y, z, renderer );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
renderer.setRenderBounds( Point3 + xOff, rbottom - Onepx + yOff, Point3 + zOff, Point3 + Onepx + xOff, rbottom + yOff, Point3 + Onepx + zOff );
|
renderer.setRenderBounds( Point3 + xOff, renderBottom - singlePixel + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderBottom + yOff, Point3 + singlePixel + zOff );
|
||||||
super.renderInWorld( block, world, x, y, z, renderer );
|
super.renderInWorld( block, world, x, y, z, renderer );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point12 - Onepx + xOff, rtop + yOff, Point12 - Onepx + zOff, Point12 + xOff, rtop + Onepx + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderTop + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderTop + singlePixel + yOff, Point12 + zOff );
|
||||||
super.renderInWorld( block, world, x, y, z, renderer );
|
super.renderInWorld( block, world, x, y, z, renderer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,14 +44,14 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||||
if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_X )
|
if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_X )
|
||||||
{
|
{
|
||||||
ori = ForgeDirection.EAST;
|
ori = ForgeDirection.EAST;
|
||||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||||
{
|
{
|
||||||
renderer.uvRotateEast = 1;
|
renderer.uvRotateEast = 1;
|
||||||
renderer.uvRotateWest = 2;
|
renderer.uvRotateWest = 2;
|
||||||
renderer.uvRotateTop = 2;
|
renderer.uvRotateTop = 2;
|
||||||
renderer.uvRotateBottom = 1;
|
renderer.uvRotateBottom = 1;
|
||||||
}
|
}
|
||||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||||
{
|
{
|
||||||
renderer.uvRotateEast = 2;
|
renderer.uvRotateEast = 2;
|
||||||
renderer.uvRotateWest = 1;
|
renderer.uvRotateWest = 1;
|
||||||
|
@ -70,7 +70,7 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||||
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Y )
|
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Y )
|
||||||
{
|
{
|
||||||
ori = ForgeDirection.UP;
|
ori = ForgeDirection.UP;
|
||||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||||
{
|
{
|
||||||
renderer.uvRotateNorth = 3;
|
renderer.uvRotateNorth = 3;
|
||||||
renderer.uvRotateSouth = 3;
|
renderer.uvRotateSouth = 3;
|
||||||
|
@ -82,12 +82,12 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||||
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Z )
|
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Z )
|
||||||
{
|
{
|
||||||
ori = ForgeDirection.NORTH;
|
ori = ForgeDirection.NORTH;
|
||||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||||
{
|
{
|
||||||
renderer.uvRotateSouth = 1;
|
renderer.uvRotateSouth = 1;
|
||||||
renderer.uvRotateNorth = 2;
|
renderer.uvRotateNorth = 2;
|
||||||
}
|
}
|
||||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||||
{
|
{
|
||||||
renderer.uvRotateNorth = 1;
|
renderer.uvRotateNorth = 1;
|
||||||
renderer.uvRotateSouth = 2;
|
renderer.uvRotateSouth = 2;
|
||||||
|
@ -112,7 +112,7 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||||
|
|
||||||
boolean r = renderer.renderStandardBlock( imb, x, y, z );
|
boolean r = renderer.renderStandardBlock( imb, x, y, z );
|
||||||
|
|
||||||
if ( (displayBits & sp.DISPLAY_POWEREDENABLED) == sp.DISPLAY_POWEREDENABLED )
|
if ( (displayBits & sp.DISPLAY_POWERED_ENABLED) == sp.DISPLAY_POWERED_ENABLED )
|
||||||
{
|
{
|
||||||
int bn = 15;
|
int bn = 15;
|
||||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||||
|
@ -159,10 +159,10 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
||||||
return ExtraBlockTextures.BlockSpatialPylonC.getIcon();
|
return ExtraBlockTextures.BlockSpatialPylonC.getIcon();
|
||||||
|
|
||||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||||
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
|
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
|
||||||
|
|
||||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||||
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
|
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
|
||||||
|
|
||||||
return blk.getIcon( 0, 0 );
|
return blk.getIcon( 0, 0 );
|
||||||
|
@ -178,10 +178,10 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
||||||
return good ? ExtraBlockTextures.BlockSpatialPylonC_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonC_red.getIcon();
|
return good ? ExtraBlockTextures.BlockSpatialPylonC_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonC_red.getIcon();
|
||||||
|
|
||||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||||
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
|
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
|
||||||
|
|
||||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||||
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
|
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
|
||||||
|
|
||||||
return blk.getIcon( 0, 0 );
|
return blk.getIcon( 0, 0 );
|
||||||
|
|
|
@ -68,29 +68,29 @@ public class CraftingFx extends EntityBreakingFX
|
||||||
float f9 = this.particleTextureIndex.getMaxV();
|
float f9 = this.particleTextureIndex.getMaxV();
|
||||||
float scale = 0.1F * this.particleScale;
|
float scale = 0.1F * this.particleScale;
|
||||||
|
|
||||||
float offx = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
|
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
|
||||||
float offy = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
|
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
|
||||||
float offz = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
|
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
|
||||||
float f14 = 1.0F;
|
float f14 = 1.0F;
|
||||||
|
|
||||||
int blkX = MathHelper.floor_double( offx );
|
int blkX = MathHelper.floor_double( offX );
|
||||||
int blkY = MathHelper.floor_double( offy );
|
int blkY = MathHelper.floor_double( offY );
|
||||||
int blkZ = MathHelper.floor_double( offz );
|
int blkZ = MathHelper.floor_double( offZ );
|
||||||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||||
{
|
{
|
||||||
offx -= interpPosX;
|
offX -= interpPosX;
|
||||||
offy -= interpPosY;
|
offY -= interpPosY;
|
||||||
offz -= interpPosZ;
|
offZ -= interpPosZ;
|
||||||
|
|
||||||
// AELog.info( "" + partialTick );
|
// AELog.info( "" + partialTick );
|
||||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||||
par1Tessellator.addVertexWithUV( (double) (offx - x * scale - rx * scale), (double) (offy - y * scale), (double) (offz - z * scale - rz * scale),
|
par1Tessellator.addVertexWithUV( (double) (offX - x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ - z * scale - rz * scale),
|
||||||
(double) f7, (double) f9 );
|
(double) f7, (double) f9 );
|
||||||
par1Tessellator.addVertexWithUV( (double) (offx - x * scale + rx * scale), (double) (offy + y * scale), (double) (offz - z * scale + rz * scale),
|
par1Tessellator.addVertexWithUV( (double) (offX - x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ - z * scale + rz * scale),
|
||||||
(double) f7, (double) f8 );
|
(double) f7, (double) f8 );
|
||||||
par1Tessellator.addVertexWithUV( (double) (offx + x * scale + rx * scale), (double) (offy + y * scale), (double) (offz + z * scale + rz * scale),
|
par1Tessellator.addVertexWithUV( (double) (offX + x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ + z * scale + rz * scale),
|
||||||
(double) f6, (double) f8 );
|
(double) f6, (double) f8 );
|
||||||
par1Tessellator.addVertexWithUV( (double) (offx + x * scale - rx * scale), (double) (offy - y * scale), (double) (offz + z * scale - rz * scale),
|
par1Tessellator.addVertexWithUV( (double) (offX + x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ + z * scale - rz * scale),
|
||||||
(double) f6, (double) f9 );
|
(double) f6, (double) f9 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ public enum CableBusTextures
|
||||||
|
|
||||||
PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"),
|
PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"),
|
||||||
|
|
||||||
PartConvMonitor_Bright("PartConvMonitor_Bright"), PartConvMonitor_Colored("PartConvMonitor_Colored"), PartConvMonitor_Dark("PartConvMonitor_Dark"),
|
PartConversionMonitor_Bright("PartConversionMonitor_Bright"), PartConversionMonitor_Colored("PartConversionMonitor_Colored"), PartConversionMonitor_Dark("PartConversionMonitor_Dark"),
|
||||||
|
|
||||||
PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark(
|
PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark(
|
||||||
"PartInterfaceTerm_Dark"),
|
"PartInterfaceTerm_Dark"),
|
||||||
|
|
|
@ -610,11 +610,11 @@ public abstract class AEBaseContainer extends Container
|
||||||
{
|
{
|
||||||
if ( f.isAnnotationPresent( GuiSync.class ) )
|
if ( f.isAnnotationPresent( GuiSync.class ) )
|
||||||
{
|
{
|
||||||
GuiSync anno = f.getAnnotation( GuiSync.class );
|
GuiSync annotation = f.getAnnotation( GuiSync.class );
|
||||||
if ( syncData.containsKey( anno.value() ) )
|
if ( syncData.containsKey( annotation.value() ) )
|
||||||
AELog.warning( "Channel already in use: " + anno.value() + " for " + f.getName() );
|
AELog.warning( "Channel already in use: " + annotation.value() + " for " + f.getName() );
|
||||||
else
|
else
|
||||||
syncData.put( anno.value(), new SyncDat( this, f, anno ) );
|
syncData.put( annotation.value(), new SyncDat( this, f, annotation ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@ public abstract class AEBaseContainer extends Container
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case PICKUP_OR_SETDOWN:
|
case PICKUP_OR_SET_DOWN:
|
||||||
|
|
||||||
if ( hand == null )
|
if ( hand == null )
|
||||||
s.putStack( null );
|
s.putStack( null );
|
||||||
|
@ -736,7 +736,7 @@ public abstract class AEBaseContainer extends Container
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SPLIT_OR_PLACESINGLE:
|
case SPLIT_OR_PLACE_SINGLE:
|
||||||
|
|
||||||
ItemStack is = s.getStack();
|
ItemStack is = s.getStack();
|
||||||
if ( is != null )
|
if ( is != null )
|
||||||
|
@ -815,7 +815,7 @@ public abstract class AEBaseContainer extends Container
|
||||||
adp.addItems( ais.getItemStack() );
|
adp.addItems( ais.getItemStack() );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ROLLDOWN:
|
case ROLL_DOWN:
|
||||||
if ( powerSrc == null || cellInv == null )
|
if ( powerSrc == null || cellInv == null )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -842,7 +842,7 @@ public abstract class AEBaseContainer extends Container
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ROLLUP:
|
case ROLL_UP:
|
||||||
case PICKUP_SINGLE:
|
case PICKUP_SINGLE:
|
||||||
if ( powerSrc == null || cellInv == null )
|
if ( powerSrc == null || cellInv == null )
|
||||||
return;
|
return;
|
||||||
|
@ -850,13 +850,13 @@ public abstract class AEBaseContainer extends Container
|
||||||
if ( slotItem != null )
|
if ( slotItem != null )
|
||||||
{
|
{
|
||||||
int liftQty = 1;
|
int liftQty = 1;
|
||||||
ItemStack isgg = player.inventory.getItemStack();
|
ItemStack item = player.inventory.getItemStack();
|
||||||
|
|
||||||
if ( isgg != null )
|
if ( item != null )
|
||||||
{
|
{
|
||||||
if ( isgg.stackSize >= isgg.getMaxStackSize() )
|
if ( item.stackSize >= item.getMaxStackSize() )
|
||||||
liftQty = 0;
|
liftQty = 0;
|
||||||
if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), isgg ) )
|
if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), item ) )
|
||||||
liftQty = 0;
|
liftQty = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ public abstract class AEBaseContainer extends Container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICKUP_OR_SETDOWN:
|
case PICKUP_OR_SET_DOWN:
|
||||||
if ( powerSrc == null || cellInv == null )
|
if ( powerSrc == null || cellInv == null )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -908,7 +908,7 @@ public abstract class AEBaseContainer extends Container
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SPLIT_OR_PLACESINGLE:
|
case SPLIT_OR_PLACE_SINGLE:
|
||||||
if ( powerSrc == null || cellInv == null )
|
if ( powerSrc == null || cellInv == null )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Totaly useless container that does nothing.
|
* Totally useless container that does nothing.
|
||||||
*/
|
*/
|
||||||
public class ContainerNull extends Container
|
public class ContainerNull extends Container
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,11 +22,11 @@ public class SyncDat
|
||||||
|
|
||||||
private int channel;
|
private int channel;
|
||||||
|
|
||||||
public SyncDat(AEBaseContainer container, Field field, GuiSync anno) {
|
public SyncDat(AEBaseContainer container, Field field, GuiSync annotation) {
|
||||||
clientVersion = null;
|
clientVersion = null;
|
||||||
this.source = container;
|
this.source = container;
|
||||||
this.field = field;
|
this.field = field;
|
||||||
channel = anno.value();
|
channel = annotation.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChannel()
|
public int getChannel()
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||||
{
|
{
|
||||||
return getCellUpgradeInventory().isItemValidForSlot( i, itemstack );
|
return getCellUpgradeInventory().isItemValidForSlot( i, itemstack );
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
IInventory UpgradeInventoryWrapper;
|
IInventory UpgradeInventoryWrapper;
|
||||||
|
|
||||||
|
@ -195,10 +195,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||||
int y = 29;
|
int y = 29;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
IInventory cell = myte.getInventoryByName( "cell" );
|
IInventory cell = upgradeable.getInventoryByName( "cell" );
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
|
||||||
|
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
|
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
|
||||||
// null, 3 * 8 );
|
// null, 3 * 8 );
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||||
|
|
||||||
public void clear()
|
public void clear()
|
||||||
{
|
{
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||||
inv.setInventorySlotContents( x, null );
|
inv.setInventorySlotContents( x, null );
|
||||||
detectAndSendChanges();
|
detectAndSendChanges();
|
||||||
|
@ -279,10 +279,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||||
|
|
||||||
public void partition()
|
public void partition()
|
||||||
{
|
{
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
|
|
||||||
IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell()
|
IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell()
|
||||||
.getCellInventory( myte.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
.getCellInventory( upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
||||||
|
|
||||||
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
||||||
if ( cellInv != null )
|
if ( cellInv != null )
|
||||||
|
|
|
@ -8,13 +8,13 @@ import appeng.tile.storage.TileChest;
|
||||||
public class ContainerChest extends AEBaseContainer
|
public class ContainerChest extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileChest myte;
|
TileChest chest;
|
||||||
|
|
||||||
public ContainerChest(InventoryPlayer ip, TileChest te) {
|
public ContainerChest(InventoryPlayer ip, TileChest chest) {
|
||||||
super( ip, te, null );
|
super( ip, chest, null );
|
||||||
myte = te;
|
this.chest = chest;
|
||||||
|
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, invPlayer ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,15 +13,15 @@ import appeng.util.Platform;
|
||||||
public class ContainerCondenser extends AEBaseContainer
|
public class ContainerCondenser extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileCondenser myte;
|
TileCondenser condenser;
|
||||||
|
|
||||||
public ContainerCondenser(InventoryPlayer ip, TileCondenser te) {
|
public ContainerCondenser(InventoryPlayer ip, TileCondenser condenser) {
|
||||||
super( ip, te, null );
|
super( ip, condenser, null );
|
||||||
myte = te;
|
this.condenser = condenser;
|
||||||
|
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, te, 0, 51, 52, ip ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, condenser, 0, 51, 52, ip ) );
|
||||||
addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) );
|
addSlotToContainer( new SlotOutput( condenser, 1, 105, 52, -1 ) );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, condenser.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,13 @@ public class ContainerCondenser extends AEBaseContainer
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
double maxStorage = this.myte.getStorage();
|
double maxStorage = this.condenser.getStorage();
|
||||||
double requiredEnergy = this.myte.getRequiredPower();
|
double requiredEnergy = this.condenser.getRequiredPower();
|
||||||
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
|
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
|
||||||
|
|
||||||
this.requiredEnergy = (int) maxDisplay;
|
this.requiredEnergy = (int) maxDisplay;
|
||||||
this.storedPower = (int) this.myte.storedPower;
|
this.storedPower = (int) this.condenser.storedPower;
|
||||||
this.output = (CondenserOutput) this.myte.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
|
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
|
||||||
}
|
}
|
||||||
|
|
||||||
super.detectAndSendChanges();
|
super.detectAndSendChanges();
|
||||||
|
|
|
@ -8,16 +8,16 @@ import appeng.tile.storage.TileDrive;
|
||||||
public class ContainerDrive extends AEBaseContainer
|
public class ContainerDrive extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileDrive myte;
|
TileDrive drive;
|
||||||
|
|
||||||
public ContainerDrive(InventoryPlayer ip, TileDrive te) {
|
public ContainerDrive(InventoryPlayer ip, TileDrive drive) {
|
||||||
super( ip, te, null );
|
super( ip, drive, null );
|
||||||
myte = te;
|
this.drive = drive;
|
||||||
|
|
||||||
for (int y = 0; y < 5; y++)
|
for (int y = 0; y < 5; y++)
|
||||||
for (int x = 0; x < 2; x++)
|
for (int x = 0; x < 2; x++)
|
||||||
{
|
{
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||||
@Override
|
@Override
|
||||||
public boolean isSlotEnabled(int idx)
|
public boolean isSlotEnabled(int idx)
|
||||||
{
|
{
|
||||||
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
|
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||||
|
|
||||||
return upgrades > idx;
|
return upgrades > idx;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||||
int xo = 8;
|
int xo = 8;
|
||||||
int yo = 23 + 6;
|
int yo = 23 + 6;
|
||||||
|
|
||||||
IInventory config = myte.getInventoryByName( "config" );
|
IInventory config = 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++)
|
||||||
|
@ -66,7 +66,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||||
|
@ -81,7 +81,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||||
|
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||||
}
|
}
|
||||||
|
|
||||||
standardDetectAndSendChanges();
|
standardDetectAndSendChanges();
|
||||||
|
|
|
@ -10,21 +10,21 @@ import appeng.tile.grindstone.TileGrinder;
|
||||||
public class ContainerGrinder extends AEBaseContainer
|
public class ContainerGrinder extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileGrinder myte;
|
TileGrinder grinder;
|
||||||
|
|
||||||
public ContainerGrinder(InventoryPlayer ip, TileGrinder te) {
|
public ContainerGrinder(InventoryPlayer ip, TileGrinder grinder) {
|
||||||
super( ip, te, null );
|
super( ip, grinder, null );
|
||||||
myte = te;
|
this.grinder = grinder;
|
||||||
|
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 0, 12, 17, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 0, 12, 17, invPlayer ) );
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 1, 12 + 18, 17, invPlayer ) );
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 2, 12 + 36, 17, invPlayer ) );
|
||||||
|
|
||||||
addSlotToContainer( new SlotInaccessible( te, 6, 80, 40 ) );
|
addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) );
|
||||||
|
|
||||||
addSlotToContainer( new SlotOutput( te, 3, 112, 63, 2 * 16 + 15 ) );
|
addSlotToContainer( new SlotOutput( grinder, 3, 112, 63, 2 * 16 + 15 ) );
|
||||||
addSlotToContainer( new SlotOutput( te, 4, 112 + 18, 63, 2 * 16 + 15 ) );
|
addSlotToContainer( new SlotOutput( grinder, 4, 112 + 18, 63, 2 * 16 + 15 ) );
|
||||||
addSlotToContainer( new SlotOutput( te, 5, 112 + 36, 63, 2 * 16 + 15 ) );
|
addSlotToContainer( new SlotOutput( grinder, 5, 112 + 36, 63, 2 * 16 + 15 ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,22 +49,22 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||||
@Override
|
@Override
|
||||||
protected void setupConfig()
|
protected void setupConfig()
|
||||||
{
|
{
|
||||||
int offx = 19;
|
int offX = 19;
|
||||||
int offy = 17;
|
int offY = 17;
|
||||||
|
|
||||||
IInventory cells = myte.getInventoryByName( "cells" );
|
IInventory cells = upgradeable.getInventoryByName( "cells" );
|
||||||
|
|
||||||
for (int y = 0; y < 3; y++)
|
for (int y = 0; y < 3; y++)
|
||||||
for (int x = 0; x < 2; x++)
|
for (int x = 0; x < 2; x++)
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offx + x * 18, offy + y * 18, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, invPlayer ) );
|
||||||
|
|
||||||
offx = 122;
|
offX = 122;
|
||||||
offy = 17;
|
offY = 17;
|
||||||
for (int y = 0; y < 3; y++)
|
for (int y = 0; y < 3; y++)
|
||||||
for (int x = 0; x < 2; x++)
|
for (int x = 0; x < 2; x++)
|
||||||
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offx + x * 18, offy + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
|
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
|
||||||
|
|
||||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||||
|
@ -77,9 +77,9 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||||
|
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
this.opMode = (OperationMode) myte.getConfigManager().getSetting( Settings.OPERATION_MODE );
|
this.opMode = (OperationMode) upgradeable.getConfigManager().getSetting( Settings.OPERATION_MODE );
|
||||||
this.fMode = (FullnessMode) this.myte.getConfigManager().getSetting( Settings.FULLNESS_MODE );
|
this.fMode = (FullnessMode) this.upgradeable.getConfigManager().getSetting( Settings.FULLNESS_MODE );
|
||||||
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
||||||
}
|
}
|
||||||
|
|
||||||
standardDetectAndSendChanges();
|
standardDetectAndSendChanges();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.container.guisync.GuiSync;
|
import appeng.container.guisync.GuiSync;
|
||||||
import appeng.container.slot.SlotOutput;
|
import appeng.container.slot.SlotOutput;
|
||||||
import appeng.container.slot.SlotRestrictedInput;
|
import appeng.container.slot.SlotRestrictedInput;
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||||
IInventory server;
|
IInventory server;
|
||||||
public long sortBy;
|
public long sortBy;
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
Map<IInterfaceHost, InvTracker> diList = new HashMap();
|
Map<IInterfaceHost, InvTracker> diList = new HashMap();
|
||||||
Map<Long, InvTracker> byId = new HashMap();
|
Map<Long, InvTracker> byId = new HashMap();
|
||||||
|
@ -89,7 +89,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||||
return itemstack != null && itemstack.getItem() instanceof ItemEncodedPattern;
|
return itemstack != null && itemstack.getItem() instanceof ItemEncodedPattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAction(EntityPlayerMP player, InventoryAction action, int slot, long id)
|
public void doAction(EntityPlayerMP player, InventoryAction action, int slot, long id)
|
||||||
|
@ -109,7 +109,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case PICKUP_OR_SETDOWN:
|
case PICKUP_OR_SET_DOWN:
|
||||||
|
|
||||||
if ( hasItemInHand )
|
if ( hasItemInHand )
|
||||||
{
|
{
|
||||||
|
@ -142,7 +142,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SPLIT_OR_PLACESINGLE:
|
case SPLIT_OR_PLACE_SINGLE:
|
||||||
|
|
||||||
if ( hasItemInHand )
|
if ( hasItemInHand )
|
||||||
{
|
{
|
||||||
|
@ -345,12 +345,12 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||||
private void addItems(NBTTagCompound data, InvTracker inv, int offset, int length)
|
private void addItems(NBTTagCompound data, InvTracker inv, int offset, int length)
|
||||||
{
|
{
|
||||||
String name = "=" + Long.toString( inv.which, Character.MAX_RADIX );
|
String name = "=" + Long.toString( inv.which, Character.MAX_RADIX );
|
||||||
NBTTagCompound invv = data.getCompoundTag( name );
|
NBTTagCompound tag = data.getCompoundTag( name );
|
||||||
|
|
||||||
if ( invv.hasNoTags() )
|
if ( tag.hasNoTags() )
|
||||||
{
|
{
|
||||||
invv.setLong( "sortBy", inv.sortBy );
|
tag.setLong( "sortBy", inv.sortBy );
|
||||||
invv.setString( "un", inv.unlocalizedName );
|
tag.setString( "un", inv.unlocalizedName );
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int x = 0; x < length; x++)
|
for (int x = 0; x < length; x++)
|
||||||
|
@ -365,9 +365,9 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||||
if ( is != null )
|
if ( is != null )
|
||||||
is.writeToNBT( itemNBT );
|
is.writeToNBT( itemNBT );
|
||||||
|
|
||||||
invv.setTag( Integer.toString( x + offset ), itemNBT );
|
tag.setTag( Integer.toString( x + offset ), itemNBT );
|
||||||
}
|
}
|
||||||
|
|
||||||
data.setTag( name, invv );
|
data.setTag( name, tag );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||||
int x = 80 + 44;
|
int x = 80 + 44;
|
||||||
int y = 40;
|
int y = 40;
|
||||||
|
|
||||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||||
if ( availableUpgrades() > 0 )
|
if ( availableUpgrades() > 0 )
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||||
if ( availableUpgrades() > 1 )
|
if ( availableUpgrades() > 1 )
|
||||||
|
@ -73,7 +73,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||||
if ( availableUpgrades() > 3 )
|
if ( availableUpgrades() > 3 )
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
|
||||||
|
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,10 +94,10 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
this.EmitterValue = lvlEmitter.getReportingValue();
|
this.EmitterValue = lvlEmitter.getReportingValue();
|
||||||
this.cmType = (YesNo) this.myte.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE );
|
this.cmType = (YesNo) this.upgradeable.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE );
|
||||||
this.lvType = (LevelType) this.myte.getConfigManager().getSetting( Settings.LEVEL_TYPE );
|
this.lvType = (LevelType) this.upgradeable.getConfigManager().getSetting( Settings.LEVEL_TYPE );
|
||||||
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||||
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_EMITTER );
|
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_EMITTER );
|
||||||
}
|
}
|
||||||
|
|
||||||
standardDetectAndSendChanges();
|
standardDetectAndSendChanges();
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class ContainerMAC extends ContainerUpgradeable
|
||||||
|
|
||||||
public boolean isValidItemForSlot(int slotIndex, ItemStack i)
|
public boolean isValidItemForSlot(int slotIndex, ItemStack i)
|
||||||
{
|
{
|
||||||
IInventory mac = myte.getInventoryByName( "mac" );
|
IInventory mac = upgradeable.getInventoryByName( "mac" );
|
||||||
|
|
||||||
ItemStack is = mac.getStackInSlot( 10 );
|
ItemStack is = mac.getStackInSlot( 10 );
|
||||||
if ( is == null )
|
if ( is == null )
|
||||||
|
@ -69,28 +69,28 @@ public class ContainerMAC extends ContainerUpgradeable
|
||||||
@Override
|
@Override
|
||||||
protected void setupConfig()
|
protected void setupConfig()
|
||||||
{
|
{
|
||||||
int offx = 29;
|
int offX = 29;
|
||||||
int offy = 30;
|
int offY = 30;
|
||||||
|
|
||||||
IInventory mac = myte.getInventoryByName( "mac" );
|
IInventory mac = upgradeable.getInventoryByName( "mac" );
|
||||||
|
|
||||||
for (int y = 0; y < 3; y++)
|
for (int y = 0; y < 3; y++)
|
||||||
for (int x = 0; x < 3; x++)
|
for (int x = 0; x < 3; x++)
|
||||||
{
|
{
|
||||||
SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offx + x * 18, offy + y * 18 );
|
SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offX + x * 18, offY + y * 18 );
|
||||||
addSlotToContainer( s );
|
addSlotToContainer( s );
|
||||||
}
|
}
|
||||||
|
|
||||||
offx = 126;
|
offX = 126;
|
||||||
offy = 16;
|
offY = 16;
|
||||||
|
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offx, offy, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, invPlayer ) );
|
||||||
addSlotToContainer( new SlotOutput( mac, 9, offx, offy + 32, -1 ) );
|
addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) );
|
||||||
|
|
||||||
offx = 122;
|
offX = 122;
|
||||||
offy = 17;
|
offY = 17;
|
||||||
|
|
||||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||||
|
@ -105,7 +105,7 @@ public class ContainerMAC extends ContainerUpgradeable
|
||||||
|
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
||||||
}
|
}
|
||||||
|
|
||||||
craftProgress = this.tma.getCraftingProgress();
|
craftProgress = this.tma.getCraftingProgress();
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 5; y++)
|
for (int y = 0; y < 5; y++)
|
||||||
{
|
{
|
||||||
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEWCELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
|
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
|
||||||
invPlayer );
|
invPlayer );
|
||||||
cellView[y].allowEdit = canAccessViewCells;
|
cellView[y].allowEdit = canAccessViewCells;
|
||||||
addSlotToContainer( cellView[y] );
|
addSlotToContainer( cellView[y] );
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||||
ItemStack[] in = getInputs();
|
ItemStack[] in = getInputs();
|
||||||
ItemStack[] out = getOutputs();
|
ItemStack[] out = getOutputs();
|
||||||
|
|
||||||
// if theres no input, this would be silly.
|
// if there is no input, this would be silly.
|
||||||
if ( in == null || out == null )
|
if ( in == null || out == null )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@ import appeng.tile.qnb.TileQuantumBridge;
|
||||||
public class ContainerQNB extends AEBaseContainer
|
public class ContainerQNB extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileQuantumBridge myte;
|
TileQuantumBridge quantumBridge;
|
||||||
|
|
||||||
public ContainerQNB(InventoryPlayer ip, TileQuantumBridge te) {
|
public ContainerQNB(InventoryPlayer ip, TileQuantumBridge quantumBridge) {
|
||||||
super( ip, te, null );
|
super( ip, quantumBridge, null );
|
||||||
myte = te;
|
this.quantumBridge = quantumBridge;
|
||||||
|
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, te, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||||
|
|
||||||
addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) );
|
addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) );
|
||||||
|
|
||||||
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
|
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
|
||||||
addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) );
|
addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 0 );
|
bindPlayerInventory( ip, 0, 0 );
|
||||||
|
@ -117,18 +117,18 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||||
if ( wirelessIn.getHasStack() )
|
if ( wirelessIn.getHasStack() )
|
||||||
{
|
{
|
||||||
ItemStack term = wirelessIn.getStack().copy();
|
ItemStack term = wirelessIn.getStack().copy();
|
||||||
INetworkEncodable netEncodeable = null;
|
INetworkEncodable networkEncodable = null;
|
||||||
|
|
||||||
if ( term.getItem() instanceof INetworkEncodable )
|
if ( term.getItem() instanceof INetworkEncodable )
|
||||||
netEncodeable = (INetworkEncodable) term.getItem();
|
networkEncodable = (INetworkEncodable) term.getItem();
|
||||||
|
|
||||||
IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
|
IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
|
||||||
if ( wTermHandler != null )
|
if ( wTermHandler != null )
|
||||||
netEncodeable = wTermHandler;
|
networkEncodable = wTermHandler;
|
||||||
|
|
||||||
if ( netEncodeable != null )
|
if ( networkEncodable != null )
|
||||||
{
|
{
|
||||||
netEncodeable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
|
networkEncodable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
|
||||||
|
|
||||||
wirelessIn.putStack( null );
|
wirelessIn.putStack( null );
|
||||||
wirelessOut.putStack( term );
|
wirelessOut.putStack( term );
|
||||||
|
|
|
@ -11,21 +11,21 @@ import appeng.tile.storage.TileSkyChest;
|
||||||
public class ContainerSkyChest extends AEBaseContainer
|
public class ContainerSkyChest extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileSkyChest myte;
|
TileSkyChest chest;
|
||||||
|
|
||||||
public ContainerSkyChest(InventoryPlayer ip, TileSkyChest te) {
|
public ContainerSkyChest(InventoryPlayer ip, TileSkyChest chest) {
|
||||||
super( ip, te, null );
|
super( ip, chest, null );
|
||||||
myte = te;
|
this.chest = chest;
|
||||||
|
|
||||||
for (int y = 0; y < 4; y++)
|
for (int y = 0; y < 4; y++)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < 9; x++)
|
for (int x = 0; x < 9; x++)
|
||||||
{
|
{
|
||||||
addSlotToContainer( new SlotNormal( myte, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
|
addSlotToContainer( new SlotNormal( this.chest, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
myte.openInventory();
|
this.chest.openInventory();
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,6 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||||
public void onContainerClosed(EntityPlayer par1EntityPlayer)
|
public void onContainerClosed(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
super.onContainerClosed( par1EntityPlayer );
|
super.onContainerClosed( par1EntityPlayer );
|
||||||
myte.closeInventory();
|
chest.closeInventory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import appeng.util.Platform;
|
||||||
public class ContainerSpatialIOPort extends AEBaseContainer
|
public class ContainerSpatialIOPort extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileSpatialIOPort myte;
|
TileSpatialIOPort spatialIOPort;
|
||||||
|
|
||||||
IGrid network;
|
IGrid network;
|
||||||
|
|
||||||
|
@ -31,15 +31,15 @@ public class ContainerSpatialIOPort extends AEBaseContainer
|
||||||
|
|
||||||
int delay = 40;
|
int delay = 40;
|
||||||
|
|
||||||
public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort te) {
|
public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort spatialIOPort) {
|
||||||
super( ip, te, null );
|
super( ip, spatialIOPort, null );
|
||||||
myte = te;
|
this.spatialIOPort = spatialIOPort;
|
||||||
|
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
network = te.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
|
network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
|
||||||
|
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, te, 0, 52, 48, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort, 0, 52, 48, invPlayer ) );
|
||||||
addSlotToContainer( new SlotOutput( te, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
|
addSlotToContainer( new SlotOutput( spatialIOPort, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||||
@Override
|
@Override
|
||||||
public boolean isSlotEnabled(int idx)
|
public boolean isSlotEnabled(int idx)
|
||||||
{
|
{
|
||||||
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
|
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||||
|
|
||||||
return upgrades > idx;
|
return upgrades > idx;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||||
int xo = 8;
|
int xo = 8;
|
||||||
int yo = 23 + 6;
|
int yo = 23 + 6;
|
||||||
|
|
||||||
IInventory config = myte.getInventoryByName( "config" );
|
IInventory config = 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++)
|
||||||
|
@ -83,7 +83,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||||
|
@ -98,9 +98,9 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||||
|
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||||
this.rwMode = (AccessRestriction) this.myte.getConfigManager().getSetting( Settings.ACCESS );
|
this.rwMode = (AccessRestriction) this.upgradeable.getConfigManager().getSetting( Settings.ACCESS );
|
||||||
this.storageFilter = (StorageFilter) this.myte.getConfigManager().getSetting( Settings.STORAGE_FILTER );
|
this.storageFilter = (StorageFilter) this.upgradeable.getConfigManager().getSetting( Settings.STORAGE_FILTER );
|
||||||
}
|
}
|
||||||
|
|
||||||
standardDetectAndSendChanges();
|
standardDetectAndSendChanges();
|
||||||
|
@ -108,7 +108,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||||
|
|
||||||
public void clear()
|
public void clear()
|
||||||
{
|
{
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||||
inv.setInventorySlotContents( x, null );
|
inv.setInventorySlotContents( x, null );
|
||||||
detectAndSendChanges();
|
detectAndSendChanges();
|
||||||
|
@ -116,7 +116,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||||
|
|
||||||
public void partition()
|
public void partition()
|
||||||
{
|
{
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
|
|
||||||
IMEInventory<IAEItemStack> cellInv = storageBus.getInternalHandler();
|
IMEInventory<IAEItemStack> cellInv = storageBus.getInternalHandler();
|
||||||
|
|
||||||
|
|
|
@ -29,25 +29,25 @@ import appeng.util.Platform;
|
||||||
public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost
|
public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost
|
||||||
{
|
{
|
||||||
|
|
||||||
IUpgradeableHost myte;
|
IUpgradeableHost upgradeable;
|
||||||
|
|
||||||
int tbslot;
|
int tbSlot;
|
||||||
NetworkToolViewer tbinv;
|
NetworkToolViewer tbInventory;
|
||||||
|
|
||||||
public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) {
|
public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) {
|
||||||
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
|
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
|
||||||
myte = te;
|
upgradeable = te;
|
||||||
|
|
||||||
World w = null;
|
World w = null;
|
||||||
int xCoor = 0, yCoor = 0, zCoor = 0;
|
int xCoord = 0, yCoord = 0, zCoord = 0;
|
||||||
|
|
||||||
if ( te instanceof TileEntity )
|
if ( te instanceof TileEntity )
|
||||||
{
|
{
|
||||||
TileEntity myTile = (TileEntity) te;
|
TileEntity myTile = (TileEntity) te;
|
||||||
w = myTile.getWorldObj();
|
w = myTile.getWorldObj();
|
||||||
xCoor = myTile.xCoord;
|
xCoord = myTile.xCoord;
|
||||||
yCoor = myTile.yCoord;
|
yCoord = myTile.yCoord;
|
||||||
zCoor = myTile.zCoord;
|
zCoord = myTile.zCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( te instanceof IPart )
|
if ( te instanceof IPart )
|
||||||
|
@ -55,9 +55,9 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
IUpgradeableHost myTile = (IUpgradeableHost) te;
|
IUpgradeableHost myTile = (IUpgradeableHost) te;
|
||||||
TileEntity mk = myTile.getTile();
|
TileEntity mk = myTile.getTile();
|
||||||
w = mk.getWorldObj();
|
w = mk.getWorldObj();
|
||||||
xCoor = mk.xCoord;
|
xCoord = mk.xCoord;
|
||||||
yCoor = mk.yCoord;
|
yCoord = mk.yCoord;
|
||||||
zCoor = mk.zCoord;
|
zCoord = mk.zCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
IInventory pi = getPlayerInv();
|
IInventory pi = getPlayerInv();
|
||||||
|
@ -67,8 +67,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
if ( pii != null && pii.getItem() instanceof ToolNetworkTool )
|
if ( pii != null && pii.getItem() instanceof ToolNetworkTool )
|
||||||
{
|
{
|
||||||
lockPlayerInventorySlot( x );
|
lockPlayerInventorySlot( x );
|
||||||
tbslot = x;
|
tbSlot = x;
|
||||||
tbinv = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoor, yCoor, zCoor );
|
tbInventory = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoord, yCoord, zCoord );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
{
|
{
|
||||||
for (int v = 0; v < 3; v++)
|
for (int v = 0; v < 3; v++)
|
||||||
for (int u = 0; u < 3; u++)
|
for (int u = 0; u < 3; u++)
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbinv, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbInventory, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
|
||||||
invPlayer )).setPlayerSide() );
|
invPlayer )).setPlayerSide() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
|
|
||||||
protected void setupUpgrades()
|
protected void setupUpgrades()
|
||||||
{
|
{
|
||||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||||
if ( availableUpgrades() > 0 )
|
if ( availableUpgrades() > 0 )
|
||||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||||
if ( availableUpgrades() > 1 )
|
if ( availableUpgrades() > 1 )
|
||||||
|
@ -105,7 +105,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
int y = 40;
|
int y = 40;
|
||||||
setupUpgrades();
|
setupUpgrades();
|
||||||
|
|
||||||
IInventory inv = myte.getInventoryByName( "config" );
|
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||||
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
||||||
|
|
||||||
if ( supportCapacity() )
|
if ( supportCapacity() )
|
||||||
|
@ -150,14 +150,14 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
{
|
{
|
||||||
if ( hasToolbox() )
|
if ( hasToolbox() )
|
||||||
{
|
{
|
||||||
ItemStack currentItem = getPlayerInv().getStackInSlot( tbslot );
|
ItemStack currentItem = getPlayerInv().getStackInSlot( tbSlot );
|
||||||
|
|
||||||
if ( currentItem != tbinv.getItemStack() )
|
if ( currentItem != tbInventory.getItemStack() )
|
||||||
{
|
{
|
||||||
if ( currentItem != null )
|
if ( currentItem != null )
|
||||||
{
|
{
|
||||||
if ( Platform.isSameItem( tbinv.getItemStack(), currentItem ) )
|
if ( Platform.isSameItem( tbInventory.getItemStack(), currentItem ) )
|
||||||
getPlayerInv().setInventorySlotContents( tbslot, tbinv.getItemStack() );
|
getPlayerInv().setInventorySlotContents( tbSlot, tbInventory.getItemStack() );
|
||||||
else
|
else
|
||||||
isContainerValid = false;
|
isContainerValid = false;
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
|
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
IConfigManager cm = this.myte.getConfigManager();
|
IConfigManager cm = this.upgradeable.getConfigManager();
|
||||||
loadSettingsFromHost( cm );
|
loadSettingsFromHost( cm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
{
|
{
|
||||||
this.fzMode = (FuzzyMode) cm.getSetting( Settings.FUZZY_MODE );
|
this.fzMode = (FuzzyMode) cm.getSetting( Settings.FUZZY_MODE );
|
||||||
this.rsMode = (RedstoneMode) cm.getSetting( Settings.REDSTONE_CONTROLLED );
|
this.rsMode = (RedstoneMode) cm.getSetting( Settings.REDSTONE_CONTROLLED );
|
||||||
if ( myte instanceof PartExportBus )
|
if ( upgradeable instanceof PartExportBus )
|
||||||
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,13 +208,13 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||||
|
|
||||||
public boolean hasToolbox()
|
public boolean hasToolbox()
|
||||||
{
|
{
|
||||||
return tbinv != null;
|
return tbInventory != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSlotEnabled(int idx)
|
public boolean isSlotEnabled(int idx)
|
||||||
{
|
{
|
||||||
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
|
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||||
|
|
||||||
if ( idx == 1 && upgrades > 0 )
|
if ( idx == 1 && upgrades > 0 )
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -10,13 +10,13 @@ import appeng.util.Platform;
|
||||||
public class ContainerVibrationChamber extends AEBaseContainer
|
public class ContainerVibrationChamber extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileVibrationChamber myte;
|
TileVibrationChamber vibrationChamber;
|
||||||
|
|
||||||
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber te) {
|
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber vibrationChamber) {
|
||||||
super( ip, te, null );
|
super( ip, vibrationChamber, null );
|
||||||
myte = te;
|
this.vibrationChamber = vibrationChamber;
|
||||||
|
|
||||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, te, 0, 80, 37, invPlayer ) );
|
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, invPlayer ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,8 @@ public class ContainerVibrationChamber extends AEBaseContainer
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() )
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
this.burnProgress = (int) (this.myte.maxBurnTime <= 0 ? 0 : 12 * this.myte.burnTime / this.myte.maxBurnTime);
|
this.burnProgress = (int) (this.vibrationChamber.maxBurnTime <= 0 ? 0 : 12 * this.vibrationChamber.burnTime / this.vibrationChamber.maxBurnTime);
|
||||||
this.burnSpeed = this.myte.burnSpeed;
|
this.burnSpeed = this.vibrationChamber.burnSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.detectAndSendChanges();
|
super.detectAndSendChanges();
|
||||||
|
|
|
@ -10,7 +10,7 @@ import appeng.tile.networking.TileWireless;
|
||||||
public class ContainerWireless extends AEBaseContainer
|
public class ContainerWireless extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileWireless myte;
|
TileWireless wirelessTerminal;
|
||||||
|
|
||||||
@GuiSync(1)
|
@GuiSync(1)
|
||||||
public long range = 0;
|
public long range = 0;
|
||||||
|
@ -22,9 +22,9 @@ public class ContainerWireless extends AEBaseContainer
|
||||||
|
|
||||||
public ContainerWireless(InventoryPlayer ip, TileWireless te) {
|
public ContainerWireless(InventoryPlayer ip, TileWireless te) {
|
||||||
super( ip, te, null );
|
super( ip, te, null );
|
||||||
myte = te;
|
wirelessTerminal = te;
|
||||||
|
|
||||||
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, myte, 0, 80, 47, invPlayer ) );
|
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, wirelessTerminal, 0, 80, 47, invPlayer ) );
|
||||||
|
|
||||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,11 @@ import appeng.util.Platform;
|
||||||
public class ContainerWirelessTerm extends ContainerMEPortableCell
|
public class ContainerWirelessTerm extends ContainerMEPortableCell
|
||||||
{
|
{
|
||||||
|
|
||||||
WirelessTerminalGuiObject wtgo;
|
WirelessTerminalGuiObject wirelessTerminalGUIObject;
|
||||||
|
|
||||||
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject monitorable) {
|
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject wirelessTerminalGUIObject) {
|
||||||
super( ip, monitorable );
|
super( ip, wirelessTerminalGUIObject );
|
||||||
wtgo = monitorable;
|
this.wirelessTerminalGUIObject = wirelessTerminalGUIObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,7 +21,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
|
||||||
{
|
{
|
||||||
super.detectAndSendChanges();
|
super.detectAndSendChanges();
|
||||||
|
|
||||||
if ( !wtgo.rangeCheck() )
|
if ( !wirelessTerminalGUIObject.rangeCheck() )
|
||||||
{
|
{
|
||||||
if ( Platform.isServer() && isContainerValid )
|
if ( Platform.isServer() && isContainerValid )
|
||||||
getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
|
getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
|
||||||
|
@ -30,7 +30,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wtgo.getRange() );
|
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wirelessTerminalGUIObject.getRange() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class AppEngSlot extends Slot
|
||||||
public enum hasCalculatedValidness
|
public enum hasCalculatedValidness
|
||||||
{
|
{
|
||||||
NotAvailable, Valid, Invalid
|
NotAvailable, Valid, Invalid
|
||||||
};
|
}
|
||||||
|
|
||||||
public boolean isDraggable = true;
|
public boolean isDraggable = true;
|
||||||
public boolean isPlayerSide = false;
|
public boolean isPlayerSide = false;
|
||||||
|
|
|
@ -9,9 +9,9 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput
|
||||||
final int groupNum;
|
final int groupNum;
|
||||||
IOptionalSlotHost host;
|
IOptionalSlotHost host;
|
||||||
|
|
||||||
public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotnum, int x, int y, int grpNum,
|
public OptionalSlotRestrictedInput(PlacableItemType valid, IInventory i, IOptionalSlotHost host, int slotIndex, int x, int y, int grpNum,
|
||||||
InventoryPlayer invPlayer) {
|
InventoryPlayer invPlayer) {
|
||||||
super( valid, i, slotnum, x, y, invPlayer );
|
super( valid, i, slotIndex, x, y, invPlayer );
|
||||||
this.groupNum = grpNum;
|
this.groupNum = grpNum;
|
||||||
this.host = host;
|
this.host = host;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,12 @@ public class SlotPatternTerm extends SlotCraftingTerm
|
||||||
IOptionalSlotHost host;
|
IOptionalSlotHost host;
|
||||||
|
|
||||||
public SlotPatternTerm(EntityPlayer player, BaseActionSource mySrc, IEnergySource energySrc, IStorageMonitorable storage, IInventory cMatrix,
|
public SlotPatternTerm(EntityPlayer player, BaseActionSource mySrc, IEnergySource energySrc, IStorageMonitorable storage, IInventory cMatrix,
|
||||||
IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int grpnum, IContainerCraftingPacket c)
|
IInventory secondMatrix, IInventory output, int x, int y, IOptionalSlotHost h, int groupNumber, IContainerCraftingPacket c)
|
||||||
{
|
{
|
||||||
super( player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c );
|
super( player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c );
|
||||||
|
|
||||||
host = h;
|
host = h;
|
||||||
groupNum = grpnum;
|
groupNum = groupNumber;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ public class SlotPlayerInv extends AppEngSlot
|
||||||
|
|
||||||
public SlotPlayerInv(IInventory par1iInventory, int par2, int par3, int par4) {
|
public SlotPlayerInv(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||||
super( par1iInventory, par2, par3, par4 );
|
super( par1iInventory, par2, par3, par4 );
|
||||||
;
|
|
||||||
isPlayerSide = true;
|
isPlayerSide = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,13 +30,13 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
{
|
{
|
||||||
STORAGE_CELLS(15), ORE(1 * 16 + 15), STORAGE_COMPONENT(3 * 16 + 15),
|
STORAGE_CELLS(15), ORE(1 * 16 + 15), STORAGE_COMPONENT(3 * 16 + 15),
|
||||||
|
|
||||||
ENCODEABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15),
|
ENCODABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15),
|
||||||
|
|
||||||
ENCODED_CRAFTING_PATTERN(7 * 16 + 15), ENCODED_PATTERN(7 * 16 + 15), PATTERN(8 * 16 + 15), BLANK_PATTERN(8 * 16 + 15), POWERED_TOOL(9 * 16 + 15),
|
ENCODED_CRAFTING_PATTERN(7 * 16 + 15), ENCODED_PATTERN(7 * 16 + 15), PATTERN(8 * 16 + 15), BLANK_PATTERN(8 * 16 + 15), POWERED_TOOL(9 * 16 + 15),
|
||||||
|
|
||||||
RANGE_BOOSTER(6 * 16 + 15), QE_SINGULARITY(10 * 16 + 15), SPATIAL_STORAGE_CELLS(11 * 16 + 15),
|
RANGE_BOOSTER(6 * 16 + 15), QE_SINGULARITY(10 * 16 + 15), SPATIAL_STORAGE_CELLS(11 * 16 + 15),
|
||||||
|
|
||||||
FUEL(12 * 16 + 15), UPGRADES(13 * 16 + 15), WORKBENCH_CELL(15), BIOMETRIC_CARD(14 * 16 + 15), VIEWCELL(4 * 16 + 14),
|
FUEL(12 * 16 + 15), UPGRADES(13 * 16 + 15), WORKBENCH_CELL(15), BIOMETRIC_CARD(14 * 16 + 15), VIEW_CELL(4 * 16 + 14),
|
||||||
|
|
||||||
INSCRIBER_PLATE(2 * 16 + 14), INSCRIBER_INPUT(3 * 16 + 14), METAL_INGOTS(3 * 16 + 14);
|
INSCRIBER_PLATE(2 * 16 + 14), INSCRIBER_INPUT(3 * 16 + 14), METAL_INGOTS(3 * 16 + 14);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
private PlacableItemType(int o) {
|
private PlacableItemType(int o) {
|
||||||
IIcon = o;
|
IIcon = o;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSlotStackLimit()
|
public int getSlotStackLimit()
|
||||||
|
@ -85,8 +85,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotnum, int x, int y, InventoryPlayer p) {
|
public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotIndex, int x, int y, InventoryPlayer p) {
|
||||||
super( i, slotnum, x, y );
|
super( i, slotIndex, x, y );
|
||||||
which = valid;
|
which = valid;
|
||||||
IIcon = valid.IIcon;
|
IIcon = valid.IIcon;
|
||||||
this.p = p;
|
this.p = p;
|
||||||
|
@ -179,7 +179,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
|
|
||||||
return isMetalIngot( i );
|
return isMetalIngot( i );
|
||||||
|
|
||||||
case VIEWCELL:
|
case VIEW_CELL:
|
||||||
return AEApi.instance().items().itemViewCell.sameAsStack( i );
|
return AEApi.instance().items().itemViewCell.sameAsStack( i );
|
||||||
case ORE:
|
case ORE:
|
||||||
return appeng.api.AEApi.instance().registries().grinder().getRecipeForInput( i ) != null;
|
return appeng.api.AEApi.instance().registries().grinder().getRecipeForInput( i ) != null;
|
||||||
|
@ -206,7 +206,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
if ( i.getItem() instanceof IStorageComponent && ((IStorageComponent) i.getItem()).isStorageComponent( i ) )
|
if ( i.getItem() instanceof IStorageComponent && ((IStorageComponent) i.getItem()).isStorageComponent( i ) )
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
case ENCODEABLE_ITEM:
|
case ENCODABLE_ITEM:
|
||||||
return i.getItem() instanceof INetworkEncodable || AEApi.instance().registries().wireless().isWirelessTerminal( i );
|
return i.getItem() instanceof INetworkEncodable || AEApi.instance().registries().wireless().isWirelessTerminal( i );
|
||||||
case BIOMETRIC_CARD:
|
case BIOMETRIC_CARD:
|
||||||
return i.getItem() instanceof IBiometricCard;
|
return i.getItem() instanceof IBiometricCard;
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
|
||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double spatialPowerScaler = 1.35;
|
public double spatialPowerExponent = 1.35;
|
||||||
public double spatialPowerMultiplier = 1250.0;
|
public double spatialPowerMultiplier = 1250.0;
|
||||||
|
|
||||||
public String grinderOres[] = {
|
public String grinderOres[] = {
|
||||||
|
@ -117,12 +117,12 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
|
||||||
public int[] priorityByStacks = new int[] { 1, 10, 100, 1000 };
|
public int[] priorityByStacks = new int[] { 1, 10, 100, 1000 };
|
||||||
public int[] levelByStacks = new int[] { 1, 10, 100, 1000 };
|
public int[] levelByStacks = new int[] { 1, 10, 100, 1000 };
|
||||||
|
|
||||||
public int wireless_battery = 1600000;
|
public int wirelessTerminalBattery = 1600000;
|
||||||
public int manipulator_battery = 200000;
|
public int entropyManipulatorBattery = 200000;
|
||||||
public int mattercannon_battery = 200000;
|
public int matterCannonBattery = 200000;
|
||||||
public int portablecell_battery = 20000;
|
public int portableCellBattery = 20000;
|
||||||
public int colorapplicator_battery = 20000;
|
public int colorApplicatorBattery = 20000;
|
||||||
public int staff_battery = 8000;
|
public int chargedStaffBattery = 8000;
|
||||||
|
|
||||||
public boolean disableColoredCableRecipesInNEI = true;
|
public boolean disableColoredCableRecipesInNEI = true;
|
||||||
|
|
||||||
|
@ -257,20 +257,20 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
|
||||||
|
|
||||||
formationPlaneEntityLimit = get( "automation", "formationPlaneEntityLimit", formationPlaneEntityLimit ).getInt( formationPlaneEntityLimit );
|
formationPlaneEntityLimit = get( "automation", "formationPlaneEntityLimit", formationPlaneEntityLimit ).getInt( formationPlaneEntityLimit );
|
||||||
|
|
||||||
wireless_battery = get( "battery", "wireless", wireless_battery ).getInt( wireless_battery );
|
wirelessTerminalBattery = get( "battery", "wirelessTerminal", wirelessTerminalBattery ).getInt( wirelessTerminalBattery );
|
||||||
staff_battery = get( "battery", "staff", staff_battery ).getInt( staff_battery );
|
chargedStaffBattery = get( "battery", "chargedStaff", chargedStaffBattery ).getInt( chargedStaffBattery );
|
||||||
manipulator_battery = get( "battery", "manipulator", manipulator_battery ).getInt( manipulator_battery );
|
entropyManipulatorBattery = get( "battery", "entropyManipulator", entropyManipulatorBattery ).getInt( entropyManipulatorBattery );
|
||||||
portablecell_battery = get( "battery", "portablecell", portablecell_battery ).getInt( portablecell_battery );
|
portableCellBattery = get( "battery", "portableCell", portableCellBattery ).getInt( portableCellBattery );
|
||||||
colorapplicator_battery = get( "battery", "colorapplicator", colorapplicator_battery ).getInt( colorapplicator_battery );
|
colorApplicatorBattery = get( "battery", "colorApplicator", colorApplicatorBattery ).getInt( colorApplicatorBattery );
|
||||||
mattercannon_battery = get( "battery", "mattercannon", mattercannon_battery ).getInt( mattercannon_battery );
|
matterCannonBattery = get( "battery", "matterCannon", matterCannonBattery ).getInt( matterCannonBattery );
|
||||||
|
|
||||||
clientSync();
|
clientSync();
|
||||||
|
|
||||||
for (AEFeature feature : AEFeature.values())
|
for (AEFeature feature : AEFeature.values())
|
||||||
{
|
{
|
||||||
if ( feature.isVisible() )
|
if ( feature.isVisible )
|
||||||
{
|
{
|
||||||
if ( get( "Features." + feature.getCategory(), feature.name(), feature.defaultValue() ).getBoolean( feature.defaultValue() ) )
|
if ( get( "Features." + feature.category, feature.name(), feature.defaultValue ).getBoolean( feature.defaultValue ) )
|
||||||
featureFlags.add( feature );
|
featureFlags.add( feature );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -304,12 +304,12 @@ public class AEConfig extends Configuration implements IConfigurableObject, ICon
|
||||||
storageBiomeID = get( "spatialio", "storageBiomeID", storageBiomeID ).getInt( storageBiomeID );
|
storageBiomeID = get( "spatialio", "storageBiomeID", storageBiomeID ).getInt( storageBiomeID );
|
||||||
storageProviderID = get( "spatialio", "storageProviderID", storageProviderID ).getInt( storageProviderID );
|
storageProviderID = get( "spatialio", "storageProviderID", storageProviderID ).getInt( storageProviderID );
|
||||||
spatialPowerMultiplier = get( "spatialio", "spatialPowerMultiplier", spatialPowerMultiplier ).getDouble( spatialPowerMultiplier );
|
spatialPowerMultiplier = get( "spatialio", "spatialPowerMultiplier", spatialPowerMultiplier ).getDouble( spatialPowerMultiplier );
|
||||||
spatialPowerScaler = get( "spatialio", "spatialPowerScaler", spatialPowerScaler ).getDouble( spatialPowerScaler );
|
spatialPowerExponent = get( "spatialio", "spatialPowerExponent", spatialPowerExponent ).getDouble( spatialPowerExponent );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isFeatureEnabled( AEFeature.CraftingCPU ) )
|
if ( isFeatureEnabled( AEFeature.CraftingCPU ) )
|
||||||
{
|
{
|
||||||
craftingCalculationTimePerTick = get( "craftingcpu", "craftingCalculationTimePerTick", craftingCalculationTimePerTick ).getInt(
|
craftingCalculationTimePerTick = get( "craftingCPU", "craftingCalculationTimePerTick", craftingCalculationTimePerTick ).getInt(
|
||||||
craftingCalculationTimePerTick );
|
craftingCalculationTimePerTick );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,10 +156,10 @@ public class AppEng
|
||||||
AELog.info( "PostInit" );
|
AELog.info( "PostInit" );
|
||||||
|
|
||||||
Registration.instance.PostInit( event );
|
Registration.instance.PostInit( event );
|
||||||
IntegrationRegistry.instance.postinit();
|
IntegrationRegistry.instance.postInit();
|
||||||
FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( CrashInfo.INTEGRATION ) );
|
FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( CrashInfo.INTEGRATION ) );
|
||||||
|
|
||||||
CommonHelper.proxy.postinit();
|
CommonHelper.proxy.postInit();
|
||||||
AEConfig.instance.save();
|
AEConfig.instance.save();
|
||||||
|
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );
|
NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler );
|
||||||
|
|
|
@ -37,7 +37,7 @@ public abstract class CommonHelper
|
||||||
|
|
||||||
public abstract void doRenderItem(ItemStack itemstack, World w);
|
public abstract void doRenderItem(ItemStack itemstack, World w);
|
||||||
|
|
||||||
public abstract void postinit();
|
public abstract void postInit();
|
||||||
|
|
||||||
public abstract CableRenderMode getRenderMode();
|
public abstract CableRenderMode getRenderMode();
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraftforge.common.ChestGenHooks;
|
import net.minecraftforge.common.ChestGenHooks;
|
||||||
import net.minecraftforge.common.DimensionManager;
|
import net.minecraftforge.common.DimensionManager;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
import net.minecraftforge.oredict.RecipeSorter;
|
import net.minecraftforge.oredict.RecipeSorter;
|
||||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
|
@ -403,17 +402,17 @@ public class Registration
|
||||||
items.itemFacade = addFeature( ItemFacade.class );
|
items.itemFacade = addFeature( ItemFacade.class );
|
||||||
items.itemCrystalSeed = addFeature( ItemCrystalSeed.class );
|
items.itemCrystalSeed = addFeature( ItemCrystalSeed.class );
|
||||||
|
|
||||||
ColoredItemDefinition pbreg, pbregl;
|
ColoredItemDefinition paintBall, lumenPaintBall;
|
||||||
items.itemPaintBall = pbreg = new ColoredItemDefinition();
|
items.itemPaintBall = paintBall = new ColoredItemDefinition();
|
||||||
items.itemLumenPaintBall = pbregl = new ColoredItemDefinition();
|
items.itemLumenPaintBall = lumenPaintBall = new ColoredItemDefinition();
|
||||||
AEItemDefinition pb = addFeature( ItemPaintBall.class );
|
AEItemDefinition pb = addFeature( ItemPaintBall.class );
|
||||||
|
|
||||||
for (AEColor c : AEColor.values())
|
for (AEColor c : AEColor.values())
|
||||||
{
|
{
|
||||||
if ( c != AEColor.Transparent )
|
if ( c != AEColor.Transparent )
|
||||||
{
|
{
|
||||||
pbreg.add( c, new ItemStackSrc( pb.item(), c.ordinal() ) );
|
paintBall.add( c, new ItemStackSrc( pb.item(), c.ordinal() ) );
|
||||||
pbregl.add( c, new ItemStackSrc( pb.item(), 20 + c.ordinal() ) );
|
lumenPaintBall.add( c, new ItemStackSrc( pb.item(), 20 + c.ordinal() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,7 +518,7 @@ public class Registration
|
||||||
public void Init(FMLInitializationEvent event)
|
public void Init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
// Perform ore camouflage!
|
// Perform ore camouflage!
|
||||||
ItemMultiMaterial.instance.unduplicate();
|
ItemMultiMaterial.instance.makeUnique();
|
||||||
|
|
||||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.CustomRecipes ) )
|
if ( AEConfig.instance.isFeatureEnabled( AEFeature.CustomRecipes ) )
|
||||||
recipeHandler.parseRecipes( new ConfigLoader( AppEng.instance.getConfigPath() ), "index.recipe" );
|
recipeHandler.parseRecipes( new ConfigLoader( AppEng.instance.getConfigPath() ), "index.recipe" );
|
||||||
|
@ -591,7 +590,7 @@ public class Registration
|
||||||
// default settings..
|
// default settings..
|
||||||
((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure();
|
((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure();
|
||||||
|
|
||||||
// add to localizaiton..
|
// add to localization..
|
||||||
PlayerMessages.values();
|
PlayerMessages.values();
|
||||||
GuiText.values();
|
GuiText.values();
|
||||||
|
|
||||||
|
|
|
@ -247,26 +247,26 @@ public class ApiPart implements IPartHelper
|
||||||
// n.accept( cw );
|
// n.accept( cw );
|
||||||
|
|
||||||
// n.accept( new TraceClassVisitor( new PrintWriter( System.out ) ) );
|
// n.accept( new TraceClassVisitor( new PrintWriter( System.out ) ) );
|
||||||
byte[] barray = cw.toByteArray();
|
byte[] byteArray = cw.toByteArray();
|
||||||
int size = barray.length;
|
int size = byteArray.length;
|
||||||
Class nclass = loadClass( n.name.replace( "/", "." ), barray );
|
Class clazz = loadClass( n.name.replace( "/", "." ), byteArray );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Object fish = nclass.newInstance();
|
Object fish = clazz.newInstance();
|
||||||
Class rootC = Class.forName( root );
|
Class rootC = Class.forName( root );
|
||||||
|
|
||||||
boolean bads = false;
|
boolean hasError = false;
|
||||||
|
|
||||||
if ( !rootC.isInstance( fish ) )
|
if ( !rootC.isInstance( fish ) )
|
||||||
{
|
{
|
||||||
bads = true;
|
hasError = true;
|
||||||
AELog.severe( "Error, Expected layer to implement " + root + " did not." );
|
AELog.severe( "Error, Expected layer to implement " + root + " did not." );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fish instanceof LayerBase )
|
if ( fish instanceof LayerBase )
|
||||||
{
|
{
|
||||||
bads = true;
|
hasError = true;
|
||||||
AELog.severe( "Error, Expected layer to NOT implement LayerBase but it DID." );
|
AELog.severe( "Error, Expected layer to NOT implement LayerBase but it DID." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,18 +274,18 @@ public class ApiPart implements IPartHelper
|
||||||
{
|
{
|
||||||
if ( !(fish instanceof TileCableBus) )
|
if ( !(fish instanceof TileCableBus) )
|
||||||
{
|
{
|
||||||
bads = true;
|
hasError = true;
|
||||||
AELog.severe( "Error, Expected layer to implement TileCableBus did not." );
|
AELog.severe( "Error, Expected layer to implement TileCableBus did not." );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !(fish instanceof TileEntity) )
|
if ( !(fish instanceof TileEntity) )
|
||||||
{
|
{
|
||||||
bads = true;
|
hasError = true;
|
||||||
AELog.severe( "Error, Expected layer to implement TileEntity did not." );
|
AELog.severe( "Error, Expected layer to implement TileEntity did not." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !bads )
|
if ( !hasError )
|
||||||
{
|
{
|
||||||
AELog.info( "Layer: " + n.name + " loaded successfully - " + size + " bytes" );
|
AELog.info( "Layer: " + n.name + " loaded successfully - " + size + " bytes" );
|
||||||
}
|
}
|
||||||
|
@ -297,8 +297,8 @@ public class ApiPart implements IPartHelper
|
||||||
AELog.error( t );
|
AELog.error( t );
|
||||||
}
|
}
|
||||||
|
|
||||||
roots.put( fullPath, nclass );
|
roots.put( fullPath, clazz );
|
||||||
return nclass;
|
return clazz;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processNode(AbstractInsnNode next, String nePar)
|
private void processNode(AbstractInsnNode next, String nePar)
|
||||||
|
|
|
@ -56,33 +56,19 @@ public enum AEFeature
|
||||||
|
|
||||||
ChunkLoggerTrace("Commands", false), LogSecurityAudits("Misc", false), Achievements("Misc");
|
ChunkLoggerTrace("Commands", false), LogSecurityAudits("Misc", false), Achievements("Misc");
|
||||||
|
|
||||||
String Category;
|
public final String category;
|
||||||
boolean visible = true;
|
public final boolean isVisible;
|
||||||
boolean defValue = true;
|
public final boolean defaultValue;
|
||||||
|
|
||||||
private AEFeature(String cat) {
|
private AEFeature(String cat) {
|
||||||
Category = cat;
|
this.category = cat;
|
||||||
visible = !this.name().equals( "Core" );
|
this.isVisible = !this.name().equals( "Core" );
|
||||||
|
this.defaultValue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private AEFeature(String cat, boolean defv) {
|
private AEFeature(String cat, boolean defaultValue) {
|
||||||
this( cat );
|
this.category = cat;
|
||||||
defValue = defv;
|
this.isVisible = !this.name().equals( "Core" );
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCategory()
|
|
||||||
{
|
|
||||||
return Category;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean defaultValue()
|
|
||||||
{
|
|
||||||
return defValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isVisible()
|
|
||||||
{
|
|
||||||
return visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,32 +21,32 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
public class AEFeatureHandler implements AEItemDefinition
|
public class AEFeatureHandler implements AEItemDefinition
|
||||||
{
|
{
|
||||||
|
|
||||||
private final EnumSet<AEFeature> myFeatures;
|
private final EnumSet<AEFeature> features;
|
||||||
|
|
||||||
private final String subname;
|
private final String subName;
|
||||||
private IAEFeature obj;
|
private IAEFeature feature;
|
||||||
|
|
||||||
private Item ItemData;
|
private Item ItemData;
|
||||||
private Block BlockData;
|
private Block BlockData;
|
||||||
|
|
||||||
public AEFeatureHandler(EnumSet<AEFeature> featureSet, IAEFeature _obj, String _subname) {
|
public AEFeatureHandler(EnumSet<AEFeature> features, IAEFeature feature, String subName) {
|
||||||
myFeatures = featureSet;
|
this.features = features;
|
||||||
obj = _obj;
|
this.feature = feature;
|
||||||
subname = _subname;
|
this.subName = subName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void register()
|
public void register()
|
||||||
{
|
{
|
||||||
if ( isFeatureAvailable() )
|
if ( isFeatureAvailable() )
|
||||||
{
|
{
|
||||||
if ( obj instanceof Item )
|
if ( feature instanceof Item )
|
||||||
initItem( (Item) obj );
|
initItem( (Item) feature );
|
||||||
if ( obj instanceof Block )
|
if ( feature instanceof Block )
|
||||||
initBlock( (Block) obj );
|
initBlock( (Block) feature );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getName(Class o, String subname)
|
public static String getName(Class o, String subName)
|
||||||
{
|
{
|
||||||
String name = o.getSimpleName();
|
String name = o.getSimpleName();
|
||||||
|
|
||||||
|
@ -55,19 +55,19 @@ public class AEFeatureHandler implements AEItemDefinition
|
||||||
else if ( name.startsWith( "ItemMultiMaterial" ) )
|
else if ( name.startsWith( "ItemMultiMaterial" ) )
|
||||||
name = name.replace( "ItemMultiMaterial", "ItemMaterial" );
|
name = name.replace( "ItemMultiMaterial", "ItemMaterial" );
|
||||||
|
|
||||||
if ( subname != null )
|
if ( subName != null )
|
||||||
{
|
{
|
||||||
// simple hack to allow me to do get nice names for these without
|
// simple hack to allow me to do get nice names for these without
|
||||||
// mode code outside of AEBaseItem
|
// mode code outside of AEBaseItem
|
||||||
if ( subname.startsWith( "P2PTunnel" ) )
|
if ( subName.startsWith( "P2PTunnel" ) )
|
||||||
return "ItemPart.P2PTunnel";
|
return "ItemPart.P2PTunnel";
|
||||||
|
|
||||||
if ( subname.equals( "CertusQuartzTools" ) )
|
if ( subName.equals( "CertusQuartzTools" ) )
|
||||||
return name.replace( "Quartz", "CertusQuartz" );
|
return name.replace( "Quartz", "CertusQuartz" );
|
||||||
if ( subname.equals( "NetherQuartzTools" ) )
|
if ( subName.equals( "NetherQuartzTools" ) )
|
||||||
return name.replace( "Quartz", "NetherQuartz" );
|
return name.replace( "Quartz", "NetherQuartz" );
|
||||||
|
|
||||||
name += "." + subname;
|
name += "." + subName;
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
|
@ -77,7 +77,7 @@ public class AEFeatureHandler implements AEItemDefinition
|
||||||
{
|
{
|
||||||
ItemData = i;
|
ItemData = i;
|
||||||
|
|
||||||
String name = getName( i.getClass(), subname );
|
String name = getName( i.getClass(), subName );
|
||||||
i.setTextureName( "appliedenergistics2:" + name );
|
i.setTextureName( "appliedenergistics2:" + name );
|
||||||
i.setUnlocalizedName( /* "item." */"appliedenergistics2." + name );
|
i.setUnlocalizedName( /* "item." */"appliedenergistics2." + name );
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class AEFeatureHandler implements AEItemDefinition
|
||||||
{
|
{
|
||||||
BlockData = b;
|
BlockData = b;
|
||||||
|
|
||||||
String name = getName( b.getClass(), subname );
|
String name = getName( b.getClass(), subName );
|
||||||
b.setCreativeTab( CreativeTab.instance );
|
b.setCreativeTab( CreativeTab.instance );
|
||||||
b.setBlockName( /* "tile." */"appliedenergistics2." + name );
|
b.setBlockName( /* "tile." */"appliedenergistics2." + name );
|
||||||
b.setBlockTextureName( "appliedenergistics2:" + name );
|
b.setBlockTextureName( "appliedenergistics2:" + name );
|
||||||
|
@ -118,14 +118,14 @@ public class AEFeatureHandler implements AEItemDefinition
|
||||||
|
|
||||||
public EnumSet<AEFeature> getFeatures()
|
public EnumSet<AEFeature> getFeatures()
|
||||||
{
|
{
|
||||||
return myFeatures.clone();
|
return features.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFeatureAvailable()
|
public boolean isFeatureAvailable()
|
||||||
{
|
{
|
||||||
boolean enabled = true;
|
boolean enabled = true;
|
||||||
|
|
||||||
for (AEFeature f : myFeatures)
|
for (AEFeature f : features)
|
||||||
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
|
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
|
||||||
|
|
||||||
return enabled;
|
return enabled;
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class RegistryContainer implements IRegistryContainer
|
||||||
private P2PTunnelRegistry P2PRegistry = new P2PTunnelRegistry();
|
private P2PTunnelRegistry P2PRegistry = new P2PTunnelRegistry();
|
||||||
private MovableTileRegistry MovableReg = new MovableTileRegistry();
|
private MovableTileRegistry MovableReg = new MovableTileRegistry();
|
||||||
private MatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry();
|
private MatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry();
|
||||||
private PlayerRegistry playerreg = new PlayerRegistry();
|
private PlayerRegistry playerRegistry = new PlayerRegistry();
|
||||||
private IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry();
|
private IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -94,7 +94,7 @@ public class RegistryContainer implements IRegistryContainer
|
||||||
@Override
|
@Override
|
||||||
public IPlayerRegistry players()
|
public IPlayerRegistry players()
|
||||||
{
|
{
|
||||||
return playerreg;
|
return playerRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class WorldGenRegistry implements IWorldGen
|
||||||
HashSet<Class<? extends WorldProvider>> badProviders = new HashSet();
|
HashSet<Class<? extends WorldProvider>> badProviders = new HashSet();
|
||||||
HashSet<Integer> badDimensions = new HashSet();
|
HashSet<Integer> badDimensions = new HashSet();
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
TypeSet[] types;
|
TypeSet[] types;
|
||||||
|
|
||||||
|
@ -60,12 +60,12 @@ public class WorldGenRegistry implements IWorldGen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disableWorldGenForDimension(WorldGenType type, int dimid)
|
public void disableWorldGenForDimension(WorldGenType type, int dimensionID)
|
||||||
{
|
{
|
||||||
if ( type == null )
|
if ( type == null )
|
||||||
throw new IllegalArgumentException( "Bad Type Passed" );
|
throw new IllegalArgumentException( "Bad Type Passed" );
|
||||||
|
|
||||||
types[type.ordinal()].badDimensions.add( dimid );
|
types[type.ordinal()].badDimensions.add( dimensionID );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,13 +51,13 @@ public class AppEngPacketHandlerBase
|
||||||
|
|
||||||
PACKET_MULTIPART(PacketMultiPart.class),
|
PACKET_MULTIPART(PacketMultiPart.class),
|
||||||
|
|
||||||
PACKET_PARTPLACEMENT(PacketPartPlacement.class),
|
PACKET_PART_PLACEMENT(PacketPartPlacement.class),
|
||||||
|
|
||||||
PACKET_LIGHTNING(PacketLightning.class),
|
PACKET_LIGHTNING(PacketLightning.class),
|
||||||
|
|
||||||
PACKET_MATTERCANNON(PacketMatterCannon.class),
|
PACKET_MATTER_CANNON(PacketMatterCannon.class),
|
||||||
|
|
||||||
PACKET_MOCKEXPLOSION(PacketMockExplosion.class),
|
PACKET_MOCK_EXPLOSION(PacketMockExplosion.class),
|
||||||
|
|
||||||
PACKET_VALUE_CONFIG(PacketValueConfig.class),
|
PACKET_VALUE_CONFIG(PacketValueConfig.class),
|
||||||
|
|
||||||
|
@ -127,6 +127,6 @@ public class AppEngPacketHandlerBase
|
||||||
return AppEngPacketHandlerBase.reverseLookup.get( c );
|
return AppEngPacketHandlerBase.reverseLookup.get( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ public enum GuiBridge implements IGuiHandler
|
||||||
|
|
||||||
GUI_DRIVE(ContainerDrive.class, TileDrive.class, WORLD, SecurityPermissions.BUILD),
|
GUI_DRIVE(ContainerDrive.class, TileDrive.class, WORLD, SecurityPermissions.BUILD),
|
||||||
|
|
||||||
GUI_VIBRATIONCHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null),
|
GUI_VIBRATION_CHAMBER(ContainerVibrationChamber.class, TileVibrationChamber.class, WORLD, null),
|
||||||
|
|
||||||
GUI_CONDENSER(ContainerCondenser.class, TileCondenser.class, WORLD, null),
|
GUI_CONDENSER(ContainerCondenser.class, TileCondenser.class, WORLD, null),
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public enum GuiBridge implements IGuiHandler
|
||||||
|
|
||||||
GUI_STORAGEBUS(ContainerStorageBus.class, PartStorageBus.class, WORLD, SecurityPermissions.BUILD),
|
GUI_STORAGEBUS(ContainerStorageBus.class, PartStorageBus.class, WORLD, SecurityPermissions.BUILD),
|
||||||
|
|
||||||
GUI_FPLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD),
|
GUI_FORMATION_PLANE(ContainerFormationPlane.class, PartFormationPlane.class, WORLD, SecurityPermissions.BUILD),
|
||||||
|
|
||||||
GUI_PRIORITY(ContainerPriority.class, IPriorityHost.class, WORLD, SecurityPermissions.BUILD),
|
GUI_PRIORITY(ContainerPriority.class, IPriorityHost.class, WORLD, SecurityPermissions.BUILD),
|
||||||
|
|
||||||
|
@ -151,13 +151,13 @@ public enum GuiBridge implements IGuiHandler
|
||||||
GUI_PATTERN_TERMINAL(ContainerPatternTerm.class, PartPatternTerminal.class, WORLD, SecurityPermissions.CRAFT),
|
GUI_PATTERN_TERMINAL(ContainerPatternTerm.class, PartPatternTerminal.class, WORLD, SecurityPermissions.CRAFT),
|
||||||
|
|
||||||
// extends (Container/Gui) + Bus
|
// extends (Container/Gui) + Bus
|
||||||
GUI_LEVELEMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD),
|
GUI_LEVEL_EMITTER(ContainerLevelEmitter.class, PartLevelEmitter.class, WORLD, SecurityPermissions.BUILD),
|
||||||
|
|
||||||
GUI_SPATIALIOPORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD),
|
GUI_SPATIAL_IO_PORT(ContainerSpatialIOPort.class, TileSpatialIOPort.class, WORLD, SecurityPermissions.BUILD),
|
||||||
|
|
||||||
GUI_INSCRIBER(ContainerInscriber.class, TileInscriber.class, WORLD, null),
|
GUI_INSCRIBER(ContainerInscriber.class, TileInscriber.class, WORLD, null),
|
||||||
|
|
||||||
GUI_CELLWORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null),
|
GUI_CELL_WORKBENCH(ContainerCellWorkbench.class, TileCellWorkbench.class, WORLD, null),
|
||||||
|
|
||||||
GUI_MAC(ContainerMAC.class, TileMolecularAssembler.class, WORLD, null),
|
GUI_MAC(ContainerMAC.class, TileMolecularAssembler.class, WORLD, null),
|
||||||
|
|
||||||
|
@ -335,9 +335,9 @@ public enum GuiBridge implements IGuiHandler
|
||||||
{
|
{
|
||||||
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
||||||
GuiBridge ID = values()[ID_ORDINAL >> 4];
|
GuiBridge ID = values()[ID_ORDINAL >> 4];
|
||||||
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
|
boolean stem = ((ID_ORDINAL >> 3) & 1) == 1;
|
||||||
|
|
||||||
if ( ID.type.isItem() && istem )
|
if ( ID.type.isItem() && stem )
|
||||||
{
|
{
|
||||||
ItemStack it = player.inventory.getCurrentItem();
|
ItemStack it = player.inventory.getCurrentItem();
|
||||||
Object myItem = getGuiObject( it, player, w, x, y, z );
|
Object myItem = getGuiObject( it, player, w, x, y, z );
|
||||||
|
@ -387,9 +387,9 @@ public enum GuiBridge implements IGuiHandler
|
||||||
{
|
{
|
||||||
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
ForgeDirection side = ForgeDirection.getOrientation( ID_ORDINAL & 0x07 );
|
||||||
GuiBridge ID = values()[ID_ORDINAL >> 4];
|
GuiBridge ID = values()[ID_ORDINAL >> 4];
|
||||||
boolean istem = ((ID_ORDINAL >> 3) & 1) == 1;
|
boolean stem = ((ID_ORDINAL >> 3) & 1) == 1;
|
||||||
|
|
||||||
if ( ID.type.isItem() && istem )
|
if ( ID.type.isItem() && stem )
|
||||||
{
|
{
|
||||||
ItemStack it = player.inventory.getCurrentItem();
|
ItemStack it = player.inventory.getCurrentItem();
|
||||||
Object myItem = getGuiObject( it, player, w, x, y, z );
|
Object myItem = getGuiObject( it, player, w, x, y, z );
|
||||||
|
|
|
@ -31,10 +31,10 @@ public class PacketConfigButton extends AppEngPacket
|
||||||
public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
|
public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
|
||||||
{
|
{
|
||||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||||
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
|
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||||
if ( aebc.getTarget() instanceof IConfigurableObject )
|
if ( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||||
{
|
{
|
||||||
IConfigManager cm = ((IConfigurableObject) aebc.getTarget()).getConfigManager();
|
IConfigManager cm = ((IConfigurableObject) baseContainer.getTarget()).getConfigManager();
|
||||||
Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() );
|
Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() );
|
||||||
cm.putSetting( option, newState );
|
cm.putSetting( option, newState );
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,10 +41,10 @@ public class PacketCraftRequest extends AppEngPacket
|
||||||
if ( player.openContainer instanceof ContainerCraftAmount )
|
if ( player.openContainer instanceof ContainerCraftAmount )
|
||||||
{
|
{
|
||||||
ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer;
|
ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer;
|
||||||
Object targ = cca.getTarget();
|
Object target = cca.getTarget();
|
||||||
if ( targ instanceof IGridHost )
|
if ( target instanceof IGridHost )
|
||||||
{
|
{
|
||||||
IGridHost gh = (IGridHost) targ;
|
IGridHost gh = (IGridHost) target;
|
||||||
IGridNode gn = gh.getGridNode( ForgeDirection.UNKNOWN );
|
IGridNode gn = gh.getGridNode( ForgeDirection.UNKNOWN );
|
||||||
if ( gn == null )
|
if ( gn == null )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,23 +46,23 @@ public class PacketInventoryAction extends AppEngPacket
|
||||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||||
if ( sender.openContainer instanceof AEBaseContainer )
|
if ( sender.openContainer instanceof AEBaseContainer )
|
||||||
{
|
{
|
||||||
AEBaseContainer aebc = (AEBaseContainer) sender.openContainer;
|
AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||||
if ( action == InventoryAction.AUTOCRAFT )
|
if ( action == InventoryAction.AUTO_CRAFT )
|
||||||
{
|
{
|
||||||
ContainerOpenContext context = aebc.openContext;
|
ContainerOpenContext context = baseContainer.openContext;
|
||||||
if ( context != null )
|
if ( context != null )
|
||||||
{
|
{
|
||||||
TileEntity te = context.getTile();
|
TileEntity te = context.getTile();
|
||||||
Platform.openGUI( sender, te, aebc.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
|
Platform.openGUI( sender, te, baseContainer.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );
|
||||||
|
|
||||||
if ( sender.openContainer instanceof ContainerCraftAmount )
|
if ( sender.openContainer instanceof ContainerCraftAmount )
|
||||||
{
|
{
|
||||||
ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
|
ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
|
||||||
|
|
||||||
if ( aebc.getTargetStack() != null )
|
if ( baseContainer.getTargetStack() != null )
|
||||||
{
|
{
|
||||||
cca.craftingItem.putStack( aebc.getTargetStack().getItemStack() );
|
cca.craftingItem.putStack( baseContainer.getTargetStack().getItemStack() );
|
||||||
cca.whatToMake = aebc.getTargetStack();
|
cca.whatToMake = baseContainer.getTargetStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
cca.detectAndSendChanges();
|
cca.detectAndSendChanges();
|
||||||
|
@ -71,7 +71,7 @@ public class PacketInventoryAction extends AppEngPacket
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aebc.doAction( sender, action, slot, id );
|
baseContainer.doAction( sender, action, slot, id );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket
|
||||||
gzReader.close();
|
gzReader.close();
|
||||||
|
|
||||||
// int uncompressedBytes = uncompressed.readableBytes();
|
// int uncompressedBytes = uncompressed.readableBytes();
|
||||||
// AELog.info( "Recv: " + originalBytes + " -> " + uncompressedBytes );
|
// AELog.info( "Receiver: " + originalBytes + " -> " + uncompressedBytes );
|
||||||
|
|
||||||
while (uncompressed.readableBytes() > 0)
|
while (uncompressed.readableBytes() > 0)
|
||||||
list.add( AEItemStack.loadItemStackFromPacket( uncompressed ) );
|
list.add( AEItemStack.loadItemStackFromPacket( uncompressed ) );
|
||||||
|
|
|
@ -108,8 +108,8 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||||
|
|
||||||
if ( is != null )
|
if ( is != null )
|
||||||
{
|
{
|
||||||
IMEMonitor<IAEItemStack> stor = inv.getItemInventory();
|
IMEMonitor<IAEItemStack> storage = inv.getItemInventory();
|
||||||
IItemList all = stor.getStorageList();
|
IItemList all = storage.getStorageList();
|
||||||
IPartitionList<IAEItemStack> filter = ItemViewCell.createFilter( cct.getViewCells() );
|
IPartitionList<IAEItemStack> filter = ItemViewCell.createFilter( cct.getViewCells() );
|
||||||
|
|
||||||
for (int x = 0; x < craftMatrix.getSizeInventory(); x++)
|
for (int x = 0; x < craftMatrix.getSizeInventory(); x++)
|
||||||
|
@ -120,15 +120,15 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||||
if ( currentItem != null )
|
if ( currentItem != null )
|
||||||
{
|
{
|
||||||
ic.setInventorySlotContents( x, currentItem );
|
ic.setInventorySlotContents( x, currentItem );
|
||||||
ItemStack newis = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null;
|
ItemStack newItemStack = r.matches( ic, pmp.worldObj ) ? r.getCraftingResult( ic ) : null;
|
||||||
ic.setInventorySlotContents( x, PatternItem );
|
ic.setInventorySlotContents( x, PatternItem );
|
||||||
|
|
||||||
if ( newis == null || !Platform.isSameItemPrecise( newis, is ) )
|
if ( newItemStack == null || !Platform.isSameItemPrecise( newItemStack, is ) )
|
||||||
{
|
{
|
||||||
IAEItemStack in = AEItemStack.create( currentItem );
|
IAEItemStack in = AEItemStack.create( currentItem );
|
||||||
if ( in != null )
|
if ( in != null )
|
||||||
{
|
{
|
||||||
IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, stor, in,
|
IAEItemStack out = realForFake == Actionable.SIMULATE ? null : Platform.poweredInsert( energy, storage, in,
|
||||||
cct.getSource() );
|
cct.getSource() );
|
||||||
if ( out != null )
|
if ( out != null )
|
||||||
craftMatrix.setInventorySlotContents( x, out.getItemStack() );
|
craftMatrix.setInventorySlotContents( x, out.getItemStack() );
|
||||||
|
@ -142,7 +142,7 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||||
|
|
||||||
if ( PatternItem != null && currentItem == null )
|
if ( PatternItem != null && currentItem == null )
|
||||||
{
|
{
|
||||||
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), stor, player.worldObj, r, is, ic,
|
ItemStack whichItem = Platform.extractItemsByRecipe( energy, cct.getSource(), storage, player.worldObj, r, is, ic,
|
||||||
PatternItem, x, all, realForFake, filter );
|
PatternItem, x, all, realForFake, filter );
|
||||||
|
|
||||||
if ( whichItem == null )
|
if ( whichItem == null )
|
||||||
|
@ -155,7 +155,7 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||||
if ( filter == null || filter.isListed( request ) )
|
if ( filter == null || filter.isListed( request ) )
|
||||||
{
|
{
|
||||||
request.setStackSize( 1 );
|
request.setStackSize( 1 );
|
||||||
IAEItemStack out = Platform.poweredExtraction( energy, stor, request, cct.getSource() );
|
IAEItemStack out = Platform.poweredExtraction( energy, storage, request, cct.getSource() );
|
||||||
if ( out != null )
|
if ( out != null )
|
||||||
{
|
{
|
||||||
whichItem = out.getItemStack();
|
whichItem = out.getItemStack();
|
||||||
|
@ -183,11 +183,11 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||||
ByteBuf data = Unpooled.buffer();
|
ByteBuf data = Unpooled.buffer();
|
||||||
|
|
||||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||||
DataOutputStream datao = new DataOutputStream( bytes );
|
DataOutputStream outputStream = new DataOutputStream( bytes );
|
||||||
|
|
||||||
data.writeInt( getPacketID() );
|
data.writeInt( getPacketID() );
|
||||||
|
|
||||||
CompressedStreamTools.writeCompressed( recipe, datao );
|
CompressedStreamTools.writeCompressed( recipe, outputStream );
|
||||||
data.writeBytes( bytes.toByteArray() );
|
data.writeBytes( bytes.toByteArray() );
|
||||||
|
|
||||||
configureWrite( data );
|
configureWrite( data );
|
||||||
|
|
|
@ -51,8 +51,8 @@ public class PacketPatternSlot extends AppEngPacket
|
||||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||||
if ( sender.openContainer instanceof ContainerPatternTerm )
|
if ( sender.openContainer instanceof ContainerPatternTerm )
|
||||||
{
|
{
|
||||||
ContainerPatternTerm aebc = (ContainerPatternTerm) sender.openContainer;
|
ContainerPatternTerm patternTerminal = (ContainerPatternTerm) sender.openContainer;
|
||||||
aebc.craftOrGetItem( this );
|
patternTerminal.craftOrGetItem( this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class CraftingJob implements Runnable, ICraftingJob
|
||||||
|
|
||||||
public long perOp = 0;
|
public long perOp = 0;
|
||||||
public long times = 0;
|
public long times = 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
HashMap<String, twoIntegers> opsAndMultiplier = new HashMap();
|
HashMap<String, twoIntegers> opsAndMultiplier = new HashMap();
|
||||||
|
|
||||||
|
@ -139,15 +139,15 @@ public class CraftingJob implements Runnable, ICraftingJob
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TickHandler.instance.registerCraftingSimulation( world, this );
|
TickHandler.instance.registerCraftingSimulation( world, this );
|
||||||
handlepausing();
|
handlePausing();
|
||||||
|
|
||||||
Stopwatch timer = Stopwatch.createStarted();
|
Stopwatch timer = Stopwatch.createStarted();
|
||||||
|
|
||||||
MECraftingInventory meci = new MECraftingInventory( original, true, false, true );
|
MECraftingInventory craftingInventory = new MECraftingInventory( original, true, false, true );
|
||||||
meci.ignore( output );
|
craftingInventory.ignore( output );
|
||||||
|
|
||||||
availableCheck = new MECraftingInventory( original, false, false, false );
|
availableCheck = new MECraftingInventory( original, false, false, false );
|
||||||
tree.request( meci, output.getStackSize(), actionSrc );
|
tree.request( craftingInventory, output.getStackSize(), actionSrc );
|
||||||
tree.dive( this );
|
tree.dive( this );
|
||||||
|
|
||||||
for (String s : opsAndMultiplier.keySet())
|
for (String s : opsAndMultiplier.keySet())
|
||||||
|
@ -158,7 +158,7 @@ public class CraftingJob implements Runnable, ICraftingJob
|
||||||
|
|
||||||
AELog.crafting( "------------- " + getByteTotal() + "b real" + timer.elapsed( TimeUnit.MILLISECONDS ) + "ms" );
|
AELog.crafting( "------------- " + getByteTotal() + "b real" + timer.elapsed( TimeUnit.MILLISECONDS ) + "ms" );
|
||||||
// if ( mode == Actionable.MODULATE )
|
// if ( mode == Actionable.MODULATE )
|
||||||
// meci.moveItemsToStorage( storage );
|
// craftingInventory.moveItemsToStorage( storage );
|
||||||
}
|
}
|
||||||
catch (CraftBranchFailure e)
|
catch (CraftBranchFailure e)
|
||||||
{
|
{
|
||||||
|
@ -167,13 +167,13 @@ public class CraftingJob implements Runnable, ICraftingJob
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Stopwatch timer = Stopwatch.createStarted();
|
Stopwatch timer = Stopwatch.createStarted();
|
||||||
MECraftingInventory meci = new MECraftingInventory( original, true, false, true );
|
MECraftingInventory craftingInventory = new MECraftingInventory( original, true, false, true );
|
||||||
meci.ignore( output );
|
craftingInventory.ignore( output );
|
||||||
|
|
||||||
availableCheck = new MECraftingInventory( original, false, false, false );
|
availableCheck = new MECraftingInventory( original, false, false, false );
|
||||||
|
|
||||||
tree.setSimulate();
|
tree.setSimulate();
|
||||||
tree.request( meci, output.getStackSize(), actionSrc );
|
tree.request( craftingInventory, output.getStackSize(), actionSrc );
|
||||||
tree.dive( this );
|
tree.dive( this );
|
||||||
|
|
||||||
for (String s : opsAndMultiplier.keySet())
|
for (String s : opsAndMultiplier.keySet())
|
||||||
|
@ -300,7 +300,7 @@ public class CraftingJob implements Runnable, ICraftingJob
|
||||||
|
|
||||||
private int incTime = Integer.MAX_VALUE;
|
private int incTime = Integer.MAX_VALUE;
|
||||||
|
|
||||||
public void handlepausing() throws InterruptedException
|
public void handlePausing() throws InterruptedException
|
||||||
{
|
{
|
||||||
if ( incTime++ > 100 )
|
if ( incTime++ > 100 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class CraftingTreeNode
|
||||||
|
|
||||||
public IAEItemStack request(MECraftingInventory inv, long l, BaseActionSource src) throws CraftBranchFailure, InterruptedException
|
public IAEItemStack request(MECraftingInventory inv, long l, BaseActionSource src) throws CraftBranchFailure, InterruptedException
|
||||||
{
|
{
|
||||||
job.handlepausing();
|
job.handlePausing();
|
||||||
|
|
||||||
List<IAEItemStack> thingsUsed = new LinkedList();
|
List<IAEItemStack> thingsUsed = new LinkedList();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class CraftingTreeProcess
|
||||||
long crafts = 0;
|
long crafts = 0;
|
||||||
boolean containerItems;
|
boolean containerItems;
|
||||||
boolean limitQty;
|
boolean limitQty;
|
||||||
boolean fullsimulation;
|
boolean fullSimulation;
|
||||||
|
|
||||||
private long bytes = 0;
|
private long bytes = 0;
|
||||||
final private int depth;
|
final private int depth;
|
||||||
|
@ -61,7 +61,7 @@ public class CraftingTreeProcess
|
||||||
{
|
{
|
||||||
ItemStack g = ic.getStackInSlot( x );
|
ItemStack g = ic.getStackInSlot( x );
|
||||||
if ( g != null && g.stackSize > 1 )
|
if ( g != null && g.stackSize > 1 )
|
||||||
fullsimulation = true;
|
fullSimulation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( IAEItemStack part : details.getCondensedInputs() )
|
for ( IAEItemStack part : details.getCondensedInputs() )
|
||||||
|
@ -100,8 +100,8 @@ public class CraftingTreeProcess
|
||||||
{
|
{
|
||||||
for (int x = 0; x < list.length; x++)
|
for (int x = 0; x < list.length; x++)
|
||||||
{
|
{
|
||||||
IAEItemStack ppart = list[x];
|
IAEItemStack comparePart = list[x];
|
||||||
if ( part != null && part.equals( ppart ) )
|
if ( part != null && part.equals( comparePart ) )
|
||||||
{
|
{
|
||||||
// use the first slot...
|
// use the first slot...
|
||||||
nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() );
|
nodes.put( new CraftingTreeNode( cc, job, part.copy(), this, x, depth + 1 ), part.getStackSize() );
|
||||||
|
@ -142,7 +142,7 @@ public class CraftingTreeProcess
|
||||||
|
|
||||||
long getTimes(long remaining, long stackSize)
|
long getTimes(long remaining, long stackSize)
|
||||||
{
|
{
|
||||||
if ( limitQty || fullsimulation )
|
if ( limitQty || fullSimulation )
|
||||||
return 1;
|
return 1;
|
||||||
return (remaining / stackSize) + (remaining % stackSize != 0 ? 1 : 0);
|
return (remaining / stackSize) + (remaining % stackSize != 0 ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@ -175,9 +175,9 @@ public class CraftingTreeProcess
|
||||||
|
|
||||||
public void request(MECraftingInventory inv, long i, BaseActionSource src) throws CraftBranchFailure, InterruptedException
|
public void request(MECraftingInventory inv, long i, BaseActionSource src) throws CraftBranchFailure, InterruptedException
|
||||||
{
|
{
|
||||||
job.handlepausing();
|
job.handlePausing();
|
||||||
|
|
||||||
if ( fullsimulation )
|
if ( fullSimulation )
|
||||||
{
|
{
|
||||||
InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
|
InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue