Skip to content

Commit

Permalink
Make /fillbiome limit customisable with fillLimit (#1605)
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells authored Dec 26, 2022
1 parent 09155fd commit b63dfa1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/carpet/CarpetSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ private static class FillLimitLimits extends Validator<Integer> {
public String description() { return "You must choose a value from 1 to 20M";}
}
@Rule(
desc = "Customizable fill/clone volume limit",
desc = "Customizable fill/fillbiome/clone volume limit",
options = {"32768", "250000", "1000000"},
category = CREATIVE,
strict = false,
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/carpet/mixins/FillBiomeCommandMixin.java
Original file line number Diff line number Diff line change
@@ -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;
}
}
1 change: 1 addition & 0 deletions src/main/resources/carpet.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

"PerfCommand_permissionMixin",
"FillCommandMixin",
"FillBiomeCommandMixin",
"CloneCommands_fillUpdatesMixin",
"SetBlockCommand_fillUpdatesMixin",
"ForceLoadCommand_forceLoadLimitMixin",
Expand Down

0 comments on commit b63dfa1

Please sign in to comment.