summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
diff options
context:
space:
mode:
authorMerrg1n <[email protected]>2022-08-13 22:55:01 +0800
committerMerrg1n <[email protected]>2022-08-14 01:42:36 +0800
commit323226a7956b2dc1d56c56e63bc9354e2b8bd244 (patch)
tree5cc1bdf20b82d36469dfd8b2702fd418da1b69ce /src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
parentbef552c9f25ebf78c67a7226aec48bd686b2dcba (diff)
remove this due to gamerule already impl this
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java')
-rw-r--r--src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
deleted file mode 100644
index d14fc3e..0000000
--- a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.keuin.ohmyvanillamc.mixin;
-
-import com.keuin.ohmyvanillamc.OhMyVanillaMinecraft;
-import net.minecraft.server.world.ServerWorld;
-import net.minecraft.world.gen.PhantomSpawner;
-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.CallbackInfoReturnable;
-
-@Mixin(PhantomSpawner.class)
-public class DisablePhantomSpawning {
- /**
- * Disable phantom spawning
- * @author trueKeuin
- */
- @Inject(method = "spawn", at = @At("HEAD"), cancellable = true)
- public void spawn(ServerWorld serverWorld, boolean spawnMonsters, boolean spawnAnimals, CallbackInfoReturnable<Integer> cir) {
- if (OhMyVanillaMinecraft.getConfiguration().isDisablePhantomSpawning())
- cir.setReturnValue(0);
- }
-}