Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunekaer committed Jun 19, 2024
1 parent 2cebade commit ca672e7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [84.0.3]

### Fixed

- Fixed the mod not working on NeoForge and Forge

## [84.0.2]

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,4 @@ public class WorldOpenFlowsMixin {
private static Lifecycle alwaysStable(Lifecycle cycle) {
return Lifecycle.stable();
}

@ModifyVariable(
method = "loadLevel(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/serialization/Dynamic;ZZLjava/lang/Runnable;)V",
at = @At("STORE"),
ordinal = 3
)
public boolean no(boolean a) {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.sunekaer.yeetusexperimentus.fabric.mixin;

import com.mojang.serialization.Lifecycle;
import net.minecraft.client.gui.screens.worldselection.WorldOpenFlows;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;

@Mixin(WorldOpenFlows.class)
public class WorldOpenFlowsMixinFabric {
@ModifyVariable(
method = "loadLevel(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/serialization/Dynamic;ZZLjava/lang/Runnable;)V",
at = @At("STORE"),
ordinal = 3
)
public boolean no(boolean a) {
return false;
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.daemon=false
enabled_platforms=fabric,neoforge,forge

# Project
mod_version=84.0.2
mod_version=84.0.3
maven_group=com.sunekaer.mods
mod_name=YeetusExperimentus
mod_author=Sunekaer
Expand All @@ -23,8 +23,8 @@ forge_version=49.0.14
forge_gradle_version=6.0.18

# Neo
neoforge_version=20.4.80-beta
neoforge_gradle_version=7.0.80
neoforge_version=20.4.237
neoforge_gradle_version=7.0.145

# Fabric
fabric_api_version=0.91.2+1.20.4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.sunekaer.yeetusexperimentus.neo.mixin;

import net.minecraft.client.gui.screens.worldselection.WorldOpenFlows;
import org.spongepowered.asm.mixin.Debug;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;

@Debug(export = true)
@Mixin(value = WorldOpenFlows.class)
public abstract class WorldOpenFlowsMixinNeo {
@ModifyVariable(
method = "loadLevel(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/serialization/Dynamic;ZZLjava/lang/Runnable;Z)V",
at = @At("STORE"),
ordinal = 3
)
private boolean no(boolean original) {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
"required": true,
"package": "com.sunekaer.yeetusexperimentus.neo.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"client": [
"PrimaryLevelDataMixinNeo"
],
"mixins": [],
"client": ["PrimaryLevelDataMixinNeo", "WorldOpenFlowsMixinNeo"],
"injectors": {
"defaultRequire": 1
},
"minVersion": "0.8"
}
}

0 comments on commit ca672e7

Please sign in to comment.