-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.21.x' into 1.21-water-fix
- Loading branch information
Showing
30 changed files
with
495 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
patches/net/minecraft/client/gui/font/GlyphRenderTypes.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- a/net/minecraft/client/gui/font/GlyphRenderTypes.java | ||
+++ b/net/minecraft/client/gui/font/GlyphRenderTypes.java | ||
@@ -7,22 +_,42 @@ | ||
import net.neoforged.api.distmarker.OnlyIn; | ||
|
||
@OnlyIn(Dist.CLIENT) | ||
-public record GlyphRenderTypes(RenderType normal, RenderType seeThrough, RenderType polygonOffset) { | ||
+public record GlyphRenderTypes(RenderType normal, RenderType seeThrough, RenderType polygonOffset, RenderType normalBlur, RenderType seeThroughBlur, RenderType polygonOffsetBlur) { | ||
+ /** @deprecated Neo: Use {@link GlyphRenderTypes(RenderType,RenderType,RenderType,RenderType,RenderType,RenderType)} instead */ | ||
+ @Deprecated | ||
+ public GlyphRenderTypes(RenderType normal, RenderType seeThrough, RenderType polygonOffset) { | ||
+ this(normal, seeThrough, polygonOffset, normal, seeThrough, polygonOffset); | ||
+ } | ||
+ | ||
public static GlyphRenderTypes createForIntensityTexture(ResourceLocation p_285411_) { | ||
return new GlyphRenderTypes( | ||
RenderType.textIntensity(p_285411_), RenderType.textIntensitySeeThrough(p_285411_), RenderType.textIntensityPolygonOffset(p_285411_) | ||
+ , net.neoforged.neoforge.client.NeoForgeRenderTypes.getTextIntensityFiltered(p_285411_), | ||
+ net.neoforged.neoforge.client.NeoForgeRenderTypes.getTextIntensitySeeThroughFiltered(p_285411_), | ||
+ net.neoforged.neoforge.client.NeoForgeRenderTypes.getTextIntensityPolygonOffsetFiltered(p_285411_) | ||
); | ||
} | ||
|
||
public static GlyphRenderTypes createForColorTexture(ResourceLocation p_285486_) { | ||
- return new GlyphRenderTypes(RenderType.text(p_285486_), RenderType.textSeeThrough(p_285486_), RenderType.textPolygonOffset(p_285486_)); | ||
+ return new GlyphRenderTypes(RenderType.text(p_285486_), RenderType.textSeeThrough(p_285486_), RenderType.textPolygonOffset(p_285486_), | ||
+ net.neoforged.neoforge.client.NeoForgeRenderTypes.getTextFiltered(p_285486_), | ||
+ net.neoforged.neoforge.client.NeoForgeRenderTypes.getTextSeeThroughFiltered(p_285486_), | ||
+ net.neoforged.neoforge.client.NeoForgeRenderTypes.getTextPolygonOffsetFiltered(p_285486_) | ||
+ ); | ||
} | ||
|
||
public RenderType select(Font.DisplayMode p_285259_) { | ||
+ return this.select(p_285259_, false); | ||
+ } | ||
+ | ||
+ /** | ||
+ * Neo: returns the {@link RenderType} to use for the given {@link Font.DisplayMode} and blur setting | ||
+ */ | ||
+ public RenderType select(Font.DisplayMode p_285259_, boolean blur) { | ||
return switch (p_285259_) { | ||
- case NORMAL -> this.normal; | ||
- case SEE_THROUGH -> this.seeThrough; | ||
- case POLYGON_OFFSET -> this.polygonOffset; | ||
+ case NORMAL -> blur ? this.normalBlur : this.normal; | ||
+ case SEE_THROUGH -> blur ? this.seeThroughBlur : this.seeThrough; | ||
+ case POLYGON_OFFSET -> blur ? this.polygonOffsetBlur : this.polygonOffset; | ||
}; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
patches/net/minecraft/client/gui/font/glyphs/BakedGlyph.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- a/net/minecraft/client/gui/font/glyphs/BakedGlyph.java | ||
+++ b/net/minecraft/client/gui/font/glyphs/BakedGlyph.java | ||
@@ -75,6 +_,15 @@ | ||
p_95223_.addVertex(p_254370_, p_95221_.x0, p_95221_.y1, p_95221_.depth).setColor(p_95221_.color).setUv(this.u1, this.v0).setLight(p_95224_); | ||
} | ||
|
||
+ /** | ||
+ * Neo: returns the {@link RenderType} to use for the given {@link Font.DisplayMode} and blur setting | ||
+ */ | ||
+ public RenderType renderType(Font.DisplayMode p_181388_, boolean blur) { | ||
+ return this.renderTypes.select(p_181388_, blur); | ||
+ } | ||
+ | ||
+ /** @deprecated Neo: Use {@link #renderType(Font.DisplayMode, boolean)} instead */ | ||
+ @Deprecated | ||
public RenderType renderType(Font.DisplayMode p_181388_) { | ||
return this.renderTypes.select(p_181388_); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
patches/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
--- a/net/minecraft/world/inventory/FurnaceResultSlot.java | ||
+++ b/net/minecraft/world/inventory/FurnaceResultSlot.java | ||
@@ -49,5 +_,6 @@ | ||
@@ -48,6 +_,9 @@ | ||
abstractfurnaceblockentity.awardUsedRecipesAndPopExperience(serverplayer); | ||
} | ||
|
||
+ if (this.removeCount != 0) { | ||
+ net.neoforged.neoforge.event.EventHooks.firePlayerSmeltedEvent(this.player, p_39558_, this.removeCount); | ||
+ } | ||
this.removeCount = 0; | ||
+ net.neoforged.neoforge.event.EventHooks.firePlayerSmeltedEvent(this.player, p_39558_); | ||
} | ||
} |
Oops, something went wrong.