Skip to content

Commit

Permalink
port to 1.20.3-1.20.4, with parts for 1.20.5+
Browse files Browse the repository at this point in the history
  • Loading branch information
tildejustin committed Nov 20, 2024
1 parent af297fa commit 2e8888c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# More versions available at: https://grayray75.github.io/LegacyFabric-Versions/
# Fabric Properties
minecraft_version = 1.20.4
minecraft_version_range = 1.20.3-1.21.1
minecraft_version_range = 1.20.3-1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.14.24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand All @@ -22,8 +22,9 @@ protected TitleScreenMixin(Text title) {
super(title);
}


@Inject(method = "initWidgetsNormal", at = @At(value = "TAIL"))
// method_25423 -> init
@Dynamic
@Inject(method = {"initWidgetsNormal", "Lnet/minecraft/client/gui/screen/TitleScreen;method_25426()V"}, at = @At(value = "TAIL"), require = 1)
private void custommapresetter$addTitleScreenButton(CallbackInfo ci) {
if (!CustomMapResetter.autoreset) {
CustomMapResetter.running = false;
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/custom-map-resetter.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ accessible method net/minecraft/client/MinecraftClient render (Z)V
accessible field net/minecraft/client/gui/widget/ButtonWidget DEFAULT_NARRATION_SUPPLIER Lnet/minecraft/client/gui/widget/ButtonWidget$NarrationSupplier;
accessible method net/minecraft/client/gui/widget/ButtonWidget <init> (IIIILnet/minecraft/text/Text;Lnet/minecraft/client/gui/widget/ButtonWidget$PressAction;Lnet/minecraft/client/gui/widget/ButtonWidget$NarrationSupplier;)V
accessible method net/minecraft/client/gui/screen/world/WorldListWidget load ()V
accessible field net/minecraft/client/gui/screen/world/WorldListWidget$WorldEntry level Lnet/minecraft/world/level/storage/LevelSummary;
accessible field net/minecraft/client/gui/screen/world/WorldListWidget$WorldEntry level Lnet/minecraft/world/level/storage/LevelSummary;
accessible method net/minecraft/server/integrated/IntegratedServerLoader createSession (Ljava/lang/String;)Lnet/minecraft/world/level/storage/LevelStorage$Session;

0 comments on commit 2e8888c

Please sign in to comment.