From 323226a7956b2dc1d56c56e63bc9354e2b8bd244 Mon Sep 17 00:00:00 2001 From: Merrg1n <22628584+Merrg1n@users.noreply.github.com> Date: Sat, 13 Aug 2022 22:55:01 +0800 Subject: remove this due to gamerule already impl this --- README.md | 7 +------ .../mixin/DisablePhantomSpawning.java | 22 -------------------- .../mixin/DisableWanderingTraderSpawning.java | 24 ---------------------- src/main/resources/ohmyvanillamc.mixins.json | 2 -- 4 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 src/main/java/com/keuin/ohmyvanillamc/mixin/DisablePhantomSpawning.java delete mode 100644 src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java diff --git a/README.md b/README.md index 7ca9388..01fb02d 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,4 @@ What's wrong with my Minecraft? ## Obsolete controversial vanilla features (glitches) reintroduction - **(Optional)** Llama item duping reintroduction -- **(Optional)** 0-tick farm reintroduction (all plants have their own sub switches) - -## Vanilla feature switches (some of them have been introduced by Mojang) - -- **(Optional)** Disable wandering traders spawning -- **(Optional)** Disable phantom spawning \ No newline at end of file +- **(Optional)** 0-tick farm reintroduction (all plants have their own sub switches) \ No newline at end of file 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 cir) { - if (OhMyVanillaMinecraft.getConfiguration().isDisablePhantomSpawning()) - cir.setReturnValue(0); - } -} 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 ci) { - if (OhMyVanillaMinecraft.getConfiguration().isDisableWanderingTraderSpawning()) { - ci.setReturnValue(0); - ci.cancel(); - } - } -} diff --git a/src/main/resources/ohmyvanillamc.mixins.json b/src/main/resources/ohmyvanillamc.mixins.json index 24537c7..3a5d935 100644 --- a/src/main/resources/ohmyvanillamc.mixins.json +++ b/src/main/resources/ohmyvanillamc.mixins.json @@ -6,8 +6,6 @@ "mixins": [ "DisableEntityTrackerEntrySpamming", "DisableFishSchooling", - "DisablePhantomSpawning", - "DisableWanderingTraderSpawning", "ReintroduceLlamaItemDuping", "Mc113809SugarCaneBlockMixin", "Mc113809CactusBlockMixin", -- cgit v1.2.3