fillLimits
This commit is contained in:
1 parent
c5fcd76ecc
commit
d071928164
3 files changed
+42
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.server.command.CloneCommand;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(CloneCommand.class)
|
||||
public abstract class CloneCommandMixin
|
||||
{
|
||||
@Redirect(method = "execute", at = @At(
|
||||
value = "CONSTANT",
|
||||
args = "intValue=32768"
|
||||
))
|
||||
private static int fillLimit()
|
||||
{
|
||||
return CarpetSettings.getInt("fillLimit");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.server.command.FillCommand;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(FillCommand.class)
|
||||
public abstract class FillCommandMixin
|
||||
{
|
||||
@Redirect(method = "execute", at = @At(
|
||||
value = "CONSTANT",
|
||||
args = "intValue=32768"
|
||||
))
|
||||
private static int fillLimit()
|
||||
{
|
||||
return CarpetSettings.getInt("fillLimit");
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
"CommandManagerMixin",
|
||||
"FillCommandMixin",
|
||||
"CloneCommandMixin",
|
||||
"MinecraftServer_coreMixin",
|
||||
"MinecraftServer_tickspeedMixin",
|
||||
"MinecraftServer_scarpetMixin",
|
||||
|
||||
Reference in new issue
Block a user