From a1b67ed622e9c860bf3178235da12641135c545e Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Tue, 20 Oct 2020 11:51:45 -0400 Subject: [PATCH] 1.0.11 --- CHANGELOG.md | 4 ++++ gradle.properties | 12 ++++++------ .../slightlyvanilla/client/ModMenu.java | 18 ++++++++++++++++++ .../client/SlightlyVanillaClient.java | 12 +----------- src/main/resources/fabric.mod.json | 2 +- src/main/resources/slightlyvanilla.mixins.json | 2 +- 6 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 src/main/java/com/thebrokenrail/slightlyvanilla/client/ModMenu.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 5826c2d..3d2ca26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +**1.0.11** +* Fix Loading On Client Without ModMenu +* Fix Loading On Server + **1.0.10** * Add Note Block Screen Tweak diff --git a/gradle.properties b/gradle.properties index 944e2d3..9011e07 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,20 +3,20 @@ org.gradle.jvmargs = -Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version = 1.16.2 + minecraft_version = 1.16.3 curseforge_id = 368420 - simple_minecraft_version = 1.16.2 - yarn_build = 21 - fabric_loader_version = 0.9.2+build.206 + simple_minecraft_version = 1.16.3 + yarn_build = 47 + fabric_loader_version = 0.10.3+build.211 # Mod Properties - mod_version = 1.0.10 + mod_version = 1.0.11 maven_group = com.thebrokenrail archives_base_name = slightlyvanilla # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_api_version = 0.19.0+build.398-1.16 + fabric_api_version = 0.24.1+build.412-1.16 modmenu_version = 1.14.6+build.31 cloth_config_version = 4.7.0-unstable autoconfig_version = 3.2.0-unstable diff --git a/src/main/java/com/thebrokenrail/slightlyvanilla/client/ModMenu.java b/src/main/java/com/thebrokenrail/slightlyvanilla/client/ModMenu.java new file mode 100644 index 0000000..8612aa2 --- /dev/null +++ b/src/main/java/com/thebrokenrail/slightlyvanilla/client/ModMenu.java @@ -0,0 +1,18 @@ +package com.thebrokenrail.slightlyvanilla.client; + +import com.thebrokenrail.slightlyvanilla.ModConfig; +import io.github.prospector.modmenu.api.ConfigScreenFactory; +import io.github.prospector.modmenu.api.ModMenuApi; +import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.gui.screen.Screen; + +@SuppressWarnings("unused") +@Environment(EnvType.CLIENT) +public class ModMenu implements ModMenuApi { + @Override + public ConfigScreenFactory getModConfigScreenFactory() { + return (ConfigScreenFactory) screen -> AutoConfig.getConfigScreen(ModConfig.class, screen).get(); + } +} diff --git a/src/main/java/com/thebrokenrail/slightlyvanilla/client/SlightlyVanillaClient.java b/src/main/java/com/thebrokenrail/slightlyvanilla/client/SlightlyVanillaClient.java index c1f273b..75ad8a3 100644 --- a/src/main/java/com/thebrokenrail/slightlyvanilla/client/SlightlyVanillaClient.java +++ b/src/main/java/com/thebrokenrail/slightlyvanilla/client/SlightlyVanillaClient.java @@ -1,30 +1,20 @@ package com.thebrokenrail.slightlyvanilla.client; import com.thebrokenrail.slightlyvanilla.SlightlyVanilla; -import com.thebrokenrail.slightlyvanilla.ModConfig; import com.thebrokenrail.slightlyvanilla.entity.SlimeballEntity; import com.thebrokenrail.slightlyvanilla.entity.SpawnEggEntity; -import io.github.prospector.modmenu.api.ConfigScreenFactory; -import io.github.prospector.modmenu.api.ModMenuApi; -import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry; -import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.render.entity.FlyingItemEntityRenderer; @SuppressWarnings("unused") @Environment(EnvType.CLIENT) -public class SlightlyVanillaClient implements ClientModInitializer, ModMenuApi { +public class SlightlyVanillaClient implements ClientModInitializer { @Override public void onInitializeClient() { EntityRendererRegistry.INSTANCE.register(SlightlyVanilla.SLIMEBALL_ENTITY, (entityRenderDispatcher, context) -> new FlyingItemEntityRenderer(entityRenderDispatcher, context.getItemRenderer())); EntityRendererRegistry.INSTANCE.register(SlightlyVanilla.SPAWN_EGG_ENTITY, (entityRenderDispatcher, context) -> new FlyingItemEntityRenderer(entityRenderDispatcher, context.getItemRenderer())); } - - @Override - public ConfigScreenFactory getModConfigScreenFactory() { - return (ConfigScreenFactory) screen -> AutoConfig.getConfigScreen(ModConfig.class, screen).get(); - } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 438f451..9d3910c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -23,7 +23,7 @@ "com.thebrokenrail.slightlyvanilla.client.SlightlyVanillaClient" ], "modmenu": [ - "com.thebrokenrail.slightlyvanilla.client.SlightlyVanillaClient" + "com.thebrokenrail.slightlyvanilla.client.ModMenu" ] }, "mixins": [ diff --git a/src/main/resources/slightlyvanilla.mixins.json b/src/main/resources/slightlyvanilla.mixins.json index ad014fa..d629aad 100644 --- a/src/main/resources/slightlyvanilla.mixins.json +++ b/src/main/resources/slightlyvanilla.mixins.json @@ -4,11 +4,11 @@ "compatibilityLevel": "JAVA_8", "client": [ "MixinClientPlayNetworkHandler", + "MixinClientPlayerInteractionManager", "ScreenHandlerAccessor" ], "mixins": [ "MixinAbstractTraderEntity", - "MixinClientPlayerInteractionManager", "MixinItem", "MixinLootableContainerBlockEntity", "MixinNetherPortalBlockAreaHelper",