23w42a and removed portalCreativeDelay and portalSurvivalDelay
This commit is contained in:
1 parent
e3d11f744b
commit
bccefa4729
6 files changed
+5
-56
No files matched your search
@@ -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<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})
|
||||
public static boolean ctrlQCraftingFix = false;
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
return NbtIo.readCompressed(Files.newInputStream(path));
|
||||
return NbtIo.readCompressed(Files.newInputStream(path), NbtAccounter.unlimitedHeap());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
"PathNavigation_pathfindingMixin",
|
||||
|
||||
"InfestedBlock_gravelMixin",
|
||||
"Player_portalDelayMixin",
|
||||
"PistonBaseBlock_qcMixin",
|
||||
"DispenserBlock_qcMixin",
|
||||
|
||||
|
||||
Reference in new issue
Block a user