Skip to content

Commit fb4cdc4

Browse files
fix: render leaking
1 parent 8cf7939 commit fb4cdc4

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [21.1.2]
2+
3+
### Fixed
4+
5+
- Render leaking causing inventory and other rendering layers to break
6+
17
## [21.1.1]
28

39
### Fixed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ loader_version_range=[4,)
1616
mod_id=pop
1717
mod_name=Pop
1818
mod_license=Mozilla Public License 2.0
19-
mod_version=21.1.1
19+
mod_version=21.1.2
2020
mod_group_id=pro.mikey.mods
2121
mod_authors=ErrorMikey
2222
mod_description=Pop is a small helper mod for modpack developers to allow for more screen locations to display information on screen in a command driven, or kubejs driven way.

src/main/java/pro/mikey/mods/pop/client/pops/FadeInFadeOutRender.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@
1414
*/
1515
public class FadeInFadeOutRender implements IPopRender {
1616
float lastOpacity = 0.0F;
17-
float lastXOffset = -5.0f;
1817

1918
@Override
2019
public void render(PopData pop, GuiGraphics graphics, DeltaTracker deltaTracker) {
2120
pop.tracker().onRenderFrame();
2221
var stage = pop.tracker().getStage();
23-
var durationInTicks = pop.tracker().duration();
2422
var currentStageCompletion = pop.tracker().currentStageCompletion();
2523

2624
var delta = deltaTracker.getGameTimeDeltaTicks();
27-
long gameTime = Minecraft.getInstance().level.getGameTime();
2825

2926
// Fade in and out, smoothly by lerping the opacity
3027
float opacity = 1.0f;
@@ -33,12 +30,6 @@ public void render(PopData pop, GuiGraphics graphics, DeltaTracker deltaTracker)
3330
float nextOpacity = stage == AnimStage.IN ? currentStageCompletion / 100.0F : 1.0F - (currentStageCompletion / 100.0F);
3431
lastOpacity = nextOpacity;
3532
opacity = Mth.lerp(delta, lastOpacity, nextOpacity);
36-
37-
// Slide in from negative 5f, slide out to pos 5f
38-
// float nextXOffset = stage == AnimStage.IN ? (currentStageCompletion / 100.0F * 5) : 5.0F - (currentStageCompletion / 100.0F * 5);
39-
// lastXOffset = nextXOffset;
40-
//
41-
// xOffset = Mth.lerp(delta, lastXOffset, nextXOffset);
4233
}
4334

4435
PoseStack pose = graphics.pose();
@@ -54,7 +45,7 @@ public void render(PopData pop, GuiGraphics graphics, DeltaTracker deltaTracker)
5445
int y = location[1];
5546

5647
graphics.drawString(Minecraft.getInstance().font, pop.content(), x, (int) (y + xOffset), 0xFFFFFF);
57-
48+
pose.popPose();
5849
RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
5950

6051
// Just for debugging

0 commit comments

Comments
 (0)