Skip to content

Commit c3ce5bd

Browse files
Fix some mismatch patched
1 parent 8a129eb commit c3ce5bd

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414

1515
- float f3 = this.mc.world.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity()));
16-
+ float f3 = this.mc.world.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity().getPositionEyes(1.0F)));
16+
+ float f3 = this.mc.world.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity().getPositionEyes(1.0F))); // Forge: fix MC-51150
1717
float f4 = (float)this.mc.gameSettings.renderDistanceChunks / 32.0F;
1818
float f2 = f3 * (1.0F - f4) + f4;
1919
this.fogColor1 = this.fogColor1 + (f2 - this.fogColor1) * 0.1F;
@@ -22,7 +22,7 @@
2222
if (d3 < d2 || d2 == 0.0)
2323
{
2424
- if (entity1.getLowestRidingEntity() == entity.getLowestRidingEntity())
25-
+ if (entity1.getLowestRidingEntity() == entity.getLowestRidingEntity() && entity1.canRiderInteract())
25+
+ if (entity1.getLowestRidingEntity() == entity.getLowestRidingEntity() && !entity1.canRiderInteract())
2626
{
2727
if (d2 == 0.0)
2828
{

patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,16 @@
124124
if (this.mc.world.provider.isSurfaceWorld())
125125
{
126126
if (this.mc.gameSettings.shouldRenderClouds() == 2)
127-
@@ -1945,7 +1968,8 @@
128-
float f1 = (float)(i >> 8 & 0xFF) / 255.0F;
129-
float f2 = (float)(i & 0xFF) / 255.0F;
130-
GlStateManager.color(f, f1, f2, (float)d1);
131-
- GlStateManager.doPolygonOffset(-3.0F, -3.0F);
132-
+ // FORGE: Fix MC-234
133-
+ GlStateManager.doPolygonOffset(-3.0F, -10.0F);
134-
GlStateManager.enablePolygonOffset();
135-
GlStateManager.alphaFunc(516, 0.1F);
136-
GlStateManager.enableAlpha();
137-
@@ -2102,8 +2126,13 @@
127+
@@ -2062,7 +2085,7 @@
128+
);
129+
GlStateManager.enableBlend();
130+
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.5F);
131+
- GlStateManager.doPolygonOffset(-3.0F, -3.0F);
132+
+ GlStateManager.doPolygonOffset(-1.0F, -10.0F); // FORGE: Fix MC-234
133+
GlStateManager.enablePolygonOffset();
134+
GlStateManager.alphaFunc(516, 0.1F);
135+
GlStateManager.enableAlpha();
136+
@@ -2102,8 +2125,13 @@
138137
double d4 = (double)blockpos.getY() - d1;
139138
double d5 = (double)blockpos.getZ() - d2;
140139
Block block = this.world.getBlockState(blockpos).getBlock();
@@ -149,7 +148,7 @@
149148
{
150149
if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0)
151150
{
152-
@@ -2836,7 +2865,7 @@
151+
@@ -2836,7 +2864,7 @@
153152

154153
if (block.getDefaultState().getMaterial() != Material.AIR)
155154
{

patches/minecraft/net/minecraft/client/renderer/block/model/ModelBakery.java.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@
9191
}
9292

9393
protected List<String> getVariantNames(Item stack)
94-
@@ -714,7 +730,7 @@
94+
@@ -713,7 +729,7 @@
95+
9596
protected ResourceLocation getItemLocation(String location)
9697
{
97-
ResourceLocation resourcelocation = new ResourceLocation(location);
98-
- return new ResourceLocation(resourcelocation.getNamespace(), "item/" + resourcelocation.getPath());
99-
+ return new ResourceLocation(resourcelocation.getNamespace(), "item/" + resourcelocation.getPath().replaceAll("#.*", ""));
98+
- ResourceLocation resourcelocation = new ResourceLocation(location);
99+
+ ResourceLocation resourcelocation = new ResourceLocation(location.replaceAll("#.*", ""));
100+
return new ResourceLocation(resourcelocation.getNamespace(), "item/" + resourcelocation.getPath());
100101
}
101102

102-
private void bakeBlockModels()
103103
@@ -818,7 +834,7 @@
104104
for (Entry<String, ResourceLocation> entry : this.itemLocations.entrySet())
105105
{

0 commit comments

Comments
 (0)