23w42a and removed portalCreativeDelay and portalSurvivalDelay

This commit is contained in:
gnembon committed 2023-10-18 20:44:35 +02:00
1 parent e3d11f744b
commit bccefa4729
6 files changed
+5 -56

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check https://fabricmc.net/develop/ # check https://fabricmc.net/develop/
minecraft_version=23w41a minecraft_version=23w42a
loader_version=0.14.22 loader_version=0.14.22
jsr305_version=3.0.2 jsr305_version=3.0.2
fabric_version=0.89.3+1.20.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] # 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 release-curse-versions = Minecraft 1.20:1.20.3-Snapshot
# Whether or not to build another branch on release # 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 # The name of the second branch to release
release-extra-branch-name = 1.20.2 release-extra-branch-name = 1.20.2
# The "name" or id of the Curseforge version for the secondary branch # The "name" or id of the Curseforge version for the secondary branch
-28
View File
@@ -147,37 +147,9 @@ public class CarpetSettings
public static String carpetCommandPermissionLevel = "ops"; public static String carpetCommandPermissionLevel = "ops";
@Rule(desc = "Gbhs sgnf sadsgras fhskdpri!!!", category = EXPERIMENTAL) @Rule(desc = "Gbhs sgnf sadsgras fhskdpri!!!", category = EXPERIMENTAL)
public static boolean superSecretSetting = false; 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<Integer> {
@Override public Integer validate(CommandSourceStack source, CarpetRule<Integer> 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}) @Rule(desc = "Dropping entire stacks works also from on the crafting UI result slot", category = {RuleCategory.BUGFIX, SURVIVAL})
public static boolean ctrlQCraftingFix = false; public static boolean ctrlQCraftingFix = false;
@@ -3,7 +3,8 @@ package carpet.helpers;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.item.ItemStack; 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 public class InventoryHelper
{ {
@@ -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<Integer> cir) {
if(CarpetSettings.portalCreativeDelay != 1 && this.abilities.invulnerable) cir.setReturnValue(CarpetSettings.portalCreativeDelay);
else if(CarpetSettings.portalSurvivalDelay != 80 && !this.abilities.invulnerable) cir.setReturnValue(CarpetSettings.portalSurvivalDelay);
}
}
@@ -435,7 +435,7 @@ public class FileArgument
{ {
try try
{ {
return NbtIo.readCompressed(Files.newInputStream(path)); return NbtIo.readCompressed(Files.newInputStream(path), NbtAccounter.unlimitedHeap());
} }
catch (IOException e) catch (IOException e)
{ {
-1
View File
@@ -119,7 +119,6 @@
"PathNavigation_pathfindingMixin", "PathNavigation_pathfindingMixin",
"InfestedBlock_gravelMixin", "InfestedBlock_gravelMixin",
"Player_portalDelayMixin",
"PistonBaseBlock_qcMixin", "PistonBaseBlock_qcMixin",
"DispenserBlock_qcMixin", "DispenserBlock_qcMixin",