Format sourcecode
This commit is contained in:
@@ -116,7 +116,7 @@ public abstract class AEBaseBlock extends Block
|
||||
|
||||
@SuppressWarnings( "deprecation" )
|
||||
@Override
|
||||
public void addCollisionBoxToList( final IBlockState state, final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, @Nullable final Entity e, boolean p_185477_7_)
|
||||
public void addCollisionBoxToList( final IBlockState state, final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, @Nullable final Entity e, boolean p_185477_7_ )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
@@ -341,7 +341,7 @@ public abstract class AEBaseBlock extends Block
|
||||
return new EnumFacing[0];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
@Override
|
||||
public void addInformation( final ItemStack is, final World world, final List<String> lines, final ITooltipFlag advancedItemTooltips )
|
||||
{
|
||||
|
||||
@@ -63,24 +63,25 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
|
||||
|
||||
final double percent = internalCurrentPower / internalMaxPower;
|
||||
|
||||
lines.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
|
||||
lines.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform
|
||||
.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
|
||||
}
|
||||
|
||||
private double getMaxEnergyCapacity()
|
||||
{
|
||||
final Block blockID = Block.getBlockFromItem( this );
|
||||
final IBlockDefinition energyCell = Api.INSTANCE.definitions().blocks().energyCell();
|
||||
return energyCell.maybeBlock().map( block -> {
|
||||
if( blockID == block )
|
||||
{
|
||||
return 200000;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 8 * 200000;
|
||||
}
|
||||
}
|
||||
).orElse( 0 );
|
||||
return energyCell.maybeBlock().map( block ->
|
||||
{
|
||||
if( blockID == block )
|
||||
{
|
||||
return 200000;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 8 * 200000;
|
||||
}
|
||||
} ).orElse( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -274,10 +274,10 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
|
||||
public boolean onBlockActivated( World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
ItemStack heldItem;
|
||||
if( player != null && !player.getHeldItem(hand).isEmpty() )
|
||||
if( player != null && !player.getHeldItem( hand ).isEmpty() )
|
||||
{
|
||||
heldItem = player.getHeldItem(hand);
|
||||
|
||||
heldItem = player.getHeldItem( hand );
|
||||
|
||||
if( Platform.isWrench( player, heldItem, pos ) && player.isSneaking() )
|
||||
{
|
||||
final IBlockState blockState = world.getBlockState( pos );
|
||||
@@ -366,7 +366,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
|
||||
}
|
||||
}
|
||||
|
||||
return this.onActivated( world, pos, player, hand, player.getHeldItem(hand), facing, hitX, hitY, hitZ );
|
||||
return this.onActivated( world, pos, player, hand, player.getHeldItem( hand ), facing, hitX, hitY, hitZ );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -104,7 +104,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_MAC );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return super.onBlockActivated( w, pos, state, p, hand, side, hitX, hitY, hitZ );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import appeng.core.stats.Stats;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.grindstone.TileCrank;
|
||||
|
||||
|
||||
public class BlockCrank extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.grindstone.TileGrinder;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockGrinder extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.misc.TileCellWorkbench;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockCellWorkbench extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -119,7 +119,8 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
if( AppEng.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
|
||||
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos
|
||||
.getZ(), 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockInscriber extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ import appeng.helpers.ICustomCollision;
|
||||
import appeng.helpers.MetaRotation;
|
||||
import appeng.tile.misc.TileLightDetector;
|
||||
|
||||
|
||||
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock, ICustomCollision
|
||||
{
|
||||
|
||||
@@ -75,7 +76,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
EnumFacing facing = EnumFacing.values()[meta];
|
||||
return getDefaultState().withProperty(FACING, facing);
|
||||
return getDefaultState().withProperty( FACING, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -137,16 +138,16 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{/*
|
||||
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 *
|
||||
* getUp().offsetY; double zOff = -0.15 * getUp().offsetZ; out.add(
|
||||
* AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff +
|
||||
* (double) y + 0.15, zOff + (double) z + 0.15,// ahh xOff + (double) x
|
||||
* + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||
*/
|
||||
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 *
|
||||
* getUp().offsetY; double zOff = -0.15 * getUp().offsetZ; out.add(
|
||||
* AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff +
|
||||
* (double) y + 0.15, zOff + (double) z + 0.15,// ahh xOff + (double) x
|
||||
* + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
|
||||
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
|
||||
{
|
||||
final EnumFacing up = this.getOrientable( world, pos ).getUp();
|
||||
if( !this.canPlaceAt( (World) world, pos, up.getOpposite() ) )
|
||||
@@ -188,7 +189,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
|
||||
@@ -49,6 +49,7 @@ import appeng.core.AppEng;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.helpers.MetaRotation;
|
||||
|
||||
|
||||
public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock, ICustomCollision
|
||||
{
|
||||
|
||||
@@ -75,7 +76,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
|
||||
@Override
|
||||
public IBlockState getActualState( IBlockState state, IBlockAccess worldIn, BlockPos pos )
|
||||
{
|
||||
boolean oddPlacement = ((pos.getX() + pos.getY() + pos.getZ()) % 2) != 0;
|
||||
boolean oddPlacement = ( ( pos.getX() + pos.getY() + pos.getZ() ) % 2 ) != 0;
|
||||
|
||||
return super.getActualState( state, worldIn, pos )
|
||||
.withProperty( ODD, oddPlacement );
|
||||
@@ -91,7 +92,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
EnumFacing facing = EnumFacing.values()[meta];
|
||||
return getDefaultState().withProperty(FACING, facing);
|
||||
return getDefaultState().withProperty( FACING, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,10 +126,11 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List out, final Entity e )
|
||||
{/*
|
||||
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
|
||||
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
|
||||
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||
*/
|
||||
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
|
||||
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15,
|
||||
* zOff
|
||||
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -161,7 +163,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos)
|
||||
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
|
||||
{
|
||||
final EnumFacing up = this.getOrientable( world, pos ).getUp();
|
||||
if( !this.canPlaceAt( world, pos, up.getOpposite() ) )
|
||||
@@ -215,7 +217,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
|
||||
@@ -40,6 +40,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.misc.TileSecurityStation;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockSecurityStation extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.misc.TileSkyCompass;
|
||||
|
||||
|
||||
public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ import appeng.block.AEBaseBlock;
|
||||
import appeng.entity.EntityTinyTNTPrimed;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
||||
|
||||
public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
@@ -60,7 +61,8 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
this.setHardness( 0F );
|
||||
|
||||
// TODO: 1.11
|
||||
//EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get( EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
|
||||
// EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get(
|
||||
// EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +87,8 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
|
||||
w.spawnEntity( primedTinyTNTEntity );
|
||||
w.playSound( null, primedTinyTNTEntity.posX, primedTinyTNTEntity.posY, primedTinyTNTEntity.posZ, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1, 1 );
|
||||
w.playSound( null, primedTinyTNTEntity.posX, primedTinyTNTEntity.posY, primedTinyTNTEntity.posZ, SoundEvents.ENTITY_TNT_PRIMED,
|
||||
SoundCategory.BLOCKS, 1, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +141,8 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
super.onBlockExploded( w, pos, exp );
|
||||
if( !w.isRemote )
|
||||
{
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() );
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp
|
||||
.getExplosivePlacedBy() );
|
||||
primedTinyTNTEntity.setFuse( w.rand.nextInt( primedTinyTNTEntity.getFuse() / 4 ) + primedTinyTNTEntity.getFuse() / 8 );
|
||||
w.spawnEntity( primedTinyTNTEntity );
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.misc.TileVibrationChamber;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
@@ -70,7 +71,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
@Override
|
||||
protected IProperty[] getAEStates()
|
||||
{
|
||||
return new IProperty[]{ ACTIVE };
|
||||
return new IProperty[] { ACTIVE };
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -93,7 +94,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.misc;
|
||||
|
||||
|
||||
|
||||
@@ -319,7 +319,8 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
double d0 = (double) pos.getX() + ( (double) j + 0.5D ) / 4.0D;
|
||||
double d1 = (double) pos.getY() + ( (double) k + 0.5D ) / 4.0D;
|
||||
double d2 = (double) pos.getZ() + ( (double) l + 0.5D ) / 4.0D;
|
||||
ParticleDigging particle = new DestroyFX( world, d0, d1, d2, d0 - (double) pos.getX() - 0.5D, d1 - (double) pos.getY() - 0.5D, d2 - (double) pos.getZ() - 0.5D, getDefaultState() ).setBlockPos( pos );
|
||||
ParticleDigging particle = new DestroyFX( world, d0, d1, d2, d0 - (double) pos.getX() - 0.5D, d1 - (double) pos
|
||||
.getY() - 0.5D, d2 - (double) pos.getZ() - 0.5D, getDefaultState() ).setBlockPos( pos );
|
||||
particle.setParticleTexture( texture );
|
||||
effectRenderer.addEffect( particle );
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import appeng.tile.networking.TileController;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
public class BlockController extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
@@ -52,11 +53,11 @@ public class BlockController extends AEBaseTileBlock
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls the rendering of the controller block (connected texture style).
|
||||
* inside_a and inside_b are alternating patterns for a controller that is enclosed by other controllers,
|
||||
* and since they are always offline, they do not have the usual sub-states.
|
||||
*/
|
||||
/**
|
||||
* Controls the rendering of the controller block (connected texture style).
|
||||
* inside_a and inside_b are alternating patterns for a controller that is enclosed by other controllers,
|
||||
* and since they are always offline, they do not have the usual sub-states.
|
||||
*/
|
||||
public enum ControllerRenderType implements IStringSerializable
|
||||
{
|
||||
block, column_x, column_y, column_z, inside_a, inside_b;
|
||||
@@ -112,9 +113,12 @@ public class BlockController extends AEBaseTileBlock
|
||||
int z = pos.getZ();
|
||||
|
||||
// Detect whether controllers are on both sides of the x, y, and z axes
|
||||
final boolean xx = this.getTileEntity( world, x - 1, y, z ) instanceof TileController && this.getTileEntity( world, x + 1, y, z ) instanceof TileController;
|
||||
final boolean yy = this.getTileEntity( world, x, y - 1, z ) instanceof TileController && this.getTileEntity( world, x, y + 1, z ) instanceof TileController;
|
||||
final boolean zz = this.getTileEntity( world, x, y, z - 1 ) instanceof TileController && this.getTileEntity( world, x, y, z + 1 ) instanceof TileController;
|
||||
final boolean xx = this.getTileEntity( world, x - 1, y, z ) instanceof TileController && this.getTileEntity( world, x + 1, y,
|
||||
z ) instanceof TileController;
|
||||
final boolean yy = this.getTileEntity( world, x, y - 1, z ) instanceof TileController && this.getTileEntity( world, x, y + 1,
|
||||
z ) instanceof TileController;
|
||||
final boolean zz = this.getTileEntity( world, x, y, z - 1 ) instanceof TileController && this.getTileEntity( world, x, y,
|
||||
z + 1 ) instanceof TileController;
|
||||
|
||||
if( xx && !yy && !zz )
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.networking.TileCreativeEnergyCell;
|
||||
|
||||
|
||||
public class BlockCreativeEnergyCell extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.block.networking;
|
||||
|
||||
import appeng.tile.networking.TileDenseEnergyCell;
|
||||
|
||||
|
||||
public class BlockDenseEnergyCell extends BlockEnergyCell
|
||||
{
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.networking;
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import appeng.helpers.Splotch;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockPaint extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.paint;
|
||||
|
||||
|
||||
@@ -27,7 +28,8 @@ import appeng.helpers.Splotch;
|
||||
|
||||
|
||||
/**
|
||||
* Renders paint blocks, which render multiple "splotches" that have been applied to the sides of adjacent blocks using a
|
||||
* Renders paint blocks, which render multiple "splotches" that have been applied to the sides of adjacent blocks using
|
||||
* a
|
||||
* matter cannon with paint balls.
|
||||
*/
|
||||
class PaintBakedModel implements IBakedModel
|
||||
@@ -82,7 +84,8 @@ class PaintBakedModel implements IBakedModel
|
||||
CubeBuilder builder = new CubeBuilder( vertexFormat );
|
||||
|
||||
float offsetConstant = 0.001f;
|
||||
for( final Splotch s : splotches) {
|
||||
for( final Splotch s : splotches )
|
||||
{
|
||||
|
||||
if( s.isLumen() )
|
||||
{
|
||||
@@ -191,7 +194,6 @@ class PaintBakedModel implements IBakedModel
|
||||
static List<ResourceLocation> getRequiredTextures()
|
||||
{
|
||||
return ImmutableList.of(
|
||||
TEXTURE_PAINT1, TEXTURE_PAINT2, TEXTURE_PAINT3
|
||||
);
|
||||
TEXTURE_PAINT1, TEXTURE_PAINT2, TEXTURE_PAINT3 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.paint;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.paint;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.paint;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.paint;
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
|
||||
|
||||
public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.qnb;
|
||||
|
||||
|
||||
@@ -117,7 +118,8 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
builder.setRenderFullBright( true );
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
{
|
||||
// Offset the face by a slight amount so that it is drawn over the already drawn ring texture (avoids z-fighting)
|
||||
// Offset the face by a slight amount so that it is drawn over the already drawn ring texture
|
||||
// (avoids z-fighting)
|
||||
float xOffset = Math.abs( facing.getFrontOffsetX() * 0.01f );
|
||||
float yOffset = Math.abs( facing.getFrontOffsetY() * 0.01f );
|
||||
float zOffset = Math.abs( facing.getFrontOffsetZ() * 0.01f );
|
||||
@@ -125,8 +127,7 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
builder.setDrawFaces( EnumSet.of( facing ) );
|
||||
builder.addCube(
|
||||
DEFAULT_RENDER_MIN - xOffset, DEFAULT_RENDER_MIN - yOffset, DEFAULT_RENDER_MIN - zOffset,
|
||||
DEFAULT_RENDER_MAX + xOffset, DEFAULT_RENDER_MAX + yOffset, DEFAULT_RENDER_MAX + zOffset
|
||||
);
|
||||
DEFAULT_RENDER_MAX + xOffset, DEFAULT_RENDER_MAX + yOffset, DEFAULT_RENDER_MAX + zOffset );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,7 +147,8 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
builder.setRenderFullBright( true );
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
{
|
||||
// Offset the face by a slight amount so that it is drawn over the already drawn ring texture (avoids z-fighting)
|
||||
// Offset the face by a slight amount so that it is drawn over the already drawn ring texture
|
||||
// (avoids z-fighting)
|
||||
float xOffset = Math.abs( facing.getFrontOffsetX() * 0.01f );
|
||||
float yOffset = Math.abs( facing.getFrontOffsetY() * 0.01f );
|
||||
float zOffset = Math.abs( facing.getFrontOffsetZ() * 0.01f );
|
||||
@@ -154,8 +156,7 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
builder.setDrawFaces( EnumSet.of( facing ) );
|
||||
builder.addCube(
|
||||
-xOffset, -yOffset, -zOffset,
|
||||
16 + xOffset, 16 + yOffset, 16 + zOffset
|
||||
);
|
||||
16 + xOffset, 16 + yOffset, 16 + zOffset );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,7 +239,6 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
public static List<ResourceLocation> getRequiredTextures()
|
||||
{
|
||||
return ImmutableList.of(
|
||||
TEXTURE_LINK, TEXTURE_RING, TEXTURE_CABLE_GLASS, TEXTURE_COVERED_CABLE, TEXTURE_RING_LIGHT, TEXTURE_RING_LIGHT_CORNER
|
||||
);
|
||||
TEXTURE_LINK, TEXTURE_RING, TEXTURE_CABLE_GLASS, TEXTURE_COVERED_CABLE, TEXTURE_RING_LIGHT, TEXTURE_RING_LIGHT_CORNER );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.qnb;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.qnb;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.qnb;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.block.qnb;
|
||||
|
||||
|
||||
@@ -18,6 +19,6 @@ public class QuantumBridgeRendering extends BlockRenderingCustomizer
|
||||
{
|
||||
rendering.builtInModel( "models/block/qnb/qnb_formed", new QnbFormedModel() );
|
||||
// Disable auto rotation
|
||||
rendering.modelCustomizer( (location, model) -> model );
|
||||
rendering.modelCustomizer( ( location, model ) -> model );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
||||
|
||||
public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockSpatialIOPort extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import appeng.util.Platform;
|
||||
public class BlockDrive extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
public static final UnlistedProperty<DriveSlotsState> SLOTS_STATE = new UnlistedProperty<>("drive_slots_state", DriveSlotsState.class);
|
||||
public static final UnlistedProperty<DriveSlotsState> SLOTS_STATE = new UnlistedProperty<>( "drive_slots_state", DriveSlotsState.class );
|
||||
|
||||
public BlockDrive()
|
||||
{
|
||||
|
||||
@@ -221,7 +221,8 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
}
|
||||
|
||||
// Register the item and block with the game
|
||||
factory.addPreInit( side -> {
|
||||
factory.addPreInit( side ->
|
||||
{
|
||||
Registration.addBlockToRegister( block );
|
||||
if( item != null )
|
||||
{
|
||||
@@ -231,16 +232,13 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
|
||||
block.setCreativeTab( creativeTab );
|
||||
|
||||
|
||||
// Register all extra handlers
|
||||
preInitCallbacks.forEach( consumer -> factory.addPreInit( side -> consumer.accept( block, item ) ) );
|
||||
initCallbacks.forEach( consumer -> factory.addInit( side -> consumer.accept( block, item ) ) );
|
||||
modelRegCallbacks.forEach(consumer -> factory.addModelReg(side -> consumer.accept( block, item ) ) );
|
||||
modelRegCallbacks.forEach( consumer -> factory.addModelReg( side -> consumer.accept( block, item ) ) );
|
||||
postInitCallbacks.forEach( consumer -> factory.addPostInit( side -> consumer.accept( block, item ) ) );
|
||||
|
||||
|
||||
|
||||
if ( tileEntityDefinition != null && block instanceof AEBaseTileBlock )
|
||||
if( tileEntityDefinition != null && block instanceof AEBaseTileBlock )
|
||||
{
|
||||
( (AEBaseTileBlock) block ).setTileEntity( tileEntityDefinition.getTileEntityClass() );
|
||||
if( tileEntityDefinition.getName() == null )
|
||||
@@ -270,8 +268,11 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
|
||||
if( block instanceof AEBaseTileBlock )
|
||||
{
|
||||
factory.addPreInit( side -> {
|
||||
AEBaseTile.registerTileItem( tileEntityDefinition == null ? ( (AEBaseTileBlock) block ).getTileEntityClass() : tileEntityDefinition.getTileEntityClass(), new BlockStackSrc( block, 0, ActivityState.Enabled ) );
|
||||
factory.addPreInit( side ->
|
||||
{
|
||||
AEBaseTile.registerTileItem(
|
||||
tileEntityDefinition == null ? ( (AEBaseTileBlock) block ).getTileEntityClass() : tileEntityDefinition.getTileEntityClass(),
|
||||
new BlockStackSrc( block, 0, ActivityState.Enabled ) );
|
||||
} );
|
||||
|
||||
if( tileEntityDefinition != null )
|
||||
|
||||
@@ -99,7 +99,8 @@ public class FeatureFactory
|
||||
{
|
||||
ColoredItemDefinition definition = new ColoredItemDefinition();
|
||||
|
||||
target.maybeItem().ifPresent( targetItem -> {
|
||||
target.maybeItem().ifPresent( targetItem ->
|
||||
{
|
||||
for( final AEColor color : AEColor.VALID_COLORS )
|
||||
{
|
||||
final ActivityState state = ActivityState.from( target.isEnabled() );
|
||||
|
||||
@@ -165,13 +165,14 @@ class ItemDefinitionBuilder implements IItemBuilder
|
||||
// Register all extra handlers
|
||||
preInitCallbacks.forEach( consumer -> factory.addPreInit( side -> consumer.accept( item ) ) );
|
||||
initCallbacks.forEach( consumer -> factory.addInit( side -> consumer.accept( item ) ) );
|
||||
modelRegCallbacks.forEach(consumer -> factory.addModelReg(side -> consumer.accept( item ) ) );
|
||||
modelRegCallbacks.forEach( consumer -> factory.addModelReg( side -> consumer.accept( item ) ) );
|
||||
postInitCallbacks.forEach( consumer -> factory.addPostInit( side -> consumer.accept( item ) ) );
|
||||
|
||||
// Register custom dispenser behavior if requested
|
||||
if( dispenserBehaviorSupplier != null )
|
||||
{
|
||||
factory.addPostInit( side -> {
|
||||
factory.addPostInit( side ->
|
||||
{
|
||||
IBehaviorDispenseItem behavior = dispenserBehaviorSupplier.get();
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( item, behavior );
|
||||
} );
|
||||
|
||||
@@ -52,7 +52,8 @@ public class ItemModelComponent implements InitComponent
|
||||
{
|
||||
ItemModelMesher itemMesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
|
||||
|
||||
modelsByMeta.forEach( ( meta, model ) -> {
|
||||
modelsByMeta.forEach( ( meta, model ) ->
|
||||
{
|
||||
itemMesher.register( item, meta, model );
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ModelOverrideComponent implements PreInitComponent
|
||||
{
|
||||
IRegistry<ModelResourceLocation, IBakedModel> modelRegistry = event.getModelRegistry();
|
||||
Set<ModelResourceLocation> keys = Sets.newHashSet( modelRegistry.getKeys() );
|
||||
// IBakedModel missingModel = modelRegistry.getObject( MODEL_MISSING );
|
||||
// IBakedModel missingModel = modelRegistry.getObject( MODEL_MISSING );
|
||||
IModel missingModel = ModelLoaderRegistry.getMissingModel();
|
||||
|
||||
for( ModelResourceLocation location : keys )
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
|
||||
package appeng.bootstrap.components;
|
||||
|
||||
|
||||
import appeng.bootstrap.IBootstrapComponent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
|
||||
/**
|
||||
* @author GuntherDW
|
||||
*/
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ModelRegComponent extends IBootstrapComponent {
|
||||
public interface ModelRegComponent extends IBootstrapComponent
|
||||
{
|
||||
|
||||
void modelReg(Side side);
|
||||
void modelReg( Side side );
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ public class StateMapperComponent implements ModelRegComponent
|
||||
ModelLoader.setCustomStateMapper( block, stateMapper );
|
||||
if( stateMapper instanceof IResourceManagerReloadListener )
|
||||
{
|
||||
( (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager() ).registerReloadListener( (IResourceManagerReloadListener) stateMapper );
|
||||
( (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager() )
|
||||
.registerReloadListener( (IResourceManagerReloadListener) stateMapper );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import appeng.tile.AEBaseTile;
|
||||
*
|
||||
* @param <T>
|
||||
*/
|
||||
//public class TesrComponent<T extends AEBaseTile> implements ModelRegComponent
|
||||
// public class TesrComponent<T extends AEBaseTile> implements ModelRegComponent
|
||||
public class TesrComponent<T extends AEBaseTile> implements PreInitComponent
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public class TesrComponent<T extends AEBaseTile> implements PreInitComponent
|
||||
}
|
||||
|
||||
@Override
|
||||
// public void modelReg( Side side )
|
||||
// public void modelReg( Side side )
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer( tileEntityClass, tesr );
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
package appeng.bootstrap.components;
|
||||
|
||||
|
||||
import appeng.bootstrap.definitions.TileEntityDefinition;
|
||||
import appeng.core.AppEng;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
@@ -8,35 +10,36 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author GuntherDW
|
||||
*/
|
||||
public class TileEntityComponent implements PreInitComponent
|
||||
{
|
||||
private List<TileEntityDefinition> tileEntityDefinitions = new ArrayList<>();
|
||||
private List<TileEntityDefinition> tileEntityDefinitions = new ArrayList<>();
|
||||
|
||||
public TileEntityComponent()
|
||||
{
|
||||
}
|
||||
public TileEntityComponent()
|
||||
{
|
||||
}
|
||||
|
||||
public void addTileEntity( TileEntityDefinition tileEntityDefinition )
|
||||
{
|
||||
if( !tileEntityDefinitions.contains( tileEntityDefinition ) )
|
||||
{
|
||||
tileEntityDefinitions.add( tileEntityDefinition );
|
||||
}
|
||||
}
|
||||
public void addTileEntity( TileEntityDefinition tileEntityDefinition )
|
||||
{
|
||||
if( !tileEntityDefinitions.contains( tileEntityDefinition ) )
|
||||
{
|
||||
tileEntityDefinitions.add( tileEntityDefinition );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
for( TileEntityDefinition tileEntityDefinition : tileEntityDefinitions )
|
||||
{
|
||||
if ( !tileEntityDefinition.isRegistered() )
|
||||
{
|
||||
GameRegistry.registerTileEntity( tileEntityDefinition.getTileEntityClass(), AppEng.MOD_ID + ":" + tileEntityDefinition.getName() );
|
||||
tileEntityDefinition.setRegistered( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
for( TileEntityDefinition tileEntityDefinition : tileEntityDefinitions )
|
||||
{
|
||||
if( !tileEntityDefinition.isRegistered() )
|
||||
{
|
||||
GameRegistry.registerTileEntity( tileEntityDefinition.getTileEntityClass(), AppEng.MOD_ID + ":" + tileEntityDefinition.getName() );
|
||||
tileEntityDefinition.setRegistered( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,53 +18,55 @@
|
||||
|
||||
package appeng.bootstrap.definitions;
|
||||
|
||||
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
|
||||
/**
|
||||
* @author GuntherDW
|
||||
*/
|
||||
public class TileEntityDefinition
|
||||
{
|
||||
|
||||
private final Class<? extends AEBaseTile> tileEntityClass;
|
||||
private String name;
|
||||
private boolean isRegistered = false;
|
||||
private final Class<? extends AEBaseTile> tileEntityClass;
|
||||
private String name;
|
||||
private boolean isRegistered = false;
|
||||
|
||||
// This signals the BlockDefinitionBuilder to set the name of the TE to the blockname.
|
||||
public TileEntityDefinition( Class<? extends AEBaseTile> tileEntityClass )
|
||||
{
|
||||
this.tileEntityClass = tileEntityClass;
|
||||
this.name = null;
|
||||
}
|
||||
// This signals the BlockDefinitionBuilder to set the name of the TE to the blockname.
|
||||
public TileEntityDefinition( Class<? extends AEBaseTile> tileEntityClass )
|
||||
{
|
||||
this.tileEntityClass = tileEntityClass;
|
||||
this.name = null;
|
||||
}
|
||||
|
||||
public TileEntityDefinition( Class<? extends AEBaseTile> tileEntityClass, String optionalName )
|
||||
{
|
||||
this.tileEntityClass = tileEntityClass;
|
||||
this.name = optionalName;
|
||||
}
|
||||
public TileEntityDefinition( Class<? extends AEBaseTile> tileEntityClass, String optionalName )
|
||||
{
|
||||
this.tileEntityClass = tileEntityClass;
|
||||
this.name = optionalName;
|
||||
}
|
||||
|
||||
public Class<? extends AEBaseTile> getTileEntityClass()
|
||||
{
|
||||
return tileEntityClass;
|
||||
}
|
||||
public Class<? extends AEBaseTile> getTileEntityClass()
|
||||
{
|
||||
return tileEntityClass;
|
||||
}
|
||||
|
||||
public void setName( String name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
public void setName( String name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean isRegistered()
|
||||
{
|
||||
return isRegistered;
|
||||
}
|
||||
public boolean isRegistered()
|
||||
{
|
||||
return isRegistered;
|
||||
}
|
||||
|
||||
public void setRegistered( boolean registered )
|
||||
{
|
||||
isRegistered = registered;
|
||||
}
|
||||
public void setRegistered( boolean registered )
|
||||
{
|
||||
isRegistered = registered;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
super.drawDefaultBackground();
|
||||
super.drawScreen( mouseX, mouseY, btn );
|
||||
this.renderHoveredToolTip(mouseX, mouseY);
|
||||
this.renderHoveredToolTip( mouseX, mouseY );
|
||||
|
||||
for( final Object c : this.buttonList )
|
||||
{
|
||||
@@ -760,15 +760,27 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
final float f1 = 0.00390625F;
|
||||
final float f = 0.00390625F;
|
||||
final float par6 = 16;
|
||||
vb.pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() ).endVertex();
|
||||
vb.pos( par1 + 0, par2 + par6, this.zLevel )
|
||||
.tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 )
|
||||
.color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() )
|
||||
.endVertex();
|
||||
final float par5 = 16;
|
||||
vb.pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() ).endVertex();
|
||||
vb.pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() ).endVertex();
|
||||
vb.pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() ).endVertex();
|
||||
vb.pos( par1 + par5, par2 + par6, this.zLevel )
|
||||
.tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 )
|
||||
.color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() )
|
||||
.endVertex();
|
||||
vb.pos( par1 + par5, par2 + 0, this.zLevel )
|
||||
.tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 )
|
||||
.color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() )
|
||||
.endVertex();
|
||||
vb.pos( par1 + 0, par2 + 0, this.zLevel )
|
||||
.tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 )
|
||||
.color( 1.0f, 1.0f, 1.0f,
|
||||
aes.getOpacityOfIcon() )
|
||||
.endVertex();
|
||||
tessellator.draw();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.gui;
|
||||
|
||||
|
||||
@@ -70,7 +71,7 @@ class Size1Slot extends Slot
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@SideOnly( Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public String getSlotTexture()
|
||||
{
|
||||
return delegate.getSlotTexture();
|
||||
@@ -83,21 +84,21 @@ class Size1Slot extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return delegate.isEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public ResourceLocation getBackgroundLocation()
|
||||
{
|
||||
return delegate.getBackgroundLocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public TextureAtlasSprite getBackgroundSprite()
|
||||
{
|
||||
return delegate.getBackgroundSprite();
|
||||
|
||||
@@ -41,7 +41,8 @@ public class AEConfigGuiFactory implements IModGuiFactory
|
||||
* @return true if this object provides a config gui screen, false otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean hasConfigGui() {
|
||||
public boolean hasConfigGui()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,13 +62,14 @@ public class AEConfigGuiFactory implements IModGuiFactory
|
||||
* can be changed here.
|
||||
*
|
||||
* @param parentScreen The screen to which must be returned when closing the
|
||||
* returned screen.
|
||||
* returned screen.
|
||||
* @return A class that will be instantiated on clicks on the config button
|
||||
* or null if no GUI is desired.
|
||||
*/
|
||||
@Override
|
||||
public GuiScreen createConfigGui(GuiScreen parentScreen) {
|
||||
return new AEConfigGui(parentScreen);
|
||||
public GuiScreen createConfigGui( GuiScreen parentScreen )
|
||||
{
|
||||
return new AEConfigGui( parentScreen );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,7 +65,8 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
{
|
||||
this.clear = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE );
|
||||
this.partition = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH );
|
||||
this.copyMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5, 12 * 16 + 5, GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc.getLocal() );
|
||||
this.copyMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5, 12 * 16 + 5, GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc
|
||||
.getLocal() );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
|
||||
@@ -70,7 +70,8 @@ public class GuiCondenser extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal() );
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy
|
||||
.getLocal() );
|
||||
|
||||
this.mode = new GuiImgButton( 128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT, this.cvc.getOutput() );
|
||||
|
||||
|
||||
@@ -173,7 +173,8 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
{
|
||||
this.actionPerformed( this.next );
|
||||
}
|
||||
if( ( key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ) ) && this.amountToCraft.textboxKeyTyped( character, key ) )
|
||||
if( ( key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ) ) && this.amountToCraft
|
||||
.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -120,7 +120,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
this.start.enabled = false;
|
||||
this.buttonList.add( this.start );
|
||||
|
||||
this.selectCPU = new GuiButton( 0, this.guiLeft + ( 219 - 180 ) / 2, this.guiTop + this.ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.Automatic );
|
||||
this.selectCPU = new GuiButton( 0, this.guiLeft + ( 219 - 180 ) / 2, this.guiTop + this.ySize - 68, 180, 20, GuiText.CraftingCPU
|
||||
.getLocal() + ": " + GuiText.Automatic );
|
||||
this.selectCPU.enabled = false;
|
||||
this.buttonList.add( this.selectCPU );
|
||||
|
||||
@@ -219,7 +220,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
else
|
||||
{
|
||||
dsp = this.ccc.getCpuAvailableBytes() > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.getCpuAvailableBytes() + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.getCpuCoProcessors() ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
|
||||
dsp = this.ccc.getCpuAvailableBytes() > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.getCpuAvailableBytes() + " : " + GuiText.CoProcessors
|
||||
.getLocal() + ": " + this.ccc.getCpuCoProcessors() ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
|
||||
}
|
||||
|
||||
final int offset = ( 219 - this.fontRenderer.getStringWidth( dsp ) ) / 2;
|
||||
@@ -285,7 +287,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
str = GuiText.FromStorage.getLocal() + ": " + str;
|
||||
final int w = 4 + this.fontRenderer.getStringWidth( str );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
|
||||
( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -310,7 +313,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
str = GuiText.Missing.getLocal() + ": " + str;
|
||||
final int w = 4 + this.fontRenderer.getStringWidth( str );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
|
||||
( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -335,7 +339,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
str = GuiText.ToCraft.getLocal() + ": " + str;
|
||||
final int w = 4 + this.fontRenderer.getStringWidth( str );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ),
|
||||
( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
|
||||
@@ -139,7 +139,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
super.initGui();
|
||||
this.setScrollBar();
|
||||
this.cancel = new GuiButton( 0, this.guiLeft + CANCEL_LEFT_OFFSET, this.guiTop + this.ySize - CANCEL_TOP_OFFSET, CANCEL_WIDTH, CANCEL_HEIGHT, GuiText.Cancel.getLocal() );
|
||||
this.cancel = new GuiButton( 0, this.guiLeft + CANCEL_LEFT_OFFSET, this.guiTop + this.ySize - CANCEL_TOP_OFFSET, CANCEL_WIDTH, CANCEL_HEIGHT, GuiText.Cancel
|
||||
.getLocal() );
|
||||
this.buttonList.add( this.cancel );
|
||||
}
|
||||
|
||||
@@ -263,7 +264,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() );
|
||||
final int w = 4 + this.fontRenderer.getStringWidth( str );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
|
||||
( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -278,7 +280,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
final String str = GuiText.Crafting.getLocal() + ": " + converter.toWideReadableForm( activeStack.getStackSize() );
|
||||
final int w = 4 + this.fontRenderer.getStringWidth( str );
|
||||
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
|
||||
( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -293,7 +296,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
final String str = GuiText.Scheduled.getLocal() + ": " + converter.toWideReadableForm( pendingStack.getStackSize() );
|
||||
final int w = 4 + this.fontRenderer.getStringWidth( str );
|
||||
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ),
|
||||
( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
|
||||
@@ -127,13 +127,15 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + this.ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||
this.selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + this.ySize - 25, 150, 20, GuiText.CraftingCPU
|
||||
.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||
// selectCPU.enabled = false;
|
||||
this.buttonList.add( this.selectCPU );
|
||||
|
||||
if( !this.myIcon.isEmpty() )
|
||||
{
|
||||
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), this.itemRender ) );
|
||||
this.buttonList.add(
|
||||
this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), this.itemRender ) );
|
||||
this.originalGuiBtn.setHideEdge( 13 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ public class GuiInterface extends GuiUpgradeable
|
||||
this.BlockMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO );
|
||||
this.buttonList.add( this.BlockMode );
|
||||
|
||||
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal.getLocal(), GuiText.InterfaceTerminalHint.getLocal() );
|
||||
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal
|
||||
.getLocal(), GuiText.InterfaceTerminalHint.getLocal() );
|
||||
this.buttonList.add( this.interfaceMode );
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
Keyboard.enableRepeatEvents( true );
|
||||
|
||||
this.maxRows = this.getMaxRows();
|
||||
this.perRow = AEConfig.instance().getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ( ( this.width - this.standardSize ) / 18 );
|
||||
this.perRow = AEConfig.instance().getConfigManager().getSetting(
|
||||
Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ( ( this.width - this.standardSize ) / 18 );
|
||||
|
||||
final int magicNumber = 114 + 1;
|
||||
final int extraSpace = this.height - magicNumber - this.reservedSpace;
|
||||
@@ -271,25 +272,32 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
if( this.customSortOrder )
|
||||
{
|
||||
this.buttonList.add( this.SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) );
|
||||
this.buttonList
|
||||
.add( this.SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) );
|
||||
offset += 20;
|
||||
}
|
||||
|
||||
if( this.viewCell || this instanceof GuiWirelessTerm )
|
||||
{
|
||||
this.buttonList.add( this.ViewBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.VIEW_MODE, this.configSrc.getSetting( Settings.VIEW_MODE ) ) );
|
||||
this.buttonList
|
||||
.add( this.ViewBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.VIEW_MODE, this.configSrc.getSetting( Settings.VIEW_MODE ) ) );
|
||||
offset += 20;
|
||||
}
|
||||
|
||||
this.buttonList.add( this.SortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc.getSetting( Settings.SORT_DIRECTION ) ) );
|
||||
this.buttonList.add( this.SortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc
|
||||
.getSetting( Settings.SORT_DIRECTION ) ) );
|
||||
offset += 20;
|
||||
|
||||
this.buttonList.add( this.searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance().getConfigManager().getSetting( Settings.SEARCH_MODE ) ) );
|
||||
this.buttonList.add(
|
||||
this.searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance().getConfigManager().getSetting(
|
||||
Settings.SEARCH_MODE ) ) );
|
||||
offset += 20;
|
||||
|
||||
if( !( this instanceof GuiMEPortableCell ) || this instanceof GuiWirelessTerm )
|
||||
{
|
||||
this.buttonList.add( this.terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance().getConfigManager().getSetting( Settings.TERMINAL_STYLE ) ) );
|
||||
this.buttonList.add( this.terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance()
|
||||
.getConfigManager()
|
||||
.getSetting( Settings.TERMINAL_STYLE ) ) );
|
||||
}
|
||||
|
||||
this.searchField = new MEGuiTextField( this.fontRenderer, this.guiLeft + Math.max( 80, this.offsetX ), this.guiTop + 4, 90, 12 );
|
||||
@@ -300,7 +308,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
if( this.viewCell || this instanceof GuiWirelessTerm )
|
||||
{
|
||||
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus.getLocal(), this.itemRender ) );
|
||||
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus
|
||||
.getLocal(), this.itemRender ) );
|
||||
this.craftingStatusBtn.setHideEdge( 13 );
|
||||
}
|
||||
|
||||
@@ -398,7 +407,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 );
|
||||
}
|
||||
|
||||
this.drawTexturedModalRect( offsetX, offsetY + 16 + this.rows * 18 + this.lowerTextureOffset, 0, 106 - 18 - 18, x_width, 99 + this.reservedSpace - this.lowerTextureOffset );
|
||||
this.drawTexturedModalRect( offsetX, offsetY + 16 + this.rows * 18 + this.lowerTextureOffset, 0, 106 - 18 - 18, x_width,
|
||||
99 + this.reservedSpace - this.lowerTextureOffset );
|
||||
|
||||
if( this.viewCell )
|
||||
{
|
||||
|
||||
@@ -140,7 +140,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
this.fontRenderer.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.getCurrentPower(), false ), 13, 16, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.getMaxPower(), false ), 13, 26, 4210752 );
|
||||
|
||||
this.fontRenderer.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.getAverageAddition(), true ), 13, 143 - 10, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.getAverageAddition(), true ), 13, 143 - 10,
|
||||
4210752 );
|
||||
this.fontRenderer.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.getPowerUsage(), true ), 13, 143 - 20, 4210752 );
|
||||
|
||||
final int sectionLength = 30;
|
||||
@@ -171,7 +172,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
final int w = this.fontRenderer.getStringWidth( str );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2, 4210752 );
|
||||
this.fontRenderer.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2,
|
||||
4210752 );
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
final int posX = x * sectionLength + xo + sectionLength - 18;
|
||||
|
||||
@@ -68,7 +68,8 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.tFacades = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 8, 23, 22, GuiText.TransparentFacades.getLocal(), GuiText.TransparentFacadesHint.getLocal() );
|
||||
this.tFacades = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 8, 23, 22, GuiText.TransparentFacades.getLocal(), GuiText.TransparentFacadesHint
|
||||
.getLocal() );
|
||||
|
||||
this.buttonList.add( this.tFacades );
|
||||
}
|
||||
|
||||
@@ -78,7 +78,8 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
|
||||
if( this.tabCraftButton == btn || this.tabProcessButton == btn )
|
||||
{
|
||||
NetworkHandler.instance().sendToServer( new PacketValueConfig( "PatternTerminal.CraftMode", this.tabProcessButton == btn ? CRAFTMODE_CRFTING : CRAFTMODE_PROCESSING ) );
|
||||
NetworkHandler.instance().sendToServer(
|
||||
new PacketValueConfig( "PatternTerminal.CraftMode", this.tabProcessButton == btn ? CRAFTMODE_CRFTING : CRAFTMODE_PROCESSING ) );
|
||||
}
|
||||
|
||||
if( this.encodeBtn == btn )
|
||||
@@ -93,7 +94,8 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
|
||||
if( this.substitutionsEnabledBtn == btn || this.substitutionsDisabledBtn == btn )
|
||||
{
|
||||
NetworkHandler.instance().sendToServer( new PacketValueConfig( "PatternTerminal.Substitute", this.substitutionsEnabledBtn == btn ? SUBSITUTION_DISABLE : SUBSITUTION_ENABLE ) );
|
||||
NetworkHandler.instance().sendToServer(
|
||||
new PacketValueConfig( "PatternTerminal.Substitute", this.substitutionsEnabledBtn == btn ? SUBSITUTION_DISABLE : SUBSITUTION_ENABLE ) );
|
||||
}
|
||||
}
|
||||
catch( final IOException e )
|
||||
@@ -107,10 +109,12 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.CRAFTING_TABLE ), GuiText.CraftingPattern.getLocal(), this.itemRender );
|
||||
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.CRAFTING_TABLE ), GuiText.CraftingPattern
|
||||
.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.tabCraftButton );
|
||||
|
||||
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.FURNACE ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
|
||||
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.FURNACE ), GuiText.ProcessingPattern
|
||||
.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.tabProcessButton );
|
||||
|
||||
this.substitutionsEnabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.ENABLED );
|
||||
|
||||
@@ -228,7 +228,8 @@ public class GuiPriority extends AEBaseGui
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if( ( key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ) ) && this.priority.textboxKeyTyped( character, key ) )
|
||||
if( ( key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ) ) && this.priority
|
||||
.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -101,15 +101,20 @@ public class GuiSecurityStation extends GuiMEMonitorable
|
||||
super.initGui();
|
||||
|
||||
final int top = this.guiTop + this.ySize - 116;
|
||||
this.buttonList.add( this.inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT.getUnlocalizedName(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
|
||||
this.buttonList.add( this.inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT
|
||||
.getUnlocalizedName(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
|
||||
|
||||
this.buttonList.add( this.extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT.getUnlocalizedName(), SecurityPermissions.EXTRACT.getUnlocalizedTip() ) );
|
||||
this.buttonList.add( this.extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT
|
||||
.getUnlocalizedName(), SecurityPermissions.EXTRACT.getUnlocalizedTip() ) );
|
||||
|
||||
this.buttonList.add( this.craft = new GuiToggleButton( this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2, SecurityPermissions.CRAFT.getUnlocalizedName(), SecurityPermissions.CRAFT.getUnlocalizedTip() ) );
|
||||
this.buttonList.add( this.craft = new GuiToggleButton( this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2, SecurityPermissions.CRAFT
|
||||
.getUnlocalizedName(), SecurityPermissions.CRAFT.getUnlocalizedTip() ) );
|
||||
|
||||
this.buttonList.add( this.build = new GuiToggleButton( this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3, SecurityPermissions.BUILD.getUnlocalizedName(), SecurityPermissions.BUILD.getUnlocalizedTip() ) );
|
||||
this.buttonList.add( this.build = new GuiToggleButton( this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3, SecurityPermissions.BUILD
|
||||
.getUnlocalizedName(), SecurityPermissions.BUILD.getUnlocalizedTip() ) );
|
||||
|
||||
this.buttonList.add( this.security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY.getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
|
||||
this.buttonList.add( this.security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY
|
||||
.getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,9 +75,11 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRenderer.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getCurrentPower(), false ), 13, 21, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getCurrentPower(), false ), 13, 21,
|
||||
4210752 );
|
||||
this.fontRenderer.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getMaxPower(), false ), 13, 31, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getRequiredPower(), false ), 13, 78, 4210752 );
|
||||
this.fontRenderer.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.getRequiredPower(), false ), 13, 78,
|
||||
4210752 );
|
||||
this.fontRenderer.drawString( GuiText.Efficiency.getLocal() + ": " + ( ( (float) this.container.getEfficency() ) / 100 ) + '%', 13, 88, 4210752 );
|
||||
|
||||
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
|
||||
|
||||
@@ -108,7 +108,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
this.registerApp( 16 * 2 + 3, Settings.SEARCH_MODE, SearchBoxMode.AUTOSEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_Auto );
|
||||
this.registerApp( 16 * 2 + 4, Settings.SEARCH_MODE, SearchBoxMode.MANUAL_SEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_Standard );
|
||||
this.registerApp( 16 * 2 + 5, Settings.SEARCH_MODE, SearchBoxMode.JEI_AUTOSEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_JEIAuto );
|
||||
this.registerApp( 16 * 2 + 6, Settings.SEARCH_MODE, SearchBoxMode.JEI_MANUAL_SEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_JEIStandard );
|
||||
this.registerApp( 16 * 2 + 6, Settings.SEARCH_MODE, SearchBoxMode.JEI_MANUAL_SEARCH, ButtonToolTips.SearchMode,
|
||||
ButtonToolTips.SearchMode_JEIStandard );
|
||||
|
||||
this.registerApp( 16 * 5 + 3, Settings.LEVEL_TYPE, LevelType.ENERGY_LEVEL, ButtonToolTips.LevelType, ButtonToolTips.LevelType_Energy );
|
||||
this.registerApp( 16 * 4 + 3, Settings.LEVEL_TYPE, LevelType.ITEM_LEVEL, ButtonToolTips.LevelType, ButtonToolTips.LevelType_Item );
|
||||
@@ -153,15 +154,19 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
this.registerApp( 16 * 11 + 2, Settings.CRAFT_VIA_REDSTONE, YesNo.YES, ButtonToolTips.EmitterMode, ButtonToolTips.CraftViaRedstone );
|
||||
this.registerApp( 16 * 11 + 1, Settings.CRAFT_VIA_REDSTONE, YesNo.NO, ButtonToolTips.EmitterMode, ButtonToolTips.EmitWhenCrafting );
|
||||
|
||||
this.registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsNo );
|
||||
this.registerApp( 16 * 3 + 6, Settings.STORAGE_FILTER, StorageFilter.NONE, ButtonToolTips.ReportInaccessibleItems, ButtonToolTips.ReportInaccessibleItemsYes );
|
||||
this.registerApp( 16 * 3 + 5, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY, ButtonToolTips.ReportInaccessibleItems,
|
||||
ButtonToolTips.ReportInaccessibleItemsNo );
|
||||
this.registerApp( 16 * 3 + 6, Settings.STORAGE_FILTER, StorageFilter.NONE, ButtonToolTips.ReportInaccessibleItems,
|
||||
ButtonToolTips.ReportInaccessibleItemsYes );
|
||||
|
||||
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
|
||||
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
|
||||
|
||||
this.registerApp( 16 * 15, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeDefault );
|
||||
this.registerApp( 16 * 15 + 1, Settings.SCHEDULING_MODE, SchedulingMode.ROUNDROBIN, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRoundRobin );
|
||||
this.registerApp( 16 * 15 + 2, Settings.SCHEDULING_MODE, SchedulingMode.RANDOM, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRandom );
|
||||
this.registerApp( 16 * 15 + 1, Settings.SCHEDULING_MODE, SchedulingMode.ROUNDROBIN, ButtonToolTips.SchedulingMode,
|
||||
ButtonToolTips.SchedulingModeRoundRobin );
|
||||
this.registerApp( 16 * 15 + 2, Settings.SCHEDULING_MODE, SchedulingMode.RANDOM, ButtonToolTips.SchedulingMode,
|
||||
ButtonToolTips.SchedulingModeRandom );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,8 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
return this.fullMsg;
|
||||
}
|
||||
|
||||
return ( this.titleName != null ? this.titleName : "" ) + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source.getMaxProgress();
|
||||
return ( this.titleName != null ? this.titleName : "" ) + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source
|
||||
.getMaxProgress();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -97,7 +97,8 @@ public class FacadeDispatcherBakedModel implements IBakedModel
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return new ItemOverrideList( Collections.emptyList() ){
|
||||
return new ItemOverrideList( Collections.emptyList() )
|
||||
{
|
||||
@Override
|
||||
public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity )
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ public class FacadeWithBlockBakedModel implements IBakedModel
|
||||
List<BakedQuad> quads = new ArrayList<>( 1 );
|
||||
CubeBuilder builder = new CubeBuilder( format, quads );
|
||||
FacadeBuilder.TextureAtlasAndTint sprite = FacadeBuilder.getSprite( textureModel, blockState, side, rand );
|
||||
if ( sprite != null && sprite.getSprite() != null )
|
||||
if( sprite != null && sprite.getSprite() != null )
|
||||
{
|
||||
if( sprite.getTint() != -1 )
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.client.render;
|
||||
|
||||
|
||||
@@ -25,6 +26,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
|
||||
|
||||
/**
|
||||
* TODO: Removed useless stuff.
|
||||
*/
|
||||
@@ -32,44 +34,44 @@ public enum FacingToRotation
|
||||
{
|
||||
|
||||
// DUNSWE
|
||||
//@formatter:off
|
||||
DOWN_DOWN ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
DOWN_UP ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
DOWN_NORTH ( new Vector3f( -90, 0, 0 ) ),
|
||||
DOWN_SOUTH ( new Vector3f( -90, 0, 180 ) ),
|
||||
DOWN_WEST ( new Vector3f( -90, 0, 90 ) ),
|
||||
DOWN_EAST ( new Vector3f( -90, 0, -90 ) ),
|
||||
UP_DOWN ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
UP_UP ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
UP_NORTH ( new Vector3f( 90, 0, 180 ) ),
|
||||
UP_SOUTH ( new Vector3f( 90, 0, 0 ) ),
|
||||
UP_WEST ( new Vector3f( 90, 0, 90 ) ),
|
||||
UP_EAST ( new Vector3f( 90, 0, -90 ) ),
|
||||
NORTH_DOWN ( new Vector3f( 0, 0, 180 ) ),
|
||||
NORTH_UP ( new Vector3f( 0, 0, 0 ) ),
|
||||
NORTH_NORTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
NORTH_SOUTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
NORTH_WEST ( new Vector3f( 0, 0, 90 ) ),
|
||||
NORTH_EAST ( new Vector3f( 0, 0, -90 ) ),
|
||||
SOUTH_DOWN ( new Vector3f( 0, 180, 180 ) ),
|
||||
SOUTH_UP ( new Vector3f( 0, 180, 0 ) ),
|
||||
SOUTH_NORTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
SOUTH_SOUTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
SOUTH_WEST ( new Vector3f( 0, 180, -90 ) ),
|
||||
SOUTH_EAST ( new Vector3f( 0, 180, 90 ) ),
|
||||
WEST_DOWN ( new Vector3f( 0, 90, 180 ) ),
|
||||
WEST_UP ( new Vector3f( 0, 90, 0 ) ),
|
||||
WEST_NORTH ( new Vector3f( 0, 90, -90 ) ),
|
||||
WEST_SOUTH ( new Vector3f( 0, 90, 90 ) ),
|
||||
WEST_WEST ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
WEST_EAST ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
EAST_DOWN ( new Vector3f( 0, -90, 180 ) ),
|
||||
EAST_UP ( new Vector3f( 0, -90, 0 ) ),
|
||||
EAST_NORTH ( new Vector3f( 0, -90, 90 ) ),
|
||||
EAST_SOUTH ( new Vector3f( 0, -90, -90 ) ),
|
||||
EAST_WEST ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
EAST_EAST ( new Vector3f( 0, 0, 0 ) ); //NOOP
|
||||
//@formatter:on
|
||||
// @formatter:off
|
||||
DOWN_DOWN( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
DOWN_UP( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
DOWN_NORTH( new Vector3f( -90, 0, 0 ) ),
|
||||
DOWN_SOUTH( new Vector3f( -90, 0, 180 ) ),
|
||||
DOWN_WEST( new Vector3f( -90, 0, 90 ) ),
|
||||
DOWN_EAST( new Vector3f( -90, 0, -90 ) ),
|
||||
UP_DOWN( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
UP_UP( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
UP_NORTH( new Vector3f( 90, 0, 180 ) ),
|
||||
UP_SOUTH( new Vector3f( 90, 0, 0 ) ),
|
||||
UP_WEST( new Vector3f( 90, 0, 90 ) ),
|
||||
UP_EAST( new Vector3f( 90, 0, -90 ) ),
|
||||
NORTH_DOWN( new Vector3f( 0, 0, 180 ) ),
|
||||
NORTH_UP( new Vector3f( 0, 0, 0 ) ),
|
||||
NORTH_NORTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
NORTH_SOUTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
NORTH_WEST( new Vector3f( 0, 0, 90 ) ),
|
||||
NORTH_EAST( new Vector3f( 0, 0, -90 ) ),
|
||||
SOUTH_DOWN( new Vector3f( 0, 180, 180 ) ),
|
||||
SOUTH_UP( new Vector3f( 0, 180, 0 ) ),
|
||||
SOUTH_NORTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
SOUTH_SOUTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
SOUTH_WEST( new Vector3f( 0, 180, -90 ) ),
|
||||
SOUTH_EAST( new Vector3f( 0, 180, 90 ) ),
|
||||
WEST_DOWN( new Vector3f( 0, 90, 180 ) ),
|
||||
WEST_UP( new Vector3f( 0, 90, 0 ) ),
|
||||
WEST_NORTH( new Vector3f( 0, 90, -90 ) ),
|
||||
WEST_SOUTH( new Vector3f( 0, 90, 90 ) ),
|
||||
WEST_WEST( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
WEST_EAST( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
EAST_DOWN( new Vector3f( 0, -90, 180 ) ),
|
||||
EAST_UP( new Vector3f( 0, -90, 0 ) ),
|
||||
EAST_NORTH( new Vector3f( 0, -90, 90 ) ),
|
||||
EAST_SOUTH( new Vector3f( 0, -90, -90 ) ),
|
||||
EAST_WEST( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
EAST_EAST( new Vector3f( 0, 0, 0 ) ); // NOOP
|
||||
// @formatter:on
|
||||
|
||||
private final Vector3f rot;
|
||||
private final Matrix4f mat;
|
||||
@@ -77,7 +79,10 @@ public enum FacingToRotation
|
||||
private FacingToRotation( Vector3f rot )
|
||||
{
|
||||
this.rot = rot;
|
||||
this.mat = TRSRTransformation.toVecmath( new org.lwjgl.util.vector.Matrix4f().rotate( (float) Math.toRadians( rot.x ), new org.lwjgl.util.vector.Vector3f( 1, 0, 0 ) ).rotate( (float) Math.toRadians( rot.y ), new org.lwjgl.util.vector.Vector3f( 0, 1, 0 ) ).rotate( (float) Math.toRadians( rot.z ), new org.lwjgl.util.vector.Vector3f( 0, 0, 1 ) ) );
|
||||
this.mat = TRSRTransformation
|
||||
.toVecmath( new org.lwjgl.util.vector.Matrix4f().rotate( (float) Math.toRadians( rot.x ), new org.lwjgl.util.vector.Vector3f( 1, 0, 0 ) )
|
||||
.rotate( (float) Math.toRadians( rot.y ), new org.lwjgl.util.vector.Vector3f( 0, 1, 0 ) )
|
||||
.rotate( (float) Math.toRadians( rot.z ), new org.lwjgl.util.vector.Vector3f( 0, 0, 1 ) ) );
|
||||
}
|
||||
|
||||
public Vector3f getRot()
|
||||
|
||||
@@ -130,7 +130,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.depthMask( false );
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0 );
|
||||
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ public class StackSizeRenderer
|
||||
|
||||
if( aeStack.getShowCraftingLabel() )
|
||||
{
|
||||
final String craftLabelText = AEConfig.instance().useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft.getLocal();
|
||||
final String craftLabelText = AEConfig.instance().useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft
|
||||
.getLocal();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
@@ -34,7 +34,8 @@ public final class VertexFormats
|
||||
// Standard item format extended with lightmap coordinates
|
||||
private static final VertexFormat itemFormatWithLightMap = new VertexFormat( DefaultVertexFormats.ITEM ).addElement( DefaultVertexFormats.TEX_2S );
|
||||
|
||||
private VertexFormats() {
|
||||
private VertexFormats()
|
||||
{
|
||||
}
|
||||
|
||||
public static VertexFormat getFormatWithLightMap( VertexFormat format )
|
||||
|
||||
@@ -77,7 +77,8 @@ public class CableBusModel implements IModel
|
||||
CableBuilder cableBuilder = new CableBuilder( format, bakedTextureGetter );
|
||||
FacadeBuilder facadeBuilder = new FacadeBuilder( format, bakedTextureGetter );
|
||||
|
||||
// This should normally not be used, but we *have* to provide a particle texture or otherwise damage models will crash
|
||||
// This should normally not be used, but we *have* to provide a particle texture or otherwise damage models will
|
||||
// crash
|
||||
TextureAtlasSprite particleTexture = cableBuilder.getCoreTexture( CableCoreType.GLASS, AEColor.TRANSPARENT );
|
||||
|
||||
return new CableBusBakedModel( cableBuilder, facadeBuilder, partModels, particleTexture );
|
||||
|
||||
@@ -99,7 +99,7 @@ public class FacadeBuilder
|
||||
} );
|
||||
}
|
||||
|
||||
public static TextureAtlasAndTint getSprite( IBakedModel blockModel, IBlockState state, EnumFacing facing, long rand)
|
||||
public static TextureAtlasAndTint getSprite( IBakedModel blockModel, IBlockState state, EnumFacing facing, long rand )
|
||||
{
|
||||
|
||||
TextureAtlasAndTint firstFound = null;
|
||||
@@ -107,7 +107,8 @@ public class FacadeBuilder
|
||||
|
||||
try
|
||||
{
|
||||
// Some other mods also distinguish between layers, so we're doing this in a loop from most likely to least likely
|
||||
// Some other mods also distinguish between layers, so we're doing this in a loop from most likely to least
|
||||
// likely
|
||||
for( BlockRenderLayer layer : BlockRenderLayer.values() )
|
||||
{
|
||||
|
||||
@@ -258,16 +259,8 @@ public class FacadeBuilder
|
||||
|
||||
AxisAlignedBB primaryBox = getFacadeBox( side, thinFacades );
|
||||
|
||||
Vector3f min = new Vector3f(
|
||||
(float) primaryBox.minX * 16,
|
||||
(float) primaryBox.minY * 16,
|
||||
(float) primaryBox.minZ * 16
|
||||
);
|
||||
Vector3f max = new Vector3f(
|
||||
(float) primaryBox.maxX * 16,
|
||||
(float) primaryBox.maxY * 16,
|
||||
(float) primaryBox.maxZ * 16
|
||||
);
|
||||
Vector3f min = new Vector3f( (float) primaryBox.minX * 16, (float) primaryBox.minY * 16, (float) primaryBox.minZ * 16 );
|
||||
Vector3f max = new Vector3f( (float) primaryBox.maxX * 16, (float) primaryBox.maxY * 16, (float) primaryBox.maxZ * 16 );
|
||||
|
||||
if( busBounds == null )
|
||||
{
|
||||
@@ -311,8 +304,8 @@ public class FacadeBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3f busMin = new Vector3f( (float) busBounds.minX * 16, (float) busBounds.minY * 16, (float) busBounds.minZ * 16 );
|
||||
Vector3f busMax = new Vector3f( (float) busBounds.maxX * 16, (float) busBounds.maxY * 16, (float) busBounds.maxZ * 16 );
|
||||
Vector3f busMin = new Vector3f( (float) busBounds.minX * 16, (float) busBounds.minY * 16, (float) busBounds.minZ * 16 );
|
||||
Vector3f busMax = new Vector3f( (float) busBounds.maxX * 16, (float) busBounds.maxY * 16, (float) busBounds.maxZ * 16 );
|
||||
|
||||
if( side == EnumFacing.UP || side == EnumFacing.DOWN )
|
||||
{
|
||||
@@ -368,8 +361,7 @@ public class FacadeBuilder
|
||||
}
|
||||
}
|
||||
|
||||
private void renderSegmentBlockCurrentBounds( CubeBuilder builder, Vector3f min, Vector3f max,
|
||||
float minX, float minY, float minZ, float maxX, float maxY, float maxZ )
|
||||
private void renderSegmentBlockCurrentBounds( CubeBuilder builder, Vector3f min, Vector3f max, float minX, float minY, float minZ, float maxX, float maxY, float maxZ )
|
||||
{
|
||||
minX = Math.max( min.x, minX );
|
||||
minY = Math.max( min.y, minY );
|
||||
@@ -379,7 +371,7 @@ public class FacadeBuilder
|
||||
maxZ = Math.min( max.z, maxZ );
|
||||
|
||||
// don't draw it if its not at least a pixel wide...
|
||||
if( maxX - minX >= 1.0 && maxY - minY >= 1.0 && maxZ - minZ >= 1.0 )
|
||||
if( maxX - minX >= 1.0 && maxY - minY >= 1.0 && maxZ - minZ >= 1.0 )
|
||||
{
|
||||
builder.addCube( minX, minY, minZ, maxX, maxY, maxZ );
|
||||
}
|
||||
@@ -387,7 +379,8 @@ public class FacadeBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the actual facade bounding box, and the bounding boxes of all parts, determine the biggest union of AABB that intersect with the
|
||||
* Given the actual facade bounding box, and the bounding boxes of all parts, determine the biggest union of AABB
|
||||
* that intersect with the
|
||||
* facade's bounding box. This AABB will need to be "cut out" when the facade is rendered.
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.cablebus;
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,8 @@ public class QuadRotator
|
||||
|
||||
for( int i = 0; i < 4; i++ )
|
||||
{
|
||||
Point3f pos = new Point3f( Float.intBitsToFloat( newData[i * stride + posIdx] ) - 0.5f, Float.intBitsToFloat( newData[i * stride + posIdx + 1] ) - 0.5f, Float.intBitsToFloat( newData[i * stride + posIdx + 2] ) - 0.5f );
|
||||
Point3f pos = new Point3f( Float.intBitsToFloat( newData[i * stride + posIdx] ) - 0.5f, Float
|
||||
.intBitsToFloat( newData[i * stride + posIdx + 1] ) - 0.5f, Float.intBitsToFloat( newData[i * stride + posIdx + 2] ) - 0.5f );
|
||||
|
||||
// Rotate stuff around
|
||||
mat.transform( pos );
|
||||
@@ -116,7 +117,8 @@ public class QuadRotator
|
||||
{
|
||||
if( normalType == VertexFormatElement.EnumType.FLOAT )
|
||||
{
|
||||
Vector3f normal = new Vector3f( Float.intBitsToFloat( newData[i * stride + normalIdx] ), Float.intBitsToFloat( newData[i * stride + normalIdx + 1] ), Float.intBitsToFloat( newData[i * stride + normalIdx + 2] ) );
|
||||
Vector3f normal = new Vector3f( Float.intBitsToFloat( newData[i * stride + normalIdx] ), Float
|
||||
.intBitsToFloat( newData[i * stride + normalIdx + 1] ), Float.intBitsToFloat( newData[i * stride + normalIdx + 2] ) );
|
||||
|
||||
// Rotate stuff around
|
||||
mat.transform( normal );
|
||||
@@ -129,7 +131,8 @@ public class QuadRotator
|
||||
else if( normalType == VertexFormatElement.EnumType.BYTE )
|
||||
{
|
||||
int idx = i * stride * 4 + normalIdx;
|
||||
Vector3f normal = new Vector3f( getByte( newData, idx ) / 127.0f, getByte( newData, idx + 1 ) / 127.0f, getByte( newData, idx + 2 ) / 127.0f );
|
||||
Vector3f normal = new Vector3f( getByte( newData, idx ) / 127.0f, getByte( newData, idx + 1 ) / 127.0f, getByte( newData,
|
||||
idx + 2 ) / 127.0f );
|
||||
|
||||
// Rotate stuff around
|
||||
mat.transform( normal );
|
||||
|
||||
@@ -34,7 +34,12 @@ import appeng.core.AppEng;
|
||||
public class SmartCableTextures
|
||||
{
|
||||
|
||||
public static final ResourceLocation[] SMART_CHANNELS_TEXTURES = { new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_00" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_01" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_02" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_03" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_04" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_10" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_11" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_12" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_13" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_14" )
|
||||
public static final ResourceLocation[] SMART_CHANNELS_TEXTURES = { new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_00" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_01" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_02" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_03" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_04" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_10" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_11" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_12" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_13" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_14" )
|
||||
};
|
||||
|
||||
// Textures used to display channels on smart cables. There's two sets of 5 textures each, and
|
||||
|
||||
@@ -74,7 +74,8 @@ class CraftingCubeModel implements IModel
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures()
|
||||
{
|
||||
return ImmutableList.of( RING_CORNER, RING_SIDE_HOR, RING_SIDE_VER, UNIT_BASE, LIGHT_BASE, ACCELERATOR_LIGHT, STORAGE_1K_LIGHT, STORAGE_4K_LIGHT, STORAGE_16K_LIGHT, STORAGE_64K_LIGHT, MONITOR_BASE, MONITOR_LIGHT_DARK, MONITOR_LIGHT_MEDIUM, MONITOR_LIGHT_BRIGHT );
|
||||
return ImmutableList.of( RING_CORNER, RING_SIDE_HOR, RING_SIDE_VER, UNIT_BASE, LIGHT_BASE, ACCELERATOR_LIGHT, STORAGE_1K_LIGHT, STORAGE_4K_LIGHT,
|
||||
STORAGE_16K_LIGHT, STORAGE_64K_LIGHT, MONITOR_BASE, MONITOR_LIGHT_DARK, MONITOR_LIGHT_MEDIUM, MONITOR_LIGHT_BRIGHT );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,9 +95,12 @@ class CraftingCubeModel implements IModel
|
||||
case STORAGE_4K:
|
||||
case STORAGE_16K:
|
||||
case STORAGE_64K:
|
||||
return new LightBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( LIGHT_BASE ), getLightTexture( bakedTextureGetter, type ) );
|
||||
return new LightBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter
|
||||
.apply( LIGHT_BASE ), getLightTexture( bakedTextureGetter, type ) );
|
||||
case MONITOR:
|
||||
return new MonitorBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( UNIT_BASE ), bakedTextureGetter.apply( MONITOR_BASE ), bakedTextureGetter.apply( MONITOR_LIGHT_DARK ), bakedTextureGetter.apply( MONITOR_LIGHT_MEDIUM ), bakedTextureGetter.apply( MONITOR_LIGHT_BRIGHT ) );
|
||||
return new MonitorBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( UNIT_BASE ), bakedTextureGetter
|
||||
.apply( MONITOR_BASE ), bakedTextureGetter.apply(
|
||||
MONITOR_LIGHT_DARK ), bakedTextureGetter.apply( MONITOR_LIGHT_MEDIUM ), bakedTextureGetter.apply( MONITOR_LIGHT_BRIGHT ) );
|
||||
default:
|
||||
throw new IllegalArgumentException( "Unsupported crafting unit type: " + type );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
@@ -31,8 +32,10 @@ import appeng.items.misc.ItemEncodedPattern;
|
||||
|
||||
|
||||
/**
|
||||
* This special model handles switching between rendering the crafting output of an encoded pattern (when shift is being held), and
|
||||
* showing the encoded pattern itself. Matters are further complicated by only wanting to show the crafting output when the pattern is being
|
||||
* This special model handles switching between rendering the crafting output of an encoded pattern (when shift is being
|
||||
* held), and
|
||||
* showing the encoded pattern itself. Matters are further complicated by only wanting to show the crafting output when
|
||||
* the pattern is being
|
||||
* rendered in the GUI, and not anywhere else.
|
||||
*/
|
||||
class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
@@ -105,10 +108,14 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Since the ItemOverrideList handling comes before handling the perspective awareness (which is the first place where we
|
||||
* know how we are being rendered) we need to remember the model of the crafting output, and make the decision on which to render later on.
|
||||
* Sadly, Forge is pretty inconsistent when it will call the handlePerspective method, so some methods are called even on this interim-model.
|
||||
* Usually those methods only matter for rendering on the ground and other cases, where we wouldn't render the crafting output model anyway,
|
||||
* Since the ItemOverrideList handling comes before handling the perspective awareness (which is the first place
|
||||
* where we
|
||||
* know how we are being rendered) we need to remember the model of the crafting output, and make the decision on
|
||||
* which to render later on.
|
||||
* Sadly, Forge is pretty inconsistent when it will call the handlePerspective method, so some methods are called
|
||||
* even on this interim-model.
|
||||
* Usually those methods only matter for rendering on the ground and other cases, where we wouldn't render the
|
||||
* crafting output model anyway,
|
||||
* so in those cases we delegate to the model of the encoded pattern.
|
||||
*/
|
||||
private class ShiftHoldingModelWrapper implements IBakedModel
|
||||
@@ -199,10 +206,11 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Item Override Lists are the only point during item rendering where we can access the item stack that is being rendered.
|
||||
* So this is the point where we actually check if shift is being held, and if so, determine the crafting output model.
|
||||
* Item Override Lists are the only point during item rendering where we can access the item stack that is being
|
||||
* rendered.
|
||||
* So this is the point where we actually check if shift is being held, and if so, determine the crafting output
|
||||
* model.
|
||||
*/
|
||||
private class CustomOverrideList extends ItemOverrideList
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
@@ -54,7 +55,7 @@ class ItemEncodedPatternModel implements IModel
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
|
||||
ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms = PerspectiveMapWrapper.getTransforms(state);
|
||||
ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transforms = PerspectiveMapWrapper.getTransforms( state );
|
||||
|
||||
return new ItemEncodedPatternBakedModel( baseModel, transforms );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
|
||||
@@ -67,19 +67,19 @@ public class AssemblerFX extends Particle implements ICanDie
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setExpired();
|
||||
}
|
||||
if( this.particleAge++ >= this.particleMaxAge )
|
||||
{
|
||||
this.setExpired();
|
||||
}
|
||||
|
||||
this.motionY -= 0.04D * (double)this.particleGravity;
|
||||
this.move(this.motionX, this.motionY, this.motionZ);
|
||||
this.motionX *= 0.9800000190734863D;
|
||||
this.motionY *= 0.9800000190734863D;
|
||||
this.motionZ *= 0.9800000190734863D;
|
||||
this.motionY -= 0.04D * (double) this.particleGravity;
|
||||
this.move( this.motionX, this.motionY, this.motionZ );
|
||||
this.motionX *= 0.9800000190734863D;
|
||||
this.motionY *= 0.9800000190734863D;
|
||||
this.motionZ *= 0.9800000190734863D;
|
||||
|
||||
if( this.isExpired )
|
||||
{
|
||||
|
||||
@@ -93,16 +93,32 @@ public class CraftingFx extends ParticleBreaking
|
||||
offY -= interpPosY;
|
||||
offZ -= interpPosZ;
|
||||
|
||||
int i = this.getBrightnessForRender(partialTick);
|
||||
int i = this.getBrightnessForRender( partialTick );
|
||||
int j = i >> 16 & 65535;
|
||||
int k = i & 65535;
|
||||
|
||||
// AELog.info( "" + partialTick );
|
||||
final float f14 = 1.0F;
|
||||
par1Tessellator.pos( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale ).tex( f7, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale ).tex( f7, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale ).tex( f6, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale ).tex( f6, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale )
|
||||
.tex( f7, f9 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale )
|
||||
.tex( f7, f8 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale )
|
||||
.tex( f6, f8 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale )
|
||||
.tex( f6, f9 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,15 +84,31 @@ public class EnergyFx extends ParticleBreaking
|
||||
|
||||
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
int i = this.getBrightnessForRender(partialTicks);
|
||||
int i = this.getBrightnessForRender( partialTicks );
|
||||
int j = i >> 16 & 65535;
|
||||
int k = i & 65535;
|
||||
|
||||
final float f14 = 1.0F;
|
||||
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 ).tex( f7, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 ).tex( f7, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 ).tex( f6, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 ).tex( f6, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 )
|
||||
.tex( f7, f9 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 )
|
||||
.tex( f7, f8 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 )
|
||||
.tex( f6, f8 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 )
|
||||
.tex( f6, f9 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,19 +80,19 @@ public class LightningFX extends Particle
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setExpired();
|
||||
}
|
||||
if( this.particleAge++ >= this.particleMaxAge )
|
||||
{
|
||||
this.setExpired();
|
||||
}
|
||||
|
||||
this.motionY -= 0.04D * (double)this.particleGravity;
|
||||
this.move(this.motionX, this.motionY, this.motionZ);
|
||||
this.motionX *= 0.9800000190734863D;
|
||||
this.motionY *= 0.9800000190734863D;
|
||||
this.motionZ *= 0.9800000190734863D;
|
||||
this.motionY -= 0.04D * (double) this.particleGravity;
|
||||
this.move( this.motionX, this.motionY, this.motionZ );
|
||||
this.motionX *= 0.9800000190734863D;
|
||||
this.motionY *= 0.9800000190734863D;
|
||||
this.motionZ *= 0.9800000190734863D;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -190,7 +190,8 @@ public class LightningFX extends Particle
|
||||
oz = ( xD * 0 ) - ( 1 * yD );
|
||||
}
|
||||
|
||||
final double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) LightningFX.STEPS - (double) s ) / LightningFX.STEPS ) * scale );
|
||||
final double ss = Math
|
||||
.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) LightningFX.STEPS - (double) s ) / LightningFX.STEPS ) * scale );
|
||||
ox /= ss;
|
||||
oy /= ss;
|
||||
oz /= ss;
|
||||
@@ -227,8 +228,16 @@ public class LightningFX extends Particle
|
||||
if( this.hasData )
|
||||
{
|
||||
tess.pos( a[0], a[1], a[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
|
||||
tess.pos( this.vertices[0], this.vertices[1], this.vertices[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
|
||||
tess.pos( this.verticesWithUV[0], this.verticesWithUV[1], this.verticesWithUV[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
|
||||
tess.pos( this.vertices[0], this.vertices[1], this.vertices[2] )
|
||||
.tex( f6, f8 )
|
||||
.color( red, green, blue, this.particleAlpha )
|
||||
.lightmap( BRIGHTNESS, BRIGHTNESS )
|
||||
.endVertex();
|
||||
tess.pos( this.verticesWithUV[0], this.verticesWithUV[1], this.verticesWithUV[2] )
|
||||
.tex( f6, f8 )
|
||||
.color( red, green, blue, this.particleAlpha )
|
||||
.lightmap( BRIGHTNESS, BRIGHTNESS )
|
||||
.endVertex();
|
||||
tess.pos( b[0], b[1], b[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
|
||||
}
|
||||
this.hasData = true;
|
||||
|
||||
@@ -97,13 +97,29 @@ public class MatterCannonFX extends ParticleBreaking
|
||||
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
final float f14 = 1.0F;
|
||||
|
||||
int i = this.getBrightnessForRender(par2);
|
||||
int i = this.getBrightnessForRender( par2 );
|
||||
int j = i >> 16 & 65535;
|
||||
int k = i & 65535;
|
||||
|
||||
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 ).tex( f7, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 ).tex( f7, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 ).tex( f6, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 ).tex( f6, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
|
||||
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 )
|
||||
.tex( f7, f9 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 )
|
||||
.tex( f7, f8 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 )
|
||||
.tex( f6, f8 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 )
|
||||
.tex( f6, f9 )
|
||||
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
|
||||
.lightmap( j, k )
|
||||
.endVertex();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ public class AutoRotatingModel implements IBakedModel
|
||||
{
|
||||
this.parent = parent;
|
||||
// 6 (DUNSWE) * 6 (DUNSWE) * 7 (DUNSWE + null) = 252
|
||||
this.quadCache = CacheBuilder.newBuilder().maximumSize( 252 ).build( new CacheLoader<AutoRotatingCacheKey, List<BakedQuad>>(){
|
||||
this.quadCache = CacheBuilder.newBuilder().maximumSize( 252 ).build( new CacheLoader<AutoRotatingCacheKey, List<BakedQuad>>()
|
||||
{
|
||||
@Override
|
||||
public List<BakedQuad> load( AutoRotatingCacheKey key ) throws Exception
|
||||
{
|
||||
@@ -98,13 +99,8 @@ public class AutoRotatingModel implements IBakedModel
|
||||
// Packing it back to the vanilla vertex format will fix this inconsistency because it converts
|
||||
// the normal back to a byte-based format, which then re-applies Forge's own bug when piping it
|
||||
// to the AO lighter, thus fixing our problem.
|
||||
BakedQuad packedQuad = new BakedQuad( unpackedQuad.getVertexData(),
|
||||
quad.getTintIndex(),
|
||||
unpackedQuad.getFace(),
|
||||
quad.getSprite(),
|
||||
quad.shouldApplyDiffuseLighting(),
|
||||
quad.getFormat()
|
||||
);
|
||||
BakedQuad packedQuad = new BakedQuad( unpackedQuad.getVertexData(), quad.getTintIndex(), unpackedQuad.getFace(), quad.getSprite(), quad
|
||||
.shouldApplyDiffuseLighting(), quad.getFormat() );
|
||||
rotated.add( packedQuad );
|
||||
}
|
||||
return rotated;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.model;
|
||||
|
||||
|
||||
@@ -66,7 +67,8 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
this.modelCache = modelCache;
|
||||
}
|
||||
|
||||
private static Cache<Integer, BiometricCardBakedModel> createCache() {
|
||||
private static Cache<Integer, BiometricCardBakedModel> createCache()
|
||||
{
|
||||
return CacheBuilder.newBuilder()
|
||||
.maximumSize( 100 )
|
||||
.build();
|
||||
@@ -124,7 +126,8 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
else
|
||||
{
|
||||
final float scale = 0.3f / 255.0f;
|
||||
builder.setColorRGB( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) & 0xff ) * scale, ( col.blackVariant & 0xff ) * scale );
|
||||
builder.setColorRGB( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) & 0xff ) * scale,
|
||||
( col.blackVariant & 0xff ) * scale );
|
||||
}
|
||||
|
||||
builder.addCube( 4 + x, 6 + y, 7.5f, 4 + x + 1, 6 + y + 1, 8.5f );
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.model;
|
||||
|
||||
|
||||
@@ -18,7 +19,8 @@ import appeng.core.AppEng;
|
||||
|
||||
|
||||
/**
|
||||
* Model wrapper for the biometric card item model, which combines a base card layer with a "visual hash" of the player name
|
||||
* Model wrapper for the biometric card item model, which combines a base card layer with a "visual hash" of the player
|
||||
* name
|
||||
*/
|
||||
public class BiometricCardModel implements IModel
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.model;
|
||||
|
||||
|
||||
@@ -34,8 +35,7 @@ class ColorApplicatorBakedModel implements IBakedModel
|
||||
|
||||
private final List<BakedQuad> generalQuads;
|
||||
|
||||
ColorApplicatorBakedModel( IBakedModel baseModel, ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> map,
|
||||
TextureAtlasSprite texDark, TextureAtlasSprite texMedium, TextureAtlasSprite texBright )
|
||||
ColorApplicatorBakedModel( IBakedModel baseModel, ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> map, TextureAtlasSprite texDark, TextureAtlasSprite texMedium, TextureAtlasSprite texBright )
|
||||
{
|
||||
this.baseModel = baseModel;
|
||||
this.transforms = map;
|
||||
@@ -75,14 +75,8 @@ class ColorApplicatorBakedModel implements IBakedModel
|
||||
continue;
|
||||
}
|
||||
|
||||
BakedQuad newQuad = new BakedQuad(
|
||||
quad.getVertexData(),
|
||||
tint,
|
||||
quad.getFace(),
|
||||
quad.getSprite(),
|
||||
quad.shouldApplyDiffuseLighting(),
|
||||
quad.getFormat()
|
||||
);
|
||||
BakedQuad newQuad = new BakedQuad( quad.getVertexData(), tint, quad.getFace(), quad.getSprite(), quad.shouldApplyDiffuseLighting(), quad
|
||||
.getFormat() );
|
||||
result.add( newQuad );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.model;
|
||||
|
||||
|
||||
@@ -23,7 +24,8 @@ import appeng.core.AppEng;
|
||||
|
||||
|
||||
/**
|
||||
* A color applicator uses the base model, and extends it with additional layers that are colored according to the selected color of the applicator.
|
||||
* A color applicator uses the base model, and extends it with additional layers that are colored according to the
|
||||
* selected color of the applicator.
|
||||
*/
|
||||
public class ColorApplicatorModel implements IModel
|
||||
{
|
||||
@@ -46,8 +48,7 @@ public class ColorApplicatorModel implements IModel
|
||||
return ImmutableList.of(
|
||||
TEXTURE_DARK,
|
||||
TEXTURE_MEDIUM,
|
||||
TEXTURE_BRIGHT
|
||||
);
|
||||
TEXTURE_BRIGHT );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.client.render.model;
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.client.render.model;
|
||||
|
||||
|
||||
@@ -49,8 +50,7 @@ public class DriveModel implements IModel
|
||||
DriveSlotState.OFFLINE, new ResourceLocation( "appliedenergistics2:block/drive_cell_off" ),
|
||||
DriveSlotState.ONLINE, new ResourceLocation( "appliedenergistics2:block/drive_cell_on" ),
|
||||
DriveSlotState.TYPES_FULL, new ResourceLocation( "appliedenergistics2:block/drive_cell_types_full" ),
|
||||
DriveSlotState.FULL, new ResourceLocation( "appliedenergistics2:block/drive_cell_full" )
|
||||
);
|
||||
DriveSlotState.FULL, new ResourceLocation( "appliedenergistics2:block/drive_cell_full" ) );
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getDependencies()
|
||||
|
||||
@@ -134,14 +134,14 @@ class GlassBakedModel implements IBakedModel
|
||||
quads.add( createQuad( side, corners, glassTexture, u, v ) );
|
||||
|
||||
/*
|
||||
This needs some explanation:
|
||||
The bit-field contains 4-bits, one for each direction that a frame may be drawn.
|
||||
Converted to a number, the bit-field is then used as an index into the list of
|
||||
frame textures, which have been created in such a way that their filenames
|
||||
indicate, in which directions they contain borders.
|
||||
i.e. bitmask = 0101 means a border should be drawn up and down (in terms of u,v space).
|
||||
Converted to a number, this bitmask is 5. So the texture at index 5 is used.
|
||||
That texture had "0101" in its filename to indicate this.
|
||||
* This needs some explanation:
|
||||
* The bit-field contains 4-bits, one for each direction that a frame may be drawn.
|
||||
* Converted to a number, the bit-field is then used as an index into the list of
|
||||
* frame textures, which have been created in such a way that their filenames
|
||||
* indicate, in which directions they contain borders.
|
||||
* i.e. bitmask = 0101 means a border should be drawn up and down (in terms of u,v space).
|
||||
* Converted to a number, this bitmask is 5. So the texture at index 5 is used.
|
||||
* That texture had "0101" in its filename to indicate this.
|
||||
*/
|
||||
int edgeBitmask = makeBitmask( glassState, side );
|
||||
TextureAtlasSprite sideSprite = frameTextures[edgeBitmask];
|
||||
@@ -227,8 +227,9 @@ class GlassBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
/*
|
||||
This method is as complicated as it is, because the order in which we push data into the vertexbuffer actually has to be precisely the order
|
||||
in which the vertex elements had been declared in the vertex format.
|
||||
* This method is as complicated as it is, because the order in which we push data into the vertexbuffer actually
|
||||
* has to be precisely the order
|
||||
* in which the vertex elements had been declared in the vertex format.
|
||||
*/
|
||||
private void putVertex( UnpackedBakedQuad.Builder builder, Vec3d normal, double x, double y, double z, TextureAtlasSprite sprite, float u, float v )
|
||||
{
|
||||
|
||||
@@ -114,7 +114,8 @@ final class MatrixVertexTransformer extends QuadGatheringTransformer
|
||||
case 4:
|
||||
Vector4f vecc = new Vector4f( fs[0], fs[1], fs[2], fs[3] );
|
||||
// Otherwise all translation is lost
|
||||
if (elemCount == 3) {
|
||||
if( elemCount == 3 )
|
||||
{
|
||||
vecc.w = 1;
|
||||
}
|
||||
vecc.x -= 0.5f;
|
||||
|
||||
@@ -107,7 +107,8 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
transformer.setParent( builder );
|
||||
transformer.setVertexFormat( builder.getVertexFormat() );
|
||||
bakedQuad.pipe( transformer );
|
||||
builder.setQuadOrientation( null ); // After rotation, facing a specific side cannot be guaranteed anymore
|
||||
builder.setQuadOrientation( null ); // After rotation, facing a specific side cannot be guaranteed
|
||||
// anymore
|
||||
BakedQuad q = builder.build();
|
||||
quads.add( q );
|
||||
}
|
||||
@@ -150,8 +151,9 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
/*
|
||||
This handles setting the rotation of the compass when being held in hand. If it's not held in hand, it'll animate using the
|
||||
spinning animation.
|
||||
* This handles setting the rotation of the compass when being held in hand. If it's not held in hand, it'll
|
||||
* animate using the
|
||||
* spinning animation.
|
||||
*/
|
||||
return new ItemOverrideList( Collections.emptyList() )
|
||||
{
|
||||
@@ -188,7 +190,8 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
{
|
||||
CompassResult cr = CompassManager.INSTANCE.getCompassDirection( 0, pos.getX(), pos.getY(), pos.getZ() );
|
||||
|
||||
// Prefetch meteor positions from the server for adjacent blocks so they are available more quickly when we're moving
|
||||
// Prefetch meteor positions from the server for adjacent blocks so they are available more quickly when
|
||||
// we're moving
|
||||
if( prefetch )
|
||||
{
|
||||
for( int i = 0; i < 3; i++ )
|
||||
|
||||
@@ -106,7 +106,8 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
modifiers.set( faceBakery, faceBakery.getModifiers() & ( ~Modifier.FINAL ) );
|
||||
|
||||
Class clas = Class.forName( ModelLoader.class.getName() + "$VanillaModelWrapper" );
|
||||
vanillaModelWrapper = clas.getDeclaredConstructor( ModelLoader.class, ResourceLocation.class, ModelBlock.class, boolean.class, ModelBlockAnimation.class );
|
||||
vanillaModelWrapper = clas.getDeclaredConstructor( ModelLoader.class, ResourceLocation.class, ModelBlock.class, boolean.class,
|
||||
ModelBlockAnimation.class );
|
||||
vanillaModelWrapper.setAccessible( true );
|
||||
|
||||
Class<?> vanillaLoaderClass = Class.forName( ModelLoader.class.getName() + "$VanillaLoader" );
|
||||
@@ -190,7 +191,10 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
{
|
||||
modelPath = modelPath.substring( "models/".length() );
|
||||
}
|
||||
try( InputStreamReader io = new InputStreamReader( Minecraft.getMinecraft().getResourceManager().getResource( new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) ).getInputStream() ) )
|
||||
try( InputStreamReader io = new InputStreamReader( Minecraft.getMinecraft()
|
||||
.getResourceManager()
|
||||
.getResource( new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) )
|
||||
.getInputStream() ) )
|
||||
{
|
||||
return gson.fromJson( io, UVLMarker.class ).uvlMarker;
|
||||
}
|
||||
@@ -209,7 +213,14 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
|
||||
public class UVLModelWrapper implements IModel
|
||||
{
|
||||
final Gson UVLSERIALIZER = ( new GsonBuilder() ).registerTypeAdapter( ModelBlock.class, deserializer( ModelBlock.class ) ).registerTypeAdapter( BlockPart.class, deserializer( BlockPart.class ) ).registerTypeAdapter( BlockPartFace.class, new BlockPartFaceOverrideSerializer() ).registerTypeAdapter( BlockFaceUV.class, deserializer( BlockFaceUV.class ) ).registerTypeAdapter( ItemTransformVec3f.class, deserializer( ItemTransformVec3f.class ) ).registerTypeAdapter( ItemCameraTransforms.class, deserializer( ItemCameraTransforms.class ) ).registerTypeAdapter( ItemOverride.class, deserializer( ItemOverride.class ) ).create();
|
||||
final Gson UVLSERIALIZER = ( new GsonBuilder() ).registerTypeAdapter( ModelBlock.class, deserializer( ModelBlock.class ) )
|
||||
.registerTypeAdapter( BlockPart.class, deserializer( BlockPart.class ) )
|
||||
.registerTypeAdapter( BlockPartFace.class, new BlockPartFaceOverrideSerializer() )
|
||||
.registerTypeAdapter( BlockFaceUV.class, deserializer( BlockFaceUV.class ) )
|
||||
.registerTypeAdapter( ItemTransformVec3f.class, deserializer( ItemTransformVec3f.class ) )
|
||||
.registerTypeAdapter( ItemCameraTransforms.class, deserializer( ItemCameraTransforms.class ) )
|
||||
.registerTypeAdapter( ItemOverride.class, deserializer( ItemOverride.class ) )
|
||||
.create();
|
||||
|
||||
private Map<BlockPartFace, Pair<Float, Float>> uvlightmap = new HashMap<>();
|
||||
|
||||
@@ -234,7 +245,8 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
{
|
||||
String s = modelLocation.getResourcePath();
|
||||
|
||||
iresource = Minecraft.getMinecraft().getResourceManager().getResource( new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) );
|
||||
iresource = Minecraft.getMinecraft().getResourceManager().getResource(
|
||||
new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) );
|
||||
reader = new InputStreamReader( iresource.getInputStream(), Charsets.UTF_8 );
|
||||
|
||||
lvt_5_1_ = JsonUtils.gsonDeserialize( UVLSERIALIZER, reader, ModelBlock.class, false );
|
||||
@@ -339,7 +351,8 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
{
|
||||
VertexFormat newFormat = VertexFormats.getFormatWithLightMap( quad.getFormat() );
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( newFormat );
|
||||
VertexLighterFlat trans = new VertexLighterFlat( Minecraft.getMinecraft().getBlockColors() ){
|
||||
VertexLighterFlat trans = new VertexLighterFlat( Minecraft.getMinecraft().getBlockColors() )
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void updateLightmap( float[] normal, float[] lightmap, float x, float y, float z )
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.renderable;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
|
||||
@@ -129,7 +129,12 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.UP ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.DOWN ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.NORTH ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.SOUTH ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.EAST ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.UP ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.DOWN ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.NORTH ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.EAST ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
|
||||
if( ( flags & TileSpatialPylon.DISPLAY_POWERED_ENABLED ) == TileSpatialPylon.DISPLAY_POWERED_ENABLED )
|
||||
@@ -137,7 +142,12 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
builder.setRenderFullBright( true );
|
||||
}
|
||||
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.UP ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.DOWN ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.NORTH ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.SOUTH ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.EAST ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.UP ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.DOWN ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.NORTH ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.EAST ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -40,7 +40,8 @@ import appeng.tile.grindstone.TileCrank;
|
||||
|
||||
|
||||
/**
|
||||
* This FastTESR only handles the animated model of the turning crank. When the crank is at rest, it is rendered using a normal model.
|
||||
* This FastTESR only handles the animated model of the turning crank. When the crank is at rest, it is rendered using a
|
||||
* normal model.
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class CrankTESR extends TileEntitySpecialRenderer<TileCrank>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.client.render.tesr;
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user