customizable forceload limit
This commit is contained in:
1 parent
f43fb092b2
commit
b4482214c9
3 files changed
+34
No files matched your search
@@ -353,6 +353,16 @@ public class CarpetSettings
|
|||||||
)
|
)
|
||||||
public static int fillLimit = 32768;
|
public static int fillLimit = 32768;
|
||||||
|
|
||||||
|
|
||||||
|
@Rule(
|
||||||
|
desc = "Customizable forceload chunk limit",
|
||||||
|
options = {"256"},
|
||||||
|
category = CREATIVE,
|
||||||
|
strict = false,
|
||||||
|
validate = FillLimitLimits.class
|
||||||
|
)
|
||||||
|
public static int forceloadLimit = 256;
|
||||||
|
|
||||||
@Rule(
|
@Rule(
|
||||||
desc = "Customizable maximal entity collision limits, 0 for no limits",
|
desc = "Customizable maximal entity collision limits, 0 for no limits",
|
||||||
options = {"0", "1", "20"},
|
options = {"0", "1", "20"},
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.CarpetSettings;
|
||||||
|
import net.minecraft.server.command.ForceLoadCommand;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Constant;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||||
|
|
||||||
|
@Mixin(ForceLoadCommand.class)
|
||||||
|
public class ForceLoadCommand_forceLoadLimitMixin
|
||||||
|
{
|
||||||
|
@ModifyConstant(method = "executeChange", constant = @Constant(longValue = 256L))
|
||||||
|
private static long forceloadLimit(long original)
|
||||||
|
{
|
||||||
|
return CarpetSettings.forceloadLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ModifyConstant(method = "executeChange", constant = @Constant(intValue = 256))
|
||||||
|
private static int forceloadLimitError(int original)
|
||||||
|
{
|
||||||
|
return CarpetSettings.forceloadLimit;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"FillCommandMixin",
|
"FillCommandMixin",
|
||||||
"CloneCommandMixin",
|
"CloneCommandMixin",
|
||||||
"SetBlockCommandMixin",
|
"SetBlockCommandMixin",
|
||||||
|
"ForceLoadCommand_forceLoadLimitMixin",
|
||||||
"World_fillUpdatesMixin",
|
"World_fillUpdatesMixin",
|
||||||
"WorldChunk_fillUpdatesMixin",
|
"WorldChunk_fillUpdatesMixin",
|
||||||
"StructureBlockBlockEntity_fillUpdatesMixin",
|
"StructureBlockBlockEntity_fillUpdatesMixin",
|
||||||
|
|||||||
Reference in new issue
Block a user