summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java')
-rw-r--r--src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
index d5788c7..ea97857 100644
--- a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
+++ b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java
@@ -6,7 +6,7 @@ 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.CallbackInfo;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PhantomSpawner.class)
public class DisablePhantomSpawning {
@@ -15,8 +15,8 @@ public class DisablePhantomSpawning {
* @author trueKeuin
*/
@Inject(method = "spawn", at = @At("HEAD"), cancellable = true)
- public void spawn(ServerWorld serverWorld, boolean spawnMonsters, boolean spawnAnimals, CallbackInfo ci) {
+ public void spawn(ServerWorld serverWorld, boolean spawnMonsters, boolean spawnAnimals, CallbackInfoReturnable<Integer> cir) {
if (OhMyVanillaMinecraft.disablePhantomSpawning)
- ci.cancel();
+ cir.setReturnValue(0);
}
}