diff --git a/gradle.properties b/gradle.properties index 2ccedb03..6175c9c5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check https://fabricmc.net/develop/ - minecraft_version=23w41a + minecraft_version=23w42a loader_version=0.14.22 jsr305_version=3.0.2 fabric_version=0.89.3+1.20.2 @@ -19,7 +19,7 @@ org.gradle.jvmargs=-Xmx1G # Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN] release-curse-versions = Minecraft 1.20:1.20.3-Snapshot # Whether or not to build another branch on release - release-extra-branch = true + release-extra-branch = false # The name of the second branch to release release-extra-branch-name = 1.20.2 # The "name" or id of the Curseforge version for the secondary branch diff --git a/src/main/java/carpet/CarpetSettings.java b/src/main/java/carpet/CarpetSettings.java index 8570b401..758e40ee 100644 --- a/src/main/java/carpet/CarpetSettings.java +++ b/src/main/java/carpet/CarpetSettings.java @@ -147,37 +147,9 @@ public class CarpetSettings public static String carpetCommandPermissionLevel = "ops"; - @Rule(desc = "Gbhs sgnf sadsgras fhskdpri!!!", category = EXPERIMENTAL) public static boolean superSecretSetting = false; - @Rule( - desc = "Amount of delay ticks to use a nether portal in creative", - options = {"1", "40", "80", "72000"}, - category = CREATIVE, - strict = false, - validate = OneHourMaxDelayLimit.class - ) - public static int portalCreativeDelay = 1; - - @Rule( - desc = "Amount of delay ticks to use a nether portal in survival", - options = {"1", "40", "80", "72000"}, - category = SURVIVAL, - strict = false, - validate = OneHourMaxDelayLimit.class - ) - public static int portalSurvivalDelay = 80; - - - private static class OneHourMaxDelayLimit extends Validator { - @Override public Integer validate(CommandSourceStack source, CarpetRule currentRule, Integer newValue, String string) { - return (newValue > 0 && newValue <= 72000) ? newValue : null; - } - @Override - public String description() { return "You must choose a value from 1 to 72000";} - } - @Rule(desc = "Dropping entire stacks works also from on the crafting UI result slot", category = {RuleCategory.BUGFIX, SURVIVAL}) public static boolean ctrlQCraftingFix = false; diff --git a/src/main/java/carpet/helpers/InventoryHelper.java b/src/main/java/carpet/helpers/InventoryHelper.java index 917013bd..4eaa276c 100644 --- a/src/main/java/carpet/helpers/InventoryHelper.java +++ b/src/main/java/carpet/helpers/InventoryHelper.java @@ -3,7 +3,8 @@ package carpet.helpers; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import static net.minecraft.nbt.Tag.*; +import static net.minecraft.nbt.Tag.TAG_COMPOUND; +import static net.minecraft.nbt.Tag.TAG_LIST; public class InventoryHelper { diff --git a/src/main/java/carpet/mixins/Player_portalDelayMixin.java b/src/main/java/carpet/mixins/Player_portalDelayMixin.java deleted file mode 100644 index 01cd7924..00000000 --- a/src/main/java/carpet/mixins/Player_portalDelayMixin.java +++ /dev/null @@ -1,23 +0,0 @@ -package carpet.mixins; - -import carpet.CarpetSettings; -import net.minecraft.world.entity.player.Abilities; -import net.minecraft.world.entity.player.Player; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(Player.class) -public abstract class Player_portalDelayMixin -{ - @Final @Shadow public Abilities abilities; - - @Inject(method = "getPortalWaitTime()I", at = @At("HEAD"), cancellable = true) - private void onMaxNetherPortalTime(CallbackInfoReturnable cir) { - if(CarpetSettings.portalCreativeDelay != 1 && this.abilities.invulnerable) cir.setReturnValue(CarpetSettings.portalCreativeDelay); - else if(CarpetSettings.portalSurvivalDelay != 80 && !this.abilities.invulnerable) cir.setReturnValue(CarpetSettings.portalSurvivalDelay); - } -} diff --git a/src/main/java/carpet/script/argument/FileArgument.java b/src/main/java/carpet/script/argument/FileArgument.java index dbc05859..f4853a5a 100644 --- a/src/main/java/carpet/script/argument/FileArgument.java +++ b/src/main/java/carpet/script/argument/FileArgument.java @@ -435,7 +435,7 @@ public class FileArgument { try { - return NbtIo.readCompressed(Files.newInputStream(path)); + return NbtIo.readCompressed(Files.newInputStream(path), NbtAccounter.unlimitedHeap()); } catch (IOException e) { diff --git a/src/main/resources/carpet.mixins.json b/src/main/resources/carpet.mixins.json index a5db8a8b..7e37ffe2 100644 --- a/src/main/resources/carpet.mixins.json +++ b/src/main/resources/carpet.mixins.json @@ -119,7 +119,6 @@ "PathNavigation_pathfindingMixin", "InfestedBlock_gravelMixin", - "Player_portalDelayMixin", "PistonBaseBlock_qcMixin", "DispenserBlock_qcMixin",