Some import renames and compile error fixes, killed ~800.

This commit is contained in:
LexManos committed 2016-03-01 04:58:03 -08:00
1 parent 1f80eb17df
commit ac7c4d2f6c
90 files changed
+454 -441

No files matched your search

@@ -9,7 +9,7 @@ import java.util.List;
import java.util.Map.Entry;
import net.minecraft.client.renderer.block.model.ModelBlockDefinition;
import net.minecraft.client.resources.model.ModelRotation;
import net.minecraft.client.renderer.block.model.ModelRotation;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.FMLLog;
@@ -17,7 +17,7 @@ import javax.vecmath.Quat4f;
import javax.vecmath.Vector3f;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.resources.model.ModelRotation;
import net.minecraft.client.renderer.block.model.ModelRotation;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.BlockStateLoader.Marker;
@@ -6,7 +6,7 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.util.EnumFacing;
/*
@@ -10,7 +10,7 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.util.EnumFacing;
import org.apache.commons.lang3.tuple.Pair;
@@ -1,7 +1,7 @@
package net.minecraftforge.client.model;
import net.minecraft.item.ItemStack;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.renderer.block.model.IBakedModel;
public interface ISmartItemModel extends IBakedModel
{
@@ -13,8 +13,8 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformT
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
@@ -15,8 +15,8 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformT
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.resources.model.ModelRotation;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ModelRotation;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
@@ -41,13 +41,13 @@ import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.model.BuiltInModel;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.resources.model.ModelRotation;
import net.minecraft.client.resources.model.SimpleBakedModel;
import net.minecraft.client.resources.model.WeightedBakedModel;
import net.minecraft.client.renderer.block.model.BuiltInModel;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelRotation;
import net.minecraft.client.renderer.block.model.SimpleBakedModel;
import net.minecraft.client.renderer.block.model.WeightedBakedModel;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -10,7 +10,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.IReloadableResourceManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader.VanillaLoader;
import net.minecraftforge.client.model.b3d.B3DLoader;
@@ -14,10 +14,10 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformT
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.fml.common.FMLLog;
@@ -34,11 +34,11 @@ import com.google.gson.JsonParser;
public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
{
public static final MultiLayerModel instance = new MultiLayerModel(ImmutableMap.<Optional<EnumWorldBlockLayer>, ModelResourceLocation>of());
public static final MultiLayerModel instance = new MultiLayerModel(ImmutableMap.<Optional<BlockRenderLayer>, ModelResourceLocation>of());
private final ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models;
private final ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models;
public MultiLayerModel(ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models)
public MultiLayerModel(ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models)
{
this.models = models;
}
@@ -55,10 +55,10 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
return ImmutableList.of();
}
private static ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> buildModels(ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
private static ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> buildModels(ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{
ImmutableMap.Builder<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> builder = ImmutableMap.builder();
for(Optional<EnumWorldBlockLayer> key : models.keySet())
ImmutableMap.Builder<Optional<BlockRenderLayer>, IFlexibleBakedModel> builder = ImmutableMap.builder();
for(Optional<BlockRenderLayer> key : models.keySet())
{
IModel model;
try
@@ -96,14 +96,14 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
@Override
public IModel process(ImmutableMap<String, String> customData)
{
ImmutableMap.Builder<Optional<EnumWorldBlockLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
ImmutableMap.Builder<Optional<BlockRenderLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
for(String key : customData.keySet())
{
if("base".equals(key))
{
builder.put(Optional.<EnumWorldBlockLayer>absent(), getLocation(customData.get(key)));
builder.put(Optional.<BlockRenderLayer>absent(), getLocation(customData.get(key)));
}
for(EnumWorldBlockLayer layer : EnumWorldBlockLayer.values())
for(BlockRenderLayer layer : BlockRenderLayer.values())
{
if(layer.toString().equals(key))
{
@@ -111,7 +111,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
}
}
}
ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models = builder.build();
ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models = builder.build();
if(models.isEmpty()) return instance;
return new MultiLayerModel(models);
}
@@ -129,7 +129,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
public static class MultiLayerBakedModel implements IFlexibleBakedModel, ISmartBlockModel, IPerspectiveAwareModel
{
private final ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> models;
private final ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> models;
private final VertexFormat format;
private final ImmutableMap<TransformType, TRSRTransformation> cameraTransforms;;
private final IFlexibleBakedModel base;
@@ -145,7 +145,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
};
@Deprecated // remove 1.9
public MultiLayerBakedModel(ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
public MultiLayerBakedModel(ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
{
this(
buildModels(models, TRSRTransformation.identity(), format, defaultTextureGetter),
@@ -155,7 +155,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
);
}
public MultiLayerBakedModel(ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> models, IFlexibleBakedModel missing, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
public MultiLayerBakedModel(ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> models, IFlexibleBakedModel missing, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
{
this.models = models;
this.format = format;
@@ -178,7 +178,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
quads = quadBuilder.build();
}
private static ImmutableList<BakedQuad> buildQuads(ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> models, Optional<EnumFacing> side)
private static ImmutableList<BakedQuad> buildQuads(ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> models, Optional<EnumFacing> side)
{
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
for(IBakedModel model : models.values())
@@ -240,7 +240,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
@Override
public IBakedModel handleBlockState(IBlockState state)
{
Optional<EnumWorldBlockLayer> layer = Optional.of(MinecraftForgeClient.getRenderLayer());
Optional<BlockRenderLayer> layer = Optional.of(MinecraftForgeClient.getRenderLayer());
if(!models.containsKey(layer))
{
return missing;
@@ -9,7 +9,7 @@ import javax.vecmath.Vector3f;
import javax.vecmath.Vector4f;
import net.minecraft.client.renderer.block.model.ItemTransformVec3f;
import net.minecraft.client.resources.model.ModelRotation;
import net.minecraft.client.renderer.block.model.ModelRotation;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Vec3i;
@@ -6,19 +6,19 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.GlStateManager;
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.block.model.BakedQuad;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.IModelState;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.pipeline.VertexLighterFlat;
import net.minecraftforge.client.model.pipeline.WorldRendererConsumer;
import net.minecraftforge.client.model.pipeline.VertexBufferConsumer;
import org.apache.commons.lang3.tuple.Pair;
import org.lwjgl.opengl.GL11;
@@ -58,11 +58,11 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
GlStateManager.pushMatrix();
GlStateManager.rotate(180, 0, 0, 1);
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
worldRenderer.setTranslation(-0.5, -1.5, -0.5);
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
VertexBuffer.setTranslation(-0.5, -1.5, -0.5);
lighter.setParent(new WorldRendererConsumer(worldRenderer));
lighter.setParent(new VertexBufferConsumer(VertexBuffer));
lighter.setWorld(entity.worldObj);
lighter.setBlock(Blocks.air);
lighter.setBlockPos(pos);
@@ -92,12 +92,12 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
}
// debug quad
/*worldRenderer.pos(0, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 0).lightmap(240, 0).endVertex();
worldRenderer.pos(0, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 1).lightmap(240, 0).endVertex();
worldRenderer.pos(1, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 1).lightmap(240, 0).endVertex();
worldRenderer.pos(1, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 0).lightmap(240, 0).endVertex();*/
/*VertexBuffer.pos(0, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 0).lightmap(240, 0).endVertex();
VertexBuffer.pos(0, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 1).lightmap(240, 0).endVertex();
VertexBuffer.pos(1, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 1).lightmap(240, 0).endVertex();
VertexBuffer.pos(1, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 0).lightmap(240, 0).endVertex();*/
worldRenderer.setTranslation(0, 0, 0);
VertexBuffer.setTranslation(0, 0, 0);
tessellator.draw();
GlStateManager.popMatrix();
@@ -5,10 +5,10 @@ import java.util.concurrent.TimeUnit;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BlockRendererDispatcher;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.client.model.IModelState;
@@ -47,7 +47,7 @@ public class AnimationTESR<T extends TileEntity & IAnimationProvider> extends Fa
return modelCache.getUnchecked(Pair.of(state, modelState));
}
public void renderTileEntityFast(T te, double x, double y, double z, float partialTick, int breakStage, WorldRenderer renderer)
public void renderTileEntityFast(T te, double x, double y, double z, float partialTick, int breakStage, VertexBuffer renderer)
{
if(blockRenderer == null) blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();
BlockPos pos = te.getPos();
@@ -2,7 +2,7 @@ package net.minecraftforge.client.model.animation;
import java.io.IOException;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
@@ -6,7 +6,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
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.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@@ -18,7 +18,7 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
public final void renderTileEntityAt(T te, double x, double y, double z, float partialTicks, int destroyStage)
{
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
this.bindTexture(TextureMap.locationBlocksTexture);
RenderHelper.disableStandardItemLighting();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -34,10 +34,10 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
GlStateManager.shadeModel(GL11.GL_FLAT);
}
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, worldRenderer);
worldRenderer.setTranslation(0, 0, 0);
renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, VertexBuffer);
VertexBuffer.setTranslation(0, 0, 0);
tessellator.draw();
@@ -45,5 +45,5 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
}
@Override
public abstract void renderTileEntityFast(T te, double x, double y, double z, float partialTicks, int destroyStage, WorldRenderer worldRenderer);
public abstract void renderTileEntityFast(T te, double x, double y, double z, float partialTicks, int destroyStage, VertexBuffer VertexBuffer);
}
@@ -28,7 +28,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.IResource;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
@@ -2,7 +2,7 @@ package net.minecraftforge.client.model.pipeline;
import net.minecraft.block.Block;
import net.minecraft.block.Block.EnumOffsetType;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
@@ -4,10 +4,10 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.BlockModelRenderer;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.util.BlockPos;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.ForgeModContainer;
@@ -32,20 +32,20 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
};
private final ThreadLocal<WorldRendererConsumer> wrFlat = new ThreadLocal<WorldRendererConsumer>();
private final ThreadLocal<WorldRendererConsumer> wrSmooth = new ThreadLocal<WorldRendererConsumer>();
private final ThreadLocal<WorldRenderer> lastRendererFlat = new ThreadLocal<WorldRenderer>();
private final ThreadLocal<WorldRenderer> lastRendererSmooth = new ThreadLocal<WorldRenderer>();
private final ThreadLocal<VertexBufferConsumer> wrFlat = new ThreadLocal<VertexBufferConsumer>();
private final ThreadLocal<VertexBufferConsumer> wrSmooth = new ThreadLocal<VertexBufferConsumer>();
private final ThreadLocal<VertexBuffer> lastRendererFlat = new ThreadLocal<VertexBuffer>();
private final ThreadLocal<VertexBuffer> lastRendererSmooth = new ThreadLocal<VertexBuffer>();
@Override
public boolean renderModelStandard(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, WorldRenderer wr, boolean checkSides)
public boolean renderModelStandard(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, VertexBuffer wr, boolean checkSides)
{
if(ForgeModContainer.forgeLightPipelineEnabled)
{
if(wr != lastRendererFlat.get())
{
lastRendererFlat.set(wr);
WorldRendererConsumer newCons = new WorldRendererConsumer(wr);
VertexBufferConsumer newCons = new VertexBufferConsumer(wr);
wrFlat.set(newCons);
lighterFlat.get().setParent(newCons);
}
@@ -59,14 +59,14 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
@Override
public boolean renderModelAmbientOcclusion(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, WorldRenderer wr, boolean checkSides)
public boolean renderModelAmbientOcclusion(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, VertexBuffer wr, boolean checkSides)
{
if(ForgeModContainer.forgeLightPipelineEnabled)
{
if(wr != lastRendererSmooth.get())
{
lastRendererSmooth.set(wr);
WorldRendererConsumer newCons = new WorldRendererConsumer(wr);
VertexBufferConsumer newCons = new VertexBufferConsumer(wr);
wrSmooth.set(newCons);
lighterSmooth.get().setParent(newCons);
}
@@ -79,7 +79,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
}
public static boolean render(VertexLighterFlat lighter, IBlockAccess world, IBakedModel model, Block block, BlockPos pos, WorldRenderer wr, boolean checkSides)
public static boolean render(VertexLighterFlat lighter, IBlockAccess world, IBakedModel model, Block block, BlockPos pos, VertexBuffer wr, boolean checkSides)
{
lighter.setWorld(world);
lighter.setBlock(block);
@@ -1,7 +1,7 @@
package net.minecraftforge.client.model.pipeline;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.vertex.VertexFormat;
@@ -240,8 +240,8 @@ public class LightUtil
if(tessellator == null)
{
Tessellator tes = Tessellator.getInstance();
WorldRenderer wr = tes.getWorldRenderer();
tessellator = new WorldRendererConsumer(wr);
VertexBuffer wr = tes.getVertexBuffer();
tessellator = new VertexBufferConsumer(wr);
}
return tessellator;
}
@@ -257,16 +257,16 @@ public class LightUtil
}
// renders quad in any Vertex Format, but is slower
public static void renderQuadColorSlow(WorldRenderer wr, BakedQuad quad, int auxColor)
public static void renderQuadColorSlow(VertexBuffer wr, BakedQuad quad, int auxColor)
{
ItemConsumer cons;
if(wr == Tessellator.getInstance().getWorldRenderer())
if(wr == Tessellator.getInstance().getVertexBuffer())
{
cons = getItemConsumer();
}
else
{
cons = new ItemConsumer(new WorldRendererConsumer(wr));
cons = new ItemConsumer(new VertexBufferConsumer(wr));
}
float b = (float)(auxColor & 0xFF) / 0xFF;
float g = (float)((auxColor >>> 8) & 0xFF) / 0xFF;
@@ -277,7 +277,7 @@ public class LightUtil
quad.pipe(cons);
}
public static void renderQuadColor(WorldRenderer wr, BakedQuad quad, int auxColor)
public static void renderQuadColor(VertexBuffer wr, BakedQuad quad, int auxColor)
{
wr.addVertexData(quad.getVertexData());
if(quad instanceof IColoredBakedQuad)
@@ -8,7 +8,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
@@ -154,7 +154,7 @@ public class VertexLighterFlat extends QuadGatheringTransformer
switch(element.getUsage())
{
case POSITION:
// position adding moved to WorldRendererConsumer due to x and z not fitting completely into a float
// position adding moved to VertexBufferConsumer due to x and z not fitting completely into a float
/*float[] pos = new float[4];
System.arraycopy(position[v], 0, pos, 0, position[v].length);
pos[0] += blockInfo.getBlockPos().getX();
@@ -1,23 +1,23 @@
package net.minecraftforge.client.model.pipeline;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement.EnumUsage;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
/**
* Assumes VertexFormatElement is present in the WorlRenderer's vertex format.
*/
public class WorldRendererConsumer implements IVertexConsumer
public class VertexBufferConsumer implements IVertexConsumer
{
private static final float[] dummyColor = new float[]{ 1, 1, 1, 1 };
private final WorldRenderer renderer;
private final VertexBuffer renderer;
private final int[] quadData;
private int v = 0;
private BlockPos offset = BlockPos.ORIGIN;
public WorldRendererConsumer(WorldRenderer renderer)
public VertexBufferConsumer(VertexBuffer renderer)
{
super();
this.renderer = renderer;