-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rendering of non-translucent particles behind translucent geometry (
#977)
- Loading branch information
Showing
3 changed files
with
48 additions
and
7 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
36 changes: 36 additions & 0 deletions
36
patches/net/minecraft/client/particle/ParticleRenderType.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,36 @@ | ||
--- a/net/minecraft/client/particle/ParticleRenderType.java | ||
+++ b/net/minecraft/client/particle/ParticleRenderType.java | ||
@@ -52,6 +_,11 @@ | ||
public String toString() { | ||
return "PARTICLE_SHEET_OPAQUE"; | ||
} | ||
+ | ||
+ @Override | ||
+ public boolean isTranslucent() { | ||
+ return false; | ||
+ } | ||
}; | ||
ParticleRenderType PARTICLE_SHEET_TRANSLUCENT = new ParticleRenderType() { | ||
@Override | ||
@@ -91,6 +_,11 @@ | ||
public String toString() { | ||
return "PARTICLE_SHEET_LIT"; | ||
} | ||
+ | ||
+ @Override | ||
+ public boolean isTranslucent() { | ||
+ return false; | ||
+ } | ||
}; | ||
ParticleRenderType CUSTOM = new ParticleRenderType() { | ||
@Override | ||
@@ -126,4 +_,9 @@ | ||
void begin(BufferBuilder p_107436_, TextureManager p_107437_); | ||
|
||
void end(Tesselator p_107438_); | ||
+ | ||
+ /** {@return whether this type renders before or after the translucent chunk layer} */ | ||
+ default boolean isTranslucent() { | ||
+ return true; | ||
+ } | ||
} |
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