1.2.1
All checks were successful
SorceryCraft/pipeline/head This commit looks good

Fix Launching Without ModMenu
This commit is contained in:
TheBrokenRail 2020-03-21 11:49:58 -04:00
parent 4ebae792ac
commit f40e44e366
5 changed files with 26 additions and 16 deletions

View File

@ -1,5 +1,8 @@
# Changelog
**1.2.1**
* Fix Launching Without ModMenu
**1.2**
* Update Mappings
* Update API (More Consistent Package Names)

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.7.8+build.189
# Mod Properties
mod_version = 1.2.0
mod_version = 1.2.1
maven_group = com.thebrokenrail
archives_base_name = sorcerycraft

View File

@ -0,0 +1,20 @@
package com.thebrokenrail.sorcerycraft.client;
import com.thebrokenrail.sorcerycraft.ModConfig;
import com.thebrokenrail.sorcerycraft.SorceryCraft;
import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import net.minecraft.client.gui.screen.Screen;
public class ModMenu implements ModMenuApi {
@Override
public String getModId() {
return SorceryCraft.NAMESPACE;
}
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return (ConfigScreenFactory<Screen>) screen -> AutoConfig.getConfigScreen(ModConfig.class, screen).get();
}
}

View File

@ -6,8 +6,6 @@ import com.thebrokenrail.sorcerycraft.client.entity.SpellEntityRenderer;
import com.thebrokenrail.sorcerycraft.client.gui.CastingTableScreen;
import com.thebrokenrail.sorcerycraft.gui.CastingTableScreenHandler;
import com.thebrokenrail.sorcerycraft.packet.UpdateKnownSpellsS2CPacket;
import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import me.sargunvohra.mcmods.autoconfig1u.gui.registry.GuiRegistry;
import me.sargunvohra.mcmods.autoconfig1u.util.Utils;
@ -17,14 +15,13 @@ import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
import net.fabricmc.fabric.api.client.screen.ScreenProviderRegistry;
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
import java.util.Collections;
public class SorceryCraftClient implements ClientModInitializer, ModMenuApi {
public class SorceryCraftClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
GuiRegistry guiRegistry = AutoConfig.getGuiRegistry(ModConfig.class);
@ -41,14 +38,4 @@ public class SorceryCraftClient implements ClientModInitializer, ModMenuApi {
ClientSidePacketRegistryImpl.INSTANCE.register(new Identifier(SorceryCraft.NAMESPACE, "update_known_spells"), UpdateKnownSpellsS2CPacket::handle);
}
@Override
public String getModId() {
return SorceryCraft.NAMESPACE;
}
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return (ConfigScreenFactory<Screen>) screen -> AutoConfig.getConfigScreen(ModConfig.class, screen).get();
}
}

View File

@ -23,7 +23,7 @@
"com.thebrokenrail.sorcerycraft.client.SorceryCraftClient"
],
"modmenu": [
"com.thebrokenrail.sorcerycraft.client.SorceryCraftClient"
"com.thebrokenrail.sorcerycraft.client.ModMenu"
]
},
"mixins": [