Make /fillbiome limit customisable with fillLimit (#1605)
This commit is contained in:
1 parent
09155fd54c
commit
b63dfa1b0a
3 files changed
+19
-1
No files matched your search
@@ -630,7 +630,7 @@ public class CarpetSettings
|
|||||||
public String description() { return "You must choose a value from 1 to 20M";}
|
public String description() { return "You must choose a value from 1 to 20M";}
|
||||||
}
|
}
|
||||||
@Rule(
|
@Rule(
|
||||||
desc = "Customizable fill/clone volume limit",
|
desc = "Customizable fill/fillbiome/clone volume limit",
|
||||||
options = {"32768", "250000", "1000000"},
|
options = {"32768", "250000", "1000000"},
|
||||||
category = CREATIVE,
|
category = CREATIVE,
|
||||||
strict = false,
|
strict = false,
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.CarpetSettings;
|
||||||
|
import net.minecraft.server.commands.FillBiomeCommand;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Constant;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||||
|
|
||||||
|
@Mixin(FillBiomeCommand.class)
|
||||||
|
public class FillBiomeCommandMixin
|
||||||
|
{
|
||||||
|
@ModifyConstant(method = "fill", constant = @Constant(intValue = 32768))
|
||||||
|
private static int fillLimit(int original)
|
||||||
|
{
|
||||||
|
return CarpetSettings.fillLimit;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
"PerfCommand_permissionMixin",
|
"PerfCommand_permissionMixin",
|
||||||
"FillCommandMixin",
|
"FillCommandMixin",
|
||||||
|
"FillBiomeCommandMixin",
|
||||||
"CloneCommands_fillUpdatesMixin",
|
"CloneCommands_fillUpdatesMixin",
|
||||||
"SetBlockCommand_fillUpdatesMixin",
|
"SetBlockCommand_fillUpdatesMixin",
|
||||||
"ForceLoadCommand_forceLoadLimitMixin",
|
"ForceLoadCommand_forceLoadLimitMixin",
|
||||||
|
|||||||
Reference in new issue
Block a user