block /debugdim

This commit is contained in:
Chipmunk 2024-06-18 00:22:21 -04:00
parent 9e8c3333c0
commit e4e49f10e2
2 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,16 @@
package land.chipmunk.kaboomfabric.extras.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.server.command.ServerCommandSource;
@Mixin(net.minecraft.server.command.DebugDimCommand.class)
public abstract class DebugDimCommandMixin {
@Inject(at = @At("HEAD"), method = "register", cancellable = true)
private static void register (CommandDispatcher<ServerCommandSource> dispatcher, CallbackInfo info) {
info.cancel();
}
}

View file

@ -12,7 +12,8 @@
"OpCommandMixin",
"EntitySelectorMixin",
"ServerWorldAccessor",
"EntityAccessor"
"EntityAccessor",
"DebugDimCommandMixin"
],
"injectors": {
"defaultRequire": 1