Skip to content

Commit

Permalink
build(version): 2.0.0->2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed Dec 24, 2024
1 parent c6750e2 commit e67162a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.aetherteam.cumulus.CumulusConfig;
import com.aetherteam.cumulus.mixin.mixins.client.accessor.MinecraftAccessor;
import com.aetherteam.cumulus.mixin.mixins.common.accessor.MinecraftServerAccessor;
import com.mojang.blaze3d.systems.TimerQuery;
import net.minecraft.client.CameraType;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.toasts.SystemToast;
Expand Down Expand Up @@ -137,9 +138,13 @@ public static void stopLevel(@Nullable Screen screen) {
* Sets up a menu through Cumulus and forces it as the current screen.
*/
public static void setMenu() {
MinecraftAccessor minecraftAccessor = (MinecraftAccessor) Minecraft.getInstance();
CumulusClient.MENU_HELPER.setShouldFade(false);
Screen screen = CumulusClient.MENU_HELPER.applyMenu(CumulusClient.MENU_HELPER.getActiveMenu());
if (screen != null) {
if (minecraftAccessor.cumulus$getCurrentFrameProfile() != null && !minecraftAccessor.cumulus$getCurrentFrameProfile().isDone()) {
TimerQuery.getInstance().ifPresent((timer) -> minecraftAccessor.cumulus$setCurrentFrameProfile(timer.endProfile()));
}
Minecraft.getInstance().forceSetScreen(screen);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.aetherteam.cumulus.mixin.mixins.client.accessor;

import com.mojang.blaze3d.systems.TimerQuery;
import net.minecraft.client.Minecraft;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
Expand All @@ -8,4 +9,10 @@
public interface MinecraftAccessor {
@Accessor("isLocalServer")
void cumulus$setIsLocalServer(boolean isLocalServer);

@Accessor("currentFrameProfile")
TimerQuery.FrameProfile cumulus$getCurrentFrameProfile();

@Accessor("currentFrameProfile")
void cumulus$setCurrentFrameProfile(TimerQuery.FrameProfile currentFrameProfile);
}
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Cumulus - 1.21.3-2.0.1

- Fix a crash from the timer frame profiler not having ended yet when loading a menu.

# Cumulus - 1.21.3-2.0.0

- Port to 1.21.3
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ parchment_version=2024.11.10
mod_id=cumulus_menus
mod_group=com.aetherteam.cumulus
mod_name=Cumulus
mod_version=2.0.0
mod_version=2.0.1
mod_license=LGPL-3.0
mod_url=https://modrinth.com/mod/cumulus
mod_update=https://github.com/The-Aether-Team/Cumulus/raw/1.21.3-develop/update.json
Expand Down
4 changes: 2 additions & 2 deletions update.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"1.20.1-recommended": "1.20.1-1.0.0-neoforge",
"1.20.2-recommended": "1.20.2-1.0.1-neoforge",
"1.20.4-recommended": "1.20.4-1.0.1-neoforge",
"1.21.1-recommended": "2.0.0",
"1.21.3-recommended": "2.0.0"
"1.21.1-recommended": "2.0.1",
"1.21.3-recommended": "2.0.1"
}
}

0 comments on commit e67162a

Please sign in to comment.