From f287ea9dbb54b96c15f441b7f72e7d6527704ded Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 19 Dec 2020 09:41:34 +0800 Subject: Version 1.2.0: support disabling the spawn of wandering traders. --- gradle.properties | 2 +- .../mixin/DisableWanderingTraderSpawning.java | 18 ++++++++++++++++++ src/main/resources/ohmyvanillamc.mixins.json | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java diff --git a/gradle.properties b/gradle.properties index 2461e6a..4e05fe8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.15.2 yarn_mappings=1.15.2+build.17 loader_version=0.10.8 # Mod Properties -mod_version=1.1.0 +mod_version=1.2.0 maven_group=com.keuin.omvm archives_base_name=oh-my-vanilla-mc # Dependencies diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java new file mode 100644 index 0000000..c7049d8 --- /dev/null +++ b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableWanderingTraderSpawning.java @@ -0,0 +1,18 @@ +package com.keuin.ohmyvanillamc.mixin; + +import net.minecraft.world.WanderingTraderManager; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +@Mixin(WanderingTraderManager.class) +public class DisableWanderingTraderSpawning { + + /** + * @reason disable ticking + * @author trueKeuin + */ + @Overwrite + public void tick() { + } + +} diff --git a/src/main/resources/ohmyvanillamc.mixins.json b/src/main/resources/ohmyvanillamc.mixins.json index c6ef57f..c58fff9 100644 --- a/src/main/resources/ohmyvanillamc.mixins.json +++ b/src/main/resources/ohmyvanillamc.mixins.json @@ -4,7 +4,8 @@ "package": "com.keuin.ohmyvanillamc.mixin", "compatibilityLevel": "JAVA_8", "mixins": [ - "DisableFishSchooling" + "DisableFishSchooling", + "DisableWanderingTraderSpawning" ], "injectors": { "defaultRequire": 1 -- cgit v1.2.3