First update pass (1/3) - ~1400 -> 82 errors

This is first update pass, which is mainly import reorganization, name
fixes, etc... Although some parts of second were done where changes
aren't important.
Errors: ~1400 -> 82.
This commit is contained in:
elix-x
2016-06-19 14:43:27 +02:00
parent d9725a7d9b
commit 5498eb6d7c
288 changed files with 1637 additions and 1420 deletions
@@ -24,12 +24,13 @@ import javax.annotation.Nonnull;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.block.model.ModelManager;
import net.minecraft.client.renderer.color.ItemColors;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.resources.model.ModelManager;
import net.minecraft.item.ItemStack;
import appeng.api.storage.data.IAEItemStack;
@@ -48,9 +49,9 @@ import appeng.util.ReadableNumberConverter;
*/
public class AppEngRenderItem extends RenderItem
{
public AppEngRenderItem( final TextureManager textureManager, final ModelManager modelManager )
public AppEngRenderItem( final TextureManager textureManager, final ModelManager modelManager, final ItemColors itemColors )
{
super( textureManager, modelManager );
super( textureManager, modelManager, itemColors );
}
private static final ISlimReadableNumberConverter SLIM_CONVERTER = ReadableNumberConverter.INSTANCE;
@@ -81,7 +82,7 @@ public class AppEngRenderItem extends RenderItem
GL11.glDisable( GL11.GL_ALPHA_TEST );
GL11.glDisable( GL11.GL_BLEND );
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer wr = tessellator.getWorldRenderer();
final VertexBuffer wr = tessellator.getBuffer();
final int l = 255 - k << 16 | k << 8;
final int i1 = ( 255 - k ) / 4 << 16 | 16128;
this.renderQuad( tessellator, xPos + 2, yPos + 13, 13, 2, 0 );
@@ -132,7 +133,7 @@ public class AppEngRenderItem extends RenderItem
private void renderQuad( final Tessellator par1Tessellator, final int par2, final int par3, final int par4, final int par5, final int par6 )
{
final WorldRenderer wr = par1Tessellator.getWorldRenderer();
final VertexBuffer wr = par1Tessellator.getBuffer();
wr.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
@@ -14,18 +14,18 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.BlockFaceUV;
import net.minecraft.client.renderer.block.model.BlockPartFace;
import net.minecraft.client.renderer.block.model.FaceBakery;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.client.renderer.block.model.ModelRotation;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.resources.model.ModelRotation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.client.model.IColoredBakedQuad;
import appeng.api.util.IAESprite;
import appeng.api.util.ModelGenerator;
@@ -35,17 +35,15 @@ import appeng.client.texture.MissingIcon;
import appeng.items.AEBaseItem;
import appeng.items.parts.ItemMultiPart;
//TODO 1.9.4 - Just all
public class BakingModelGenerator implements ModelGenerator
{
private static final class CachedModel implements IBakedModel
{
private final List<BakedQuad>[] faces = new List[6];
private final List<BakedQuad> general;
public CachedModel()
{
this.general = new ArrayList<BakedQuad>();
for( final EnumFacing f : EnumFacing.VALUES )
{
this.faces[f.ordinal()] = new ArrayList<BakedQuad>();
@@ -83,15 +81,15 @@ public class BakingModelGenerator implements ModelGenerator
}
@Override
public List getGeneralQuads()
public List<BakedQuad> getQuads( IBlockState state, EnumFacing side, long rand )
{
return this.general;
return this.faces[side.ordinal()];
}
@Override
public List getFaceQuads( final EnumFacing p_177551_1_ )
public ItemOverrideList getOverrides()
{
return this.faces[p_177551_1_.ordinal()];
return null;
}
}
@@ -364,7 +362,7 @@ public class BakingModelGenerator implements ModelGenerator
public boolean isAlphaPass()
{
return MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT;
return MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT;
}
private float[] getFaceUvs( final EnumFacing face, final Vector3f to_16, final Vector3f from_16 )
@@ -21,6 +21,7 @@ package appeng.client.render;
import java.nio.FloatBuffer;
import java.util.EnumSet;
import javax.annotation.Nullable;
import org.lwjgl.BufferUtils;
@@ -28,15 +29,15 @@ import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -666,7 +667,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ( 16.0 - uv ) / 16.0;
}
public void renderTile( final B block, final T tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
public void renderTile( final B block, final T tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
renderer.setUvRotateBottom( renderer.setUvRotateTop( renderer.setUvRotateEast( renderer.setUvRotateWest( renderer.setUvRotateNorth( renderer.setUvRotateSouth( 0 ) ) ) ) ) );
@@ -675,7 +676,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
final AEPartLocation forward = AEPartLocation.SOUTH;
this.applyTESRRotation( x, y, z, forward.getFacing(), up.getFacing() );
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
RenderHelper.disableStandardItemLighting();
if( Minecraft.isAmbientOcclusionEnabled() )
@@ -753,7 +754,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
GL11.glTranslatef( 0, -0.14F, 0 );
// RenderItem.renderInFrame = true;
Minecraft.getMinecraft().getRenderManager().renderEntityWithPosYaw( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F );
Minecraft.getMinecraft().getRenderManager().doRenderEntity( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F, true );
// RenderItem.renderInFrame = false;
GL11.glPopMatrix();
@@ -20,14 +20,15 @@ package appeng.client.render;
import java.util.EnumSet;
import javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -24,9 +24,9 @@ import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraftforge.client.MinecraftForgeClient;
import appeng.api.parts.IFacadeContainer;
@@ -60,7 +60,7 @@ public class CableRenderHelper
}
else
{
BusRenderHelper.INSTANCE.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
BusRenderHelper.INSTANCE.setPass( MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT ? 1 : 0 );
}
if( renderer.getBlockAccess() == null )
@@ -3,7 +3,7 @@ package appeng.client.render;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -29,7 +29,7 @@ import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraftforge.client.IRenderHandler;
@@ -77,7 +77,7 @@ public class SpatialSkyRender extends IRenderHandler
GL11.glDepthMask( false );
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
final VertexBuffer VertexBuffer = tessellator.getBuffer();
for( int i = 0; i < 6; ++i )
{
@@ -108,11 +108,11 @@ public class SpatialSkyRender extends IRenderHandler
GL11.glRotatef( -90.0F, 0.0F, 0.0F, 1.0F );
}
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, -100.0D ).tex( 0.0D, 0.0D ).endVertex();
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, 100.0D ).tex( 0.0D, 16.0D ).endVertex();
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, -100.0D ).tex( 0.0D, 0.0D ).endVertex();
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, 100.0D ).tex( 0.0D, 16.0D ).endVertex();
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
tessellator.draw();
GL11.glPopMatrix();
}
@@ -145,8 +145,8 @@ public class SpatialSkyRender extends IRenderHandler
private void renderTwinkles()
{
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
final VertexBuffer VertexBuffer = tessellator.getBuffer();
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
for( int i = 0; i < 50; ++i )
{
@@ -186,7 +186,7 @@ public class SpatialSkyRender extends IRenderHandler
final double d23 = d17 * d12 - d20 * d13;
final double d24 = d23 * d9 - d21 * d10;
final double d25 = d21 * d9 + d23 * d10;
worldrenderer.pos( x + d24, y + d22, z + d25 ).endVertex();
VertexBuffer.pos( x + d24, y + d22, z + d25 ).endVertex();
}
}
}
@@ -69,7 +69,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
GL11.glPushMatrix();
this.renderBlocksInstance.setBlockAccess( te.getWorld() );
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess.getWorldRenderer(), x, y, z, f, this.renderBlocksInstance );
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess.getBuffer(), x, y, z, f, this.renderBlocksInstance );
GL11.glPopMatrix();
}
@@ -23,7 +23,7 @@ import java.util.HashMap;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -23,8 +23,8 @@ import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.networking.IGridHost;
@@ -26,10 +26,10 @@ import org.lwjgl.opengl.GL12;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.AEPartLocation;
@@ -122,7 +122,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
}
@Override
public void renderTile( final BlockCharger block, final TileCharger tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
public void renderTile( final BlockCharger block, final TileCharger tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
final ItemStack sis = tile.getStackInSlot( 0 );
@@ -20,8 +20,8 @@ package appeng.client.render.blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -23,9 +23,9 @@ import java.util.EnumSet;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.MinecraftForgeClient;
@@ -104,7 +104,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
final BusRenderHelper i = BusRenderHelper.INSTANCE;
renderer.setBlockAccess( w );
i.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
i.setPass( MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT ? 1 : 0 );
i.setOrientation( EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
final float highX = this.isConnected( w, pos, EnumFacing.EAST ) ? 16 : 13.01f;
@@ -26,7 +26,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
@@ -57,7 +57,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
}
@Override
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
if( tile != null )
{
@@ -91,7 +91,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
}
}
private void tesrRenderScreen( final WorldRenderer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
private void tesrRenderScreen( final VertexBuffer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
{
final EnumFacing side = cmt.getForward();
@@ -23,12 +23,12 @@ import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -67,14 +67,14 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
}
@Override
public void renderTile( final BlockCrank blk, final TileCrank tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
public void renderTile( final BlockCrank blk, final TileCrank tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
{
if( tile.getUp() == null )
{
return;
}
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
RenderHelper.disableStandardItemLighting();
if( Minecraft.isAmbientOcclusionEnabled() )
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.implementations.items.IAEItemPowerStorage;
@@ -28,12 +28,12 @@ import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.features.IInscriberRecipe;
@@ -149,7 +149,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
@Override
public void renderTile( final BlockInscriber block, final TileInscriber tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
public void renderTile( final BlockInscriber block, final TileInscriber tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
GL11.glPushMatrix();
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
@@ -160,7 +160,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
GL11.glCullFace( GL11.GL_FRONT );
final Minecraft mc = Minecraft.getMinecraft();
mc.renderEngine.bindTexture( TextureMap.locationBlocksTexture );
mc.renderEngine.bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
// << 20 | light << 4;
final int br = tile.getWorld().getCombinedLight( tile.getPos(), 0 );
@@ -263,7 +263,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
}
private void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
private void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
if( sis != null )
{
@@ -19,7 +19,7 @@
package appeng.client.render.blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.IAESprite;
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.IAESprite;
@@ -64,7 +64,7 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
final IAESprite[] icoSet = { imb.getIcon( EnumFacing.UP, imb.getDefaultState() ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
final int brightness = imb.getMixedBrightnessForBlock( world, pos );
final int brightness = imb.getLightValue( world.getBlockState( pos ), world, pos );
final EnumSet<EnumFacing> validSides = EnumSet.noneOf( EnumFacing.class );
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.IAESprite;
@@ -25,10 +25,10 @@ import org.lwjgl.opengl.GL12;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelChest;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -84,7 +84,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
}
@Override
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final VertexBuffer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
{
if( skyChest == null )
{
@@ -23,11 +23,11 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -178,7 +178,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
}
@Override
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final VertexBuffer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
{
if( skyCompass == null )
{
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.AEColor;
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.AEPartLocation;
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.AEApi;
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -25,8 +25,8 @@ import java.util.EnumSet;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.AEApi;
@@ -22,7 +22,7 @@ package appeng.client.render.blocks;
import java.util.Random;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.AEApi;
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -23,7 +23,7 @@ import java.util.EnumSet;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.AEPartLocation;
@@ -68,7 +68,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.HOPPER.getDefaultState() )[0] );
renderer.setRenderAllFaces( true );
final float top = 8.0f / 16.0f;
@@ -135,7 +135,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
super.renderInWorld( block, world, pos, renderer );
}
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.HOPPER.getDefaultState() )[0] );
final float top = 8.0f / 16.0f;
final float bottom = 7.0f / 16.0f;
@@ -20,8 +20,8 @@ package appeng.client.render.blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.AEPartLocation;
@@ -22,7 +22,7 @@ package appeng.client.render.blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.ModelGenerator;
@@ -44,7 +44,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
@Override
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.TNT.getDefaultState() ) ) );
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
super.renderInventory( block, is, renderer, type, obj );
}
@@ -52,7 +52,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
@Override
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.TNT.getDefaultState() ) ) );
renderer.setRenderAllFaces( true );
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
final boolean out = super.renderInWorld( imb, world, pos, renderer );
@@ -22,11 +22,11 @@ package appeng.client.render.blocks;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.parts.IFacadePart;
@@ -137,7 +137,7 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
}
@Override
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
if( cableBus != null )
{
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.AEColor;
@@ -19,8 +19,8 @@
package appeng.client.render.effects;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
@@ -30,7 +30,7 @@ import appeng.core.CommonHelper;
import appeng.entity.EntityFloatingItem;
public class AssemblerFX extends EntityFX
public class AssemblerFX extends Particle
{
private final EntityFloatingItem fi;
@@ -47,6 +47,7 @@ public class AssemblerFX extends EntityFX
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
w.spawnEntityInWorld( this.fi );
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@@ -62,7 +63,7 @@ public class AssemblerFX extends EntityFX
{
super.onUpdate();
if( this.isDead )
if( this.isExpired )
{
this.fi.setDead();
}
@@ -74,7 +75,7 @@ public class AssemblerFX extends EntityFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
this.time += l;
if( this.time > 4.0 )
@@ -19,11 +19,11 @@
package appeng.client.render.effects;
import net.minecraft.client.particle.EntityReddustFX;
import net.minecraft.client.particle.ParticleRedstone;
import net.minecraft.world.World;
public class ChargedOreFX extends EntityReddustFX
public class ChargedOreFX extends ParticleRedstone
{
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
@@ -19,12 +19,12 @@
package appeng.client.render.effects;
import net.minecraft.client.particle.EntityBreakingFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.particle.ParticleBreaking;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.util.MathHelper;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
@SideOnly( Side.CLIENT )
public class CraftingFx extends EntityBreakingFX
public class CraftingFx extends ParticleBreaking
{
private final TextureAtlasSprite particleTextureIndex;
@@ -59,6 +59,7 @@ public class CraftingFx extends EntityBreakingFX
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@@ -69,7 +70,7 @@ public class CraftingFx extends EntityBreakingFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
{
if( partialTick < 0 || partialTick > 1 )
{
@@ -119,4 +120,19 @@ public class CraftingFx extends EntityBreakingFX
this.particleScale *= 0.51f;
this.particleAlpha *= 0.51f;
}
public void setMotionX( float motionX )
{
this.motionX = motionX;
}
public void setMotionY( float motionY )
{
this.motionY = motionY;
}
public void setMotionZ( float motionZ )
{
this.motionZ = motionZ;
}
}
@@ -19,12 +19,12 @@
package appeng.client.render.effects;
import net.minecraft.client.particle.EntityBreakingFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.particle.ParticleBreaking;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.util.MathHelper;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
@SideOnly( Side.CLIENT )
public class EnergyFx extends EntityBreakingFX
public class EnergyFx extends ParticleBreaking
{
private final TextureAtlasSprite particleTextureIndex;
@@ -58,6 +58,7 @@ public class EnergyFx extends EntityBreakingFX
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@@ -68,7 +69,7 @@ public class EnergyFx extends EntityBreakingFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
{
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
@@ -109,4 +110,19 @@ public class EnergyFx extends EntityBreakingFX
this.particleScale *= 0.89f;
this.particleAlpha *= 0.89f;
}
public void setMotionX( float motionX )
{
this.motionX = motionX;
}
public void setMotionY( float motionY )
{
this.motionY = motionY;
}
public void setMotionZ( float motionZ )
{
this.motionZ = motionZ;
}
}
@@ -35,6 +35,7 @@ public class LightningArcFX extends LightningFX
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
{
super( w, x, y, z, r, g, b, 6 );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
this.rx = ex - x;
@@ -22,15 +22,15 @@ package appeng.client.render.effects;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
public class LightningFX extends EntityFX
public class LightningFX extends Particle
{
private static final Random RANDOM_GENERATOR = new Random();
@@ -55,6 +55,7 @@ public class LightningFX extends EntityFX
this.motionY = 0;
this.motionZ = 0;
this.particleMaxAge = maxAge;
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@@ -84,7 +85,7 @@ public class LightningFX extends EntityFX
}
@Override
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
public void renderParticle( final VertexBuffer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
final float j = 1.0f;
float red = this.particleRed * j * 0.9f;
@@ -210,7 +211,7 @@ public class LightningFX extends EntityFX
this.hasData = false;
}
private void draw( float red, float green, float blue, final WorldRenderer tess, final double[] a, final double[] b, final double f6, final double f8 )
private void draw( float red, float green, float blue, final VertexBuffer tess, final double[] a, final double[] b, final double f6, final double f8 )
{
if( this.hasData )
{
@@ -19,8 +19,8 @@
package appeng.client.render.effects;
import net.minecraft.client.particle.EntityBreakingFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.particle.ParticleBreaking;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
@@ -30,7 +30,7 @@ import appeng.api.util.AEPartLocation;
import appeng.client.texture.ExtraBlockTextures;
public class MatterCannonFX extends EntityBreakingFX
public class MatterCannonFX extends ParticleBreaking
{
private final TextureAtlasSprite particleTextureIndex;
@@ -48,6 +48,7 @@ public class MatterCannonFX extends EntityBreakingFX
this.motionY = 0.0f;
this.motionZ = 0.0f;
this.particleTextureIndex = ExtraBlockTextures.BlockMatterCannonParticle.getIcon().getAtlas();
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@@ -71,7 +72,7 @@ public class MatterCannonFX extends EntityBreakingFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
{
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
@@ -19,14 +19,14 @@
package appeng.client.render.effects;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.particle.Particle;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly( Side.CLIENT )
public class VibrantFX extends EntityFX
public class VibrantFX extends Particle
{
public VibrantFX( final World par1World, final double x, final double y, final double z, final double par8, final double par10, final double par12 )
@@ -46,13 +46,14 @@ public class VibrantFX extends EntityFX
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.particleMaxAge = (int) ( 20.0D / ( Math.random() * 0.8D + 0.1D ) );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@Override
public float getBrightness( final float par1 )
public int getBrightnessForRender( final float par1 )
{
return 1.0f;
return 1;
}
/**
@@ -69,7 +70,7 @@ public class VibrantFX extends EntityFX
if( this.particleMaxAge <= 0 || this.particleScale < 0.1 )
{
this.setDead();
this.setExpired();
}
this.particleMaxAge--;
}