EntityRenderer, StringTranslate rejects fixed.
This commit is contained in:
parent
3a5b7427a1
commit
b77b036459
3 changed files with 80 additions and 97 deletions
|
@ -1,5 +1,14 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
--- ../src-base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
||||||
|
@@ -423,7 +423,7 @@
|
||||||
|
|
||||||
|
if (d3 < d2 || d2 == 0.0D)
|
||||||
|
{
|
||||||
|
- if (entity1 == entity.ridingEntity)
|
||||||
|
+ if (entity1 == entity.ridingEntity && !entity.canRiderInteract())
|
||||||
|
{
|
||||||
|
if (d2 == 0.0D)
|
||||||
|
{
|
||||||
@@ -580,14 +580,8 @@
|
@@ -580,14 +580,8 @@
|
||||||
{
|
{
|
||||||
BlockPos blockpos = new BlockPos(entity);
|
BlockPos blockpos = new BlockPos(entity);
|
||||||
|
@ -44,6 +53,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.translate(0.0F, -f, 0.0F);
|
GlStateManager.translate(0.0F, -f, 0.0F);
|
||||||
|
@@ -1107,7 +1104,7 @@
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
- this.mc.currentScreen.drawScreen(k1, l1, p_181560_1_);
|
||||||
|
+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.mc.currentScreen, k1, l1, p_181560_1_);
|
||||||
|
}
|
||||||
|
catch (Throwable throwable)
|
||||||
|
{
|
||||||
@@ -1171,7 +1168,7 @@
|
@@ -1171,7 +1168,7 @@
|
||||||
|
|
||||||
if (this.mc.playerController.getCurrentGameType() == WorldSettings.GameType.SPECTATOR)
|
if (this.mc.playerController.getCurrentGameType() == WorldSettings.GameType.SPECTATOR)
|
||||||
|
@ -53,7 +71,17 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1333,6 +1330,7 @@
|
@@ -1321,7 +1318,9 @@
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
RenderHelper.enableStandardItemLighting();
|
||||||
|
this.mc.mcProfiler.endStartSection("entities");
|
||||||
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
||||||
|
renderglobal.renderEntities(entity, icamera, partialTicks);
|
||||||
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
||||||
|
RenderHelper.disableStandardItemLighting();
|
||||||
|
this.disableLightmap();
|
||||||
|
GlStateManager.matrixMode(5888);
|
||||||
|
@@ -1333,6 +1332,7 @@
|
||||||
EntityPlayer entityplayer = (EntityPlayer)entity;
|
EntityPlayer entityplayer = (EntityPlayer)entity;
|
||||||
GlStateManager.disableAlpha();
|
GlStateManager.disableAlpha();
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.mc.mcProfiler.endStartSection("outline");
|
||||||
|
@ -61,7 +89,31 @@
|
||||||
renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, partialTicks);
|
renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, partialTicks);
|
||||||
GlStateManager.enableAlpha();
|
GlStateManager.enableAlpha();
|
||||||
}
|
}
|
||||||
@@ -1399,8 +1397,12 @@
|
@@ -1346,6 +1346,7 @@
|
||||||
|
EntityPlayer entityplayer1 = (EntityPlayer)entity;
|
||||||
|
GlStateManager.disableAlpha();
|
||||||
|
this.mc.mcProfiler.endStartSection("outline");
|
||||||
|
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer1, mc.objectMouseOver, 0, entityplayer1.getHeldItem(), partialTicks))
|
||||||
|
renderglobal.drawSelectionBox(entityplayer1, this.mc.objectMouseOver, 0, partialTicks);
|
||||||
|
GlStateManager.enableAlpha();
|
||||||
|
}
|
||||||
|
@@ -1387,6 +1388,15 @@
|
||||||
|
GlStateManager.shadeModel(7425);
|
||||||
|
this.mc.mcProfiler.endStartSection("translucent");
|
||||||
|
renderglobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double)partialTicks, pass, entity);
|
||||||
|
+ if (!this.debugView) //Only render if render pass 0 happens as well.
|
||||||
|
+ {
|
||||||
|
+ RenderHelper.enableStandardItemLighting();
|
||||||
|
+ this.mc.mcProfiler.endStartSection("entities");
|
||||||
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(1);
|
||||||
|
+ renderglobal.renderEntities(entity, icamera, partialTicks);
|
||||||
|
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(-1);
|
||||||
|
+ RenderHelper.disableStandardItemLighting();
|
||||||
|
+ }
|
||||||
|
GlStateManager.shadeModel(7424);
|
||||||
|
GlStateManager.depthMask(true);
|
||||||
|
GlStateManager.enableCull();
|
||||||
|
@@ -1399,8 +1409,12 @@
|
||||||
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
this.renderCloudsCheck(renderglobal, partialTicks, pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +126,21 @@
|
||||||
if (this.renderHand)
|
if (this.renderHand)
|
||||||
{
|
{
|
||||||
GlStateManager.clear(256);
|
GlStateManager.clear(256);
|
||||||
@@ -1837,6 +1839,13 @@
|
@@ -1512,6 +1526,13 @@
|
||||||
|
|
||||||
|
protected void renderRainSnow(float partialTicks)
|
||||||
|
{
|
||||||
|
+ net.minecraftforge.client.IRenderHandler renderer = this.mc.theWorld.provider.getWeatherRenderer();
|
||||||
|
+ if (renderer != null)
|
||||||
|
+ {
|
||||||
|
+ renderer.render(partialTicks, this.mc.theWorld, mc);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
float f = this.mc.theWorld.getRainStrength(partialTicks);
|
||||||
|
|
||||||
|
if (f > 0.0F)
|
||||||
|
@@ -1837,6 +1858,13 @@
|
||||||
this.fogColorBlue = f7;
|
this.fogColorBlue = f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +154,7 @@
|
||||||
GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F);
|
GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1855,6 +1864,10 @@
|
@@ -1855,6 +1883,10 @@
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, entity, partialTicks);
|
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, entity, partialTicks);
|
||||||
|
|
||||||
|
@ -99,11 +165,11 @@
|
||||||
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(Potion.blindness))
|
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(Potion.blindness))
|
||||||
{
|
{
|
||||||
float f1 = 5.0F;
|
float f1 = 5.0F;
|
||||||
@@ -1932,6 +1945,7 @@
|
@@ -1932,6 +1964,7 @@
|
||||||
GlStateManager.setFogStart(f * 0.05F);
|
GlStateManager.setFogStart(f * 0.05F);
|
||||||
GlStateManager.setFogEnd(Math.min(f, 192.0F) * 0.5F);
|
GlStateManager.setFogEnd(Math.min(f, 192.0F) * 0.5F);
|
||||||
}
|
}
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(this, entity, block, partialTicks, p_78468_1_, f1);
|
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(this, entity, block, partialTicks, p_78468_1_, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.enableColorMaterial();
|
GlStateManager.enableColorMaterial();
|
||||||
|
|
|
@ -1,17 +1,10 @@
|
||||||
++++ REJECTED PATCH 1
|
--- ../src-base/minecraft/net/minecraft/util/StringTranslate.java
|
||||||
{
|
+++ ../src-work/minecraft/net/minecraft/util/StringTranslate.java
|
||||||
private static final Pattern numericVariablePattern = Pattern.compile("%(\\d+\\$)?[\\d\\.]*[df]");
|
@@ -24,9 +24,29 @@
|
||||||
private static final Splitter equalSignSplitter = Splitter.on('=').limit(2);
|
|
||||||
+ private final Map languageList;
|
|
||||||
private static StringTranslate instance = new StringTranslate();
|
|
||||||
- private final Map languageList = Maps.newHashMap();
|
|
||||||
private long lastUpdateTimeInMilliseconds;
|
|
||||||
private static final String __OBFID = "CL_00001212";
|
|
||||||
|
|
||||||
public StringTranslate()
|
public StringTranslate()
|
||||||
{
|
{
|
||||||
+ InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
+ InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||||
+ languageList = Maps.newHashMap();
|
|
||||||
+ inject(this, inputstream);
|
+ inject(this, inputstream);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -35,12 +28,10 @@
|
||||||
- InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
- InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||||
+ inputstream = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(table, inputstream);
|
+ inputstream = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(table, inputstream);
|
||||||
+ if (inputstream == null) return table;
|
+ if (inputstream == null) return table;
|
||||||
+
|
|
||||||
Iterator iterator = IOUtils.readLines(inputstream, Charsets.UTF_8).iterator();
|
|
||||||
|
|
||||||
while (iterator.hasNext())
|
for (String s : IOUtils.readLines(inputstream, Charsets.UTF_8))
|
||||||
++++ END PATCH
|
{
|
||||||
++++ REJECTED PATCH 2
|
@@ -38,17 +58,17 @@
|
||||||
{
|
{
|
||||||
String s1 = astring[0];
|
String s1 = astring[0];
|
||||||
String s2 = numericVariablePattern.matcher(astring[1]).replaceAll("%$1s");
|
String s2 = numericVariablePattern.matcher(astring[1]).replaceAll("%$1s");
|
||||||
|
@ -52,8 +43,8 @@
|
||||||
|
|
||||||
- this.lastUpdateTimeInMilliseconds = System.currentTimeMillis();
|
- this.lastUpdateTimeInMilliseconds = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
- catch (IOException ioexception)
|
- catch (IOException var7)
|
||||||
+ catch (Exception ioexception)
|
+ catch (Exception var7)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -61,4 +52,3 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
static StringTranslate getInstance()
|
static StringTranslate getInstance()
|
||||||
++++ END PATCH
|
|
|
@ -1,73 +0,0 @@
|
||||||
++++ REJECTED PATCH 1
|
|
||||||
|
|
||||||
if (d3 < d2 || d2 == 0.0D)
|
|
||||||
{
|
|
||||||
- if (entity1 == entity.ridingEntity)
|
|
||||||
+ if (entity1 == entity.ridingEntity && !entity.canRiderInteract())
|
|
||||||
{
|
|
||||||
if (d2 == 0.0D)
|
|
||||||
{
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 4
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
- this.mc.currentScreen.drawScreen(l, i1, partialTicks);
|
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.mc.currentScreen, l, i1, partialTicks);
|
|
||||||
}
|
|
||||||
catch (Throwable throwable)
|
|
||||||
{
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 6
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
RenderHelper.enableStandardItemLighting();
|
|
||||||
this.mc.mcProfiler.endStartSection("entities");
|
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
|
||||||
renderglobal.renderEntities(entity, frustum, partialTicks);
|
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
|
|
||||||
RenderHelper.disableStandardItemLighting();
|
|
||||||
this.disableLightmap();
|
|
||||||
GlStateManager.matrixMode(5888);
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 8
|
|
||||||
entityplayer = (EntityPlayer)entity;
|
|
||||||
GlStateManager.disableAlpha();
|
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
|
||||||
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.getHeldItem(), partialTicks))
|
|
||||||
renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, partialTicks);
|
|
||||||
GlStateManager.enableAlpha();
|
|
||||||
}
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 9
|
|
||||||
renderglobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double)partialTicks, pass, entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (!this.debugView) //Only render if render pass 0 happens as well.
|
|
||||||
+ {
|
|
||||||
+ RenderHelper.enableStandardItemLighting();
|
|
||||||
+ this.mc.mcProfiler.endStartSection("entities");
|
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(1);
|
|
||||||
+ renderglobal.renderEntities(entity, frustum, partialTicks);
|
|
||||||
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(-1);
|
|
||||||
+ RenderHelper.disableStandardItemLighting();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
GlStateManager.shadeModel(7424);
|
|
||||||
GlStateManager.depthMask(true);
|
|
||||||
GlStateManager.enableCull();
|
|
||||||
++++ END PATCH
|
|
||||||
++++ REJECTED PATCH 11
|
|
||||||
|
|
||||||
protected void renderRainSnow(float partialTicks)
|
|
||||||
{
|
|
||||||
+ net.minecraftforge.client.IRenderHandler renderer = this.mc.theWorld.provider.getWeatherRenderer();
|
|
||||||
+ if (renderer != null)
|
|
||||||
+ {
|
|
||||||
+ renderer.render(partialTicks, this.mc.theWorld, mc);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
float f1 = this.mc.theWorld.getRainStrength(partialTicks);
|
|
||||||
|
|
||||||
if (f1 > 0.0F)
|
|
||||||
++++ END PATCH
|
|
Loading…
Reference in a new issue