tabs -> spaces.
This commit is contained in:
parent
d35c38d261
commit
d5c4b1825c
|
@ -23,8 +23,8 @@
|
|||
{
|
||||
case MODEL:
|
||||
- return this.blockModelRenderer.renderModel(blockAccess, this.func_184389_a(state), state, pos, worldRendererIn, true);
|
||||
+ IBakedModel model = this.func_184389_a(state);
|
||||
+ state = state.getBlock().getExtendedState(state, blockAccess, pos);
|
||||
+ IBakedModel model = this.func_184389_a(state);
|
||||
+ state = state.getBlock().getExtendedState(state, blockAccess, pos);
|
||||
+ return this.blockModelRenderer.renderModel(blockAccess, model, state, pos, worldRendererIn, true);
|
||||
case ENTITYBLOCK_ANIMATED:
|
||||
return false;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
if (iblockstate.func_185901_i() != EnumBlockRenderType.INVISIBLE)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(mc.thePlayer, partialTicks, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos))
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(mc.thePlayer, partialTicks, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, iblockstate, overlayPos))
|
||||
this.func_178108_a(partialTicks, this.mc.getBlockRendererDispatcher().getBlockModelShapes().getTexture(iblockstate));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
{
|
||||
for (Entity entity2 : classinheritancemultimap)
|
||||
{
|
||||
+ if(!entity2.shouldRenderInPass(pass)) continue;
|
||||
+ if(!entity2.shouldRenderInPass(pass)) continue;
|
||||
boolean flag = this.renderManager.shouldRender(entity2, camera, d0, d1, d2) || entity2.func_184215_y(this.mc.thePlayer);
|
||||
|
||||
if (flag)
|
||||
|
@ -89,7 +89,7 @@
|
|||
|
||||
public void renderSky(float partialTicks, int pass)
|
||||
{
|
||||
+ net.minecraftforge.client.IRenderHandler renderer = this.theWorld.provider.getSkyRenderer();
|
||||
+ net.minecraftforge.client.IRenderHandler renderer = this.theWorld.provider.getSkyRenderer();
|
||||
+ if (renderer != null)
|
||||
+ {
|
||||
+ renderer.render(partialTicks, theWorld, mc);
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
{
|
||||
- int j = (int)Math.round(13.0D - (double)stack.getItemDamage() * 13.0D / (double)stack.getMaxDamage());
|
||||
- int i = (int)Math.round(255.0D - (double)stack.getItemDamage() * 255.0D / (double)stack.getMaxDamage());
|
||||
+ double health = stack.getItem().getDurabilityForDisplay(stack);
|
||||
+ double health = stack.getItem().getDurabilityForDisplay(stack);
|
||||
+ int j = (int)Math.round(13.0D - health * 13.0D);
|
||||
+ int i = (int)Math.round(255.0D - health * 255.0D);
|
||||
GlStateManager.disableLighting();
|
||||
|
|
|
@ -29,6 +29,6 @@
|
|||
+
|
||||
+ public boolean isColorDisabled()
|
||||
+ {
|
||||
+ return noColor;
|
||||
+ return noColor;
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
|
||||
{
|
||||
+ return makeBakedQuad(posFrom, posTo, face, sprite, facing, (net.minecraftforge.client.model.ITransformation)modelRotationIn, partRotation, uvLocked, shade);
|
||||
+ return makeBakedQuad(posFrom, posTo, face, sprite, facing, (net.minecraftforge.client.model.ITransformation)modelRotationIn, partRotation, uvLocked, shade);
|
||||
+ }
|
||||
+
|
||||
+ public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, net.minecraftforge.client.model.ITransformation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
|
||||
|
@ -14,7 +14,7 @@
|
|||
if (uvLocked)
|
||||
{
|
||||
- blockfaceuv = this.func_188010_a(face.blockFaceUV, facing, modelRotationIn);
|
||||
+ // TODO fix uvlock for custom rotations
|
||||
+ // TODO fix uvlock for custom rotations
|
||||
+ //blockfaceuv = this.func_188010_a(face.blockFaceUV, facing, modelRotationIn);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
private int[] func_188012_a(BlockFaceUV p_188012_1_, TextureAtlasSprite p_188012_2_, EnumFacing p_188012_3_, float[] p_188012_4_, ModelRotation p_188012_5_, BlockPartRotation p_188012_6_, boolean p_188012_7_)
|
||||
{
|
||||
+ return makeQuadVertexData(p_188012_1_, p_188012_2_, p_188012_3_, p_188012_4_, (net.minecraftforge.client.model.ITransformation)p_188012_5_, p_188012_6_, p_188012_7_);
|
||||
+ return makeQuadVertexData(p_188012_1_, p_188012_2_, p_188012_3_, p_188012_4_, (net.minecraftforge.client.model.ITransformation)p_188012_5_, p_188012_6_, p_188012_7_);
|
||||
+ }
|
||||
+
|
||||
+ private int[] makeQuadVertexData(BlockFaceUV p_188012_1_, TextureAtlasSprite p_188012_2_, EnumFacing p_188012_3_, float[] p_188012_4_, net.minecraftforge.client.model.ITransformation p_188012_5_, BlockPartRotation p_188012_6_, boolean p_188012_7_)
|
||||
|
@ -54,7 +54,7 @@
|
|||
private void func_188015_a(int[] p_188015_1_, int p_188015_2_, EnumFacing p_188015_3_, BlockFaceUV p_188015_4_, float[] p_188015_5_, TextureAtlasSprite p_188015_6_, ModelRotation p_188015_7_, BlockPartRotation p_188015_8_, boolean p_188015_9_)
|
||||
{
|
||||
- EnumFacing enumfacing = p_188015_7_.rotateFace(p_188015_3_);
|
||||
+ fillVertexData(p_188015_1_, p_188015_2_, p_188015_3_, p_188015_4_, p_188015_5_, p_188015_6_, (net.minecraftforge.client.model.ITransformation)p_188015_7_, p_188015_8_, p_188015_9_);
|
||||
+ fillVertexData(p_188015_1_, p_188015_2_, p_188015_3_, p_188015_4_, p_188015_5_, p_188015_6_, (net.minecraftforge.client.model.ITransformation)p_188015_7_, p_188015_8_, p_188015_9_);
|
||||
+ }
|
||||
+
|
||||
+ private void fillVertexData(int[] p_188015_1_, int p_188015_2_, EnumFacing p_188015_3_, BlockFaceUV p_188015_4_, float[] p_188015_5_, TextureAtlasSprite p_188015_6_, net.minecraftforge.client.model.ITransformation p_188015_7_, BlockPartRotation p_188015_8_, boolean p_188015_9_)
|
||||
|
@ -73,7 +73,7 @@
|
|||
|
||||
public int func_188011_a(Vector3f p_188011_1_, EnumFacing p_188011_2_, int p_188011_3_, ModelRotation p_188011_4_)
|
||||
{
|
||||
+ return rotateVertex(p_188011_1_, p_188011_2_, p_188011_3_, (net.minecraftforge.client.model.ITransformation)p_188011_4_);
|
||||
+ return rotateVertex(p_188011_1_, p_188011_2_, p_188011_3_, (net.minecraftforge.client.model.ITransformation)p_188011_4_);
|
||||
+ }
|
||||
+
|
||||
+ public int rotateVertex(Vector3f p_188011_1_, EnumFacing p_188011_2_, int p_188011_3_, net.minecraftforge.client.model.ITransformation p_188011_4_)
|
||||
|
@ -86,7 +86,7 @@
|
|||
{
|
||||
- this.rotateScale(p_188011_1_, new Vector3f(0.5F, 0.5F, 0.5F), p_188011_4_.getMatrix4d(), new Vector3f(1.0F, 1.0F, 1.0F));
|
||||
- return p_188011_4_.rotateVertex(p_188011_2_, p_188011_3_);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.transform(p_188011_1_, p_188011_4_.getMatrix());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.transform(p_188011_1_, p_188011_4_.getMatrix());
|
||||
+ return p_188011_4_.rotate(p_188011_2_, p_188011_3_);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/ItemCameraTransforms.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/ItemCameraTransforms.java
|
||||
@@ -12,10 +12,13 @@
|
||||
@@ -12,6 +12,9 @@
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.util.vector.Quaternion;
|
||||
|
||||
|
@ -10,11 +10,6 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class ItemCameraTransforms
|
||||
{
|
||||
- public static final ItemCameraTransforms DEFAULT = new ItemCameraTransforms();
|
||||
+ public static final ItemCameraTransforms DEFAULT = new ItemCameraTransforms();
|
||||
public static float field_181690_b = 0.0F;
|
||||
public static float field_181691_c = 0.0F;
|
||||
public static float field_181692_d = 0.0F;
|
||||
@@ -39,6 +42,7 @@
|
||||
this(ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT);
|
||||
}
|
||||
|
|
|
@ -26,15 +26,15 @@
|
|||
+
|
||||
+ public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity)
|
||||
+ {
|
||||
+ net.minecraft.item.Item item = stack.getItem();
|
||||
+ if (item != null && item.func_185040_i())
|
||||
+ {
|
||||
+ ResourceLocation location = func_188021_a(stack, world, entity);
|
||||
+ if (location != null)
|
||||
+ {
|
||||
+ return Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getModel(new ModelResourceLocation(location, "inventory"));
|
||||
+ }
|
||||
+ }
|
||||
+ return originalModel;
|
||||
+ net.minecraft.item.Item item = stack.getItem();
|
||||
+ if (item != null && item.func_185040_i())
|
||||
+ {
|
||||
+ ResourceLocation location = func_188021_a(stack, world, entity);
|
||||
+ if (location != null)
|
||||
+ {
|
||||
+ return Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getModel(new ModelResourceLocation(location, "inventory"));
|
||||
+ }
|
||||
+ }
|
||||
+ return originalModel;
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
private void registerVariantNames()
|
||||
{
|
||||
+ this.variantNames.clear(); //FML clear this to prevent double ups.
|
||||
+ this.variantNames.clear(); //FML clear this to prevent double ups.
|
||||
this.variantNames.put(Item.getItemFromBlock(Blocks.stone), Lists.newArrayList(new String[] {"stone", "granite", "granite_smooth", "diorite", "diorite_smooth", "andesite", "andesite_smooth"}));
|
||||
this.variantNames.put(Item.getItemFromBlock(Blocks.dirt), Lists.newArrayList(new String[] {"dirt", "coarse_dirt", "podzol"}));
|
||||
this.variantNames.put(Item.getItemFromBlock(Blocks.planks), Lists.newArrayList(new String[] {"oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks"}));
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
private IBakedModel bakeModel(ModelBlock modelBlockIn, ModelRotation modelRotationIn, boolean uvLocked)
|
||||
{
|
||||
+ return bakeModel(modelBlockIn, (net.minecraftforge.client.model.ITransformation)modelRotationIn, uvLocked);
|
||||
+ return bakeModel(modelBlockIn, (net.minecraftforge.client.model.ITransformation)modelRotationIn, uvLocked);
|
||||
+ }
|
||||
+
|
||||
+ protected IBakedModel bakeModel(ModelBlock modelBlockIn, net.minecraftforge.client.model.ITransformation modelRotationIn, boolean uvLocked)
|
||||
|
@ -78,7 +78,7 @@
|
|||
|
||||
private BakedQuad makeBakedQuad(BlockPart p_177589_1_, BlockPartFace p_177589_2_, TextureAtlasSprite p_177589_3_, EnumFacing p_177589_4_, ModelRotation p_177589_5_, boolean p_177589_6_)
|
||||
{
|
||||
+ return makeBakedQuad(p_177589_1_, p_177589_2_, p_177589_3_, p_177589_4_, (net.minecraftforge.client.model.ITransformation)p_177589_5_, p_177589_6_);
|
||||
+ return makeBakedQuad(p_177589_1_, p_177589_2_, p_177589_3_, p_177589_4_, (net.minecraftforge.client.model.ITransformation)p_177589_5_, p_177589_6_);
|
||||
+ }
|
||||
+
|
||||
+ protected BakedQuad makeBakedQuad(BlockPart p_177589_1_, BlockPartFace p_177589_2_, TextureAtlasSprite p_177589_3_, EnumFacing p_177589_4_, net.minecraftforge.client.model.ITransformation p_177589_5_, boolean p_177589_6_)
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
- BlockRenderLayer blockrenderlayer1 = block.getBlockLayer();
|
||||
+ for(BlockRenderLayer blockrenderlayer1 : BlockRenderLayer.values()) {
|
||||
+ if(!block.canRenderInLayer(blockrenderlayer1)) continue;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderLayer(blockrenderlayer1);
|
||||
+ if(!block.canRenderInLayer(blockrenderlayer1)) continue;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderLayer(blockrenderlayer1);
|
||||
int j = blockrenderlayer1.ordinal();
|
||||
|
||||
if (block.getDefaultState().func_185901_i() != EnumBlockRenderType.INVISIBLE)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
public void doRender(T entity, double x, double y, double z, float entityYaw, float partialTicks)
|
||||
{
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Pre<T>(entity, this, x, y, z))) return;
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Pre<T>(entity, this, x, y, z))) return;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableCull();
|
||||
this.mainModel.swingProgress = this.getSwingProgress(entity, partialTicks);
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
public void renderName(T entity, double x, double y, double z)
|
||||
{
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Pre<T>(entity, this, x, y, z))) return;
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Specials.Pre<T>(entity, this, x, y, z))) return;
|
||||
if (this.canRenderName(entity))
|
||||
{
|
||||
double d0 = entity.getDistanceSqToEntity(this.renderManager.livingPlayer);
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
||||
@@ -204,7 +204,12 @@
|
||||
@@ -204,8 +204,13 @@
|
||||
this.playerRenderer = new RenderPlayer(this);
|
||||
this.skinMap.put("default", this.playerRenderer);
|
||||
this.skinMap.put("slim", new RenderPlayer(this, true));
|
||||
+ net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap);
|
||||
}
|
||||
+
|
||||
|
||||
+ public Map<String, RenderPlayer> getSkinMap() {
|
||||
+ return (Map<String, RenderPlayer>) java.util.Collections.unmodifiableMap(skinMap);
|
||||
+ }
|
||||
|
||||
+
|
||||
public void setRenderPosition(double renderPosXIn, double renderPosYIn, double renderPosZIn)
|
||||
{
|
||||
this.renderPosX = renderPosXIn;
|
||||
@@ -253,9 +258,9 @@
|
||||
IBlockState iblockstate = worldIn.getBlockState(new BlockPos(livingPlayerIn));
|
||||
Block block = iblockstate.getBlock();
|
||||
|
|
|
@ -58,10 +58,10 @@
|
|||
|
||||
+ if (textureatlassprite.hasCustomLoader(resourceManager, resourcelocation))
|
||||
+ {
|
||||
+ if (textureatlassprite.load(resourceManager, resourcelocation))
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (textureatlassprite.load(resourceManager, resourcelocation))
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
try
|
||||
|
@ -73,14 +73,14 @@
|
|||
{
|
||||
- logger.error((String)("Unable to parse metadata from " + resourcelocation), (Throwable)runtimeexception);
|
||||
+ //logger.error((String)("Unable to parse metadata from " + resourcelocation), (Throwable)runtimeexception);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackBrokenTexture(resourcelocation, runtimeexception.getMessage());
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackBrokenTexture(resourcelocation, runtimeexception.getMessage());
|
||||
continue;
|
||||
}
|
||||
catch (IOException ioexception)
|
||||
{
|
||||
- logger.error((String)("Using missing texture, unable to load " + resourcelocation), (Throwable)ioexception);
|
||||
+ //logger.error((String)("Using missing texture, unable to load " + resourcelocation), (Throwable)ioexception);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation);
|
||||
continue;
|
||||
}
|
||||
finally
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
{
|
||||
if (tileentityIn.getDistanceSq(this.entityX, this.entityY, this.entityZ) < tileentityIn.getMaxRenderDistanceSquared())
|
||||
{
|
||||
+ if(!tileentityIn.hasFastRenderer())
|
||||
+ {
|
||||
+ if(!tileentityIn.hasFastRenderer())
|
||||
+ {
|
||||
int i = this.worldObj.getCombinedLight(tileentityIn.getPos(), 0);
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ }
|
||||
BlockPos blockpos = tileentityIn.getPos();
|
||||
this.renderTileEntityAt(tileentityIn, (double)blockpos.getX() - staticPlayerX, (double)blockpos.getY() - staticPlayerY, (double)blockpos.getZ() - staticPlayerZ, partialTicks, destroyStage);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue