chore: update to 1.21
This commit is contained in:
parent
184fdb4c34
commit
d4e40b52c8
|
@ -10,7 +10,6 @@ The following features are implemented:
|
||||||
- Enchantments aren't capped at 255
|
- Enchantments aren't capped at 255
|
||||||
- The EULA file is ignored
|
- The EULA file is ignored
|
||||||
- Container screens aren't closed when moving away from them
|
- Container screens aren't closed when moving away from them
|
||||||
- The mending enchantment can be applied at the same time as others
|
|
||||||
- Blocks can be broken at any distance
|
- Blocks can be broken at any distance
|
||||||
- Remove movement checks ("fixes" rubber banding)
|
- Remove movement checks ("fixes" rubber banding)
|
||||||
- Villagers follow emerald blocks
|
- Villagers follow emerald blocks
|
|
@ -6,11 +6,11 @@ allprojects { group = "io.gitlab.jfronny" }
|
||||||
base.archivesName = "yescheat"
|
base.archivesName = "yescheat"
|
||||||
|
|
||||||
jfMod {
|
jfMod {
|
||||||
minecraftVersion = "1.20.5"
|
minecraftVersion = "1.21"
|
||||||
yarn("build.1")
|
yarn("build.1")
|
||||||
loaderVersion = "0.15.10"
|
loaderVersion = "0.15.11"
|
||||||
libJfVersion = "3.15.5"
|
libJfVersion = "3.16.0"
|
||||||
fabricApiVersion = "0.97.6+1.20.5"
|
fabricApiVersion = "0.100.1+1.21"
|
||||||
|
|
||||||
modrinth {
|
modrinth {
|
||||||
projectId = "yescheat"
|
projectId = "yescheat"
|
||||||
|
@ -25,7 +25,7 @@ dependencies {
|
||||||
// Dev env
|
// Dev env
|
||||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny")
|
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny")
|
||||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil")
|
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil")
|
||||||
modLocalRuntime("com.terraformersmc:modmenu:10.0.0-beta.1")
|
modLocalRuntime("com.terraformersmc:modmenu:11.0.0-beta.1")
|
||||||
// for modmenu
|
// for modmenu
|
||||||
modLocalRuntime("net.fabricmc.fabric-api:fabric-resource-loader-v0")
|
modLocalRuntime("net.fabricmc.fabric-api:fabric-resource-loader-v0")
|
||||||
modLocalRuntime("net.fabricmc.fabric-api:fabric-screen-api-v1")
|
modLocalRuntime("net.fabricmc.fabric-api:fabric-screen-api-v1")
|
||||||
|
|
|
@ -9,7 +9,6 @@ public class Cfg {
|
||||||
@Entry public static boolean uncapEnchants = true;
|
@Entry public static boolean uncapEnchants = true;
|
||||||
@Entry public static boolean unblockChests = true;
|
@Entry public static boolean unblockChests = true;
|
||||||
@Entry public static boolean distantContainers = true;
|
@Entry public static boolean distantContainers = true;
|
||||||
@Entry public static boolean unlockMending = true;
|
|
||||||
@Entry public static boolean distantBreaking = true;
|
@Entry public static boolean distantBreaking = true;
|
||||||
@Entry public static boolean villagersFollowEmeralds = true;
|
@Entry public static boolean villagersFollowEmeralds = true;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ public class Plugin implements IMixinConfigPlugin {
|
||||||
case "UncapEnchants", "UncapEnchants$Builder" -> Cfg.uncapEnchants;
|
case "UncapEnchants", "UncapEnchants$Builder" -> Cfg.uncapEnchants;
|
||||||
case "IgnoreEula" -> true;
|
case "IgnoreEula" -> true;
|
||||||
case "DistantContainers3x3", "DistantContainerXx9" -> Cfg.distantContainers;
|
case "DistantContainers3x3", "DistantContainerXx9" -> Cfg.distantContainers;
|
||||||
case "UnlockMendingInfinity" -> Cfg.unlockMending;
|
|
||||||
case "DistantBreaking" -> Cfg.distantBreaking;
|
case "DistantBreaking" -> Cfg.distantBreaking;
|
||||||
case "RemoveRubberbanding" -> Cfg.antiRubberband;
|
case "RemoveRubberbanding" -> Cfg.antiRubberband;
|
||||||
case "VillagersFollowEmeralds1", "VillagersFollowEmeralds2" -> Cfg.villagersFollowEmeralds;
|
case "VillagersFollowEmeralds1", "VillagersFollowEmeralds2" -> Cfg.villagersFollowEmeralds;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.util.Identifier;
|
||||||
public class YesCheat implements ModInitializer {
|
public class YesCheat implements ModInitializer {
|
||||||
public static final String MOD_ID = "yescheat";
|
public static final String MOD_ID = "yescheat";
|
||||||
|
|
||||||
private static final Identifier TEMPTATIONS_ID = new Identifier(MOD_ID, "villager_temptations");
|
private static final Identifier TEMPTATIONS_ID = Identifier.of(MOD_ID, "villager_temptations");
|
||||||
public static SensorType<TemptationsSensor> VILLAGER_TEMPTATIONS;
|
public static SensorType<TemptationsSensor> VILLAGER_TEMPTATIONS;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,17 +15,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
@Mixin(ItemEnchantmentsComponent.class)
|
@Mixin(ItemEnchantmentsComponent.class)
|
||||||
public class UncapEnchants {
|
public class UncapEnchants {
|
||||||
@Final @Mutable @Shadow public static int MAX_ENCHANTMENT_LEVEL;
|
|
||||||
@ModifyArg(method = "<clinit>", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/Codec;intRange(II)Lcom/mojang/serialization/Codec;", remap = false), index = 1)
|
@ModifyArg(method = "<clinit>", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/Codec;intRange(II)Lcom/mojang/serialization/Codec;", remap = false), index = 1)
|
||||||
private static int injectMaxEnchantmentLevel(int x) {
|
private static int injectMaxEnchantmentLevel(int x) {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "<clinit>", at = @At("TAIL"))
|
|
||||||
private static void ae(CallbackInfo ci) {
|
|
||||||
MAX_ENCHANTMENT_LEVEL = Integer.MAX_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;object2IntEntrySet()Lit/unimi/dsi/fastutil/objects/Object2IntMap$FastEntrySet;", remap = false))
|
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;object2IntEntrySet()Lit/unimi/dsi/fastutil/objects/Object2IntMap$FastEntrySet;", remap = false))
|
||||||
private Object2IntMap.FastEntrySet<RegistryEntry<Enchantment>> object2IntEntrySet(Object2IntOpenHashMap<RegistryEntry<Enchantment>> object2IntOpenHashMap) {
|
private Object2IntMap.FastEntrySet<RegistryEntry<Enchantment>> object2IntEntrySet(Object2IntOpenHashMap<RegistryEntry<Enchantment>> object2IntOpenHashMap) {
|
||||||
for (Object2IntMap.Entry<RegistryEntry<Enchantment>> entry : object2IntOpenHashMap.object2IntEntrySet()) {
|
for (Object2IntMap.Entry<RegistryEntry<Enchantment>> entry : object2IntOpenHashMap.object2IntEntrySet()) {
|
||||||
|
@ -38,12 +32,12 @@ public class UncapEnchants {
|
||||||
|
|
||||||
@Mixin(ItemEnchantmentsComponent.Builder.class)
|
@Mixin(ItemEnchantmentsComponent.Builder.class)
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
@Redirect(method = "set(Lnet/minecraft/enchantment/Enchantment;I)V", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(II)I", remap = false))
|
@Redirect(method = "set(Lnet/minecraft/registry/entry/RegistryEntry;I)V", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(II)I", remap = false))
|
||||||
private int min(int a, int b) {
|
private int min(int a, int b) {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(method = "add(Lnet/minecraft/enchantment/Enchantment;I)V", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(II)I", remap = false))
|
@Redirect(method = "add(Lnet/minecraft/registry/entry/RegistryEntry;I)V", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(II)I", remap = false))
|
||||||
private int min2(int a, int b) {
|
private int min2(int a, int b) {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package io.gitlab.jfronny.yescheat.mixin;
|
|
||||||
|
|
||||||
import net.minecraft.enchantment.Enchantment;
|
|
||||||
import net.minecraft.enchantment.InfinityEnchantment;
|
|
||||||
import net.minecraft.enchantment.MendingEnchantment;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|
||||||
|
|
||||||
@Mixin(InfinityEnchantment.class)
|
|
||||||
public class UnlockMendingInfinity {
|
|
||||||
@Inject(method = "canAccept", at = @At("HEAD"), cancellable = true)
|
|
||||||
private void differs(Enchantment other, CallbackInfoReturnable<Boolean> cir) {
|
|
||||||
if (other instanceof MendingEnchantment) cir.setReturnValue(true);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -12,7 +12,6 @@
|
||||||
"UnblockChests",
|
"UnblockChests",
|
||||||
"UncapEnchants",
|
"UncapEnchants",
|
||||||
"UncapEnchants$Builder",
|
"UncapEnchants$Builder",
|
||||||
"UnlockMendingInfinity",
|
|
||||||
"VillagersFollowEmeralds1",
|
"VillagersFollowEmeralds1",
|
||||||
"VillagersFollowEmeralds2"
|
"VillagersFollowEmeralds2"
|
||||||
],
|
],
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
"yescheat.jfconfig.unblockChests.tooltip": "Chests are never blocked",
|
"yescheat.jfconfig.unblockChests.tooltip": "Chests are never blocked",
|
||||||
"yescheat.jfconfig.distantContainers": "Distant Containers",
|
"yescheat.jfconfig.distantContainers": "Distant Containers",
|
||||||
"yescheat.jfconfig.distantContainers.tooltip": "Distant container screens aren't closed",
|
"yescheat.jfconfig.distantContainers.tooltip": "Distant container screens aren't closed",
|
||||||
"yescheat.jfconfig.unlockMending": "Unblock Mending",
|
|
||||||
"yescheat.jfconfig.unlockMending.tooltip": "Allows using mending in parallel with infinity",
|
|
||||||
"yescheat.jfconfig.distantBreaking": "Distant Breaking",
|
"yescheat.jfconfig.distantBreaking": "Distant Breaking",
|
||||||
"yescheat.jfconfig.distantBreaking.tooltip": "Removes the maximum distance for breaking blocks",
|
"yescheat.jfconfig.distantBreaking.tooltip": "Removes the maximum distance for breaking blocks",
|
||||||
"yescheat.jfconfig.villagersFollowEmeralds": "Villagers follow Emeralds",
|
"yescheat.jfconfig.villagersFollowEmeralds": "Villagers follow Emeralds",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user