diff options
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java')
-rw-r--r-- | src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java deleted file mode 100644 index 3af7941..0000000 --- a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.keuin.ohmyvanillamc.mixin; - -import com.keuin.ohmyvanillamc.OhMyVanillaMinecraft; -import net.minecraft.world.WanderingTraderManager; -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(WanderingTraderManager.class) -public class DisableWanderingTraderSpawning { - /** - * Disable ticking - * - * @author trueKeuin - */ - @Inject(method = "spawn", at = @At("HEAD"), cancellable = true) - public void tick(CallbackInfoReturnable<Integer> ci) { - if (OhMyVanillaMinecraft.getConfiguration().isDisableWanderingTraderSpawning()) { - ci.setReturnValue(0); - ci.cancel(); - } - } -} |