Jump to content

Recommended Posts

Posted

I know that the configs have something to do with ForgeConfigSpec, and ModConfig.

I am making a server sided mod, so GUI should only come into play if the user installs the mod on the client or singleplayer.

I just want a few simple configurations like enabled, length of time, message, and msg color.

I've spent about two days looking for examples to show me how configurations are done, but they all seem to be client sided.

I don't expect to be spoon fed, I just need to be pointed in the right direction. How to read the config values, and how to save them?

  • joelstoner changed the title to [1.16.5] Help with ServerSided Configuration
Posted
1 hour ago, diesieben07 said:

The way you make config files is the same between all config types. Simply choose the ModConfig.Type that is appropriate for you.

Does Forge auto save the settings? Also what is push, pop, and bake?

Posted (edited)

[SOLVED]

So I did a config class, and registered it, and now I'm getting a NPE during loading a single player world.

This is the stacktrace provided in crash-reports

Spoiler

---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 5/12/21, 7:15 PM
Description: Exception in server tick loop

java.lang.NullPointerException: Exception in server tick loop
    at net.minecraftforge.fml.config.ModConfig.setConfigData(ModConfig.java:86) ~[forge:?] {re:classloading}
    at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:105) ~[forge:?] {re:classloading}
    at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:83) ~[forge:?] {re:classloading}
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
    at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2067) ~[?:?] {}
    at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:83) ~[forge:?] {re:classloading}
    at net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerAboutToStart(ServerLifecycleHooks.java:95) ~[forge:?] {re:classloading}
    at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:62) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:643) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:233) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Thread.java:834) [?:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.16.5
    Minecraft Version ID: 1.16.5
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 11.0.9.1, AdoptOpenJDK
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), AdoptOpenJDK
    Memory: 1437107200 bytes (1370 MB) / 3160408064 bytes (3014 MB) up to 8564768768 bytes (8168 MB)
    CPUs: 6
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 8.0.9+86+master.3cf110c
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services:
        /mixin-0.8.2.jar mixin PLUGINSERVICE
        /eventbus-4.0.0.jar eventbus PLUGINSERVICE
        /forge-1.16.5-36.1.0_mapped_snapshot_20210309-1.16.5-launcher.jar object_holder_definalize PLUGINSERVICE
        /forge-1.16.5-36.1.0_mapped_snapshot_20210309-1.16.5-launcher.jar runtime_enum_extender PLUGINSERVICE
        /forge-1.16.5-36.1.0_mapped_snapshot_20210309-1.16.5-launcher.jar capability_inject_definalize PLUGINSERVICE
        /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE
        /forge-1.16.5-36.1.0_mapped_snapshot_20210309-1.16.5-launcher.jar runtimedistcleaner PLUGINSERVICE
        /mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE
        /forge-1.16.5-36.1.0_mapped_snapshot_20210309-1.16.5-launcher.jar fml TRANSFORMATIONSERVICE
    FML: 36.1
    Forge: net.minecraftforge:36.1.0
    FML Language Providers:
        [email protected]
        minecraft@1
    Mod List:
        client-extra.jar                                  |Minecraft                     |minecraft                     |1.16.5              |DONE      |a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
        main                                              |Single Player Sleep Mod       |singleplayersleepmod          |1.16.5_1.0.1        |DONE      |NOSIGNATURE
        forge-1.16.5-36.1.0_mapped_snapshot_20210309-1.16.|Forge                         |forge                         |36.1.0              |DONE      |NOSIGNATURE
    Crash Report UUID: 491f47b5-6fe8-4db7-894c-e0a7b7fc37f9
    Player Count: 0 / 8; []
    Data Packs: vanilla, mod:singleplayersleepmod, mod:forge
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge'

This is my config class

Spoiler



package com.github.joelgodofwar.sps.server.config;

import org.apache.commons.lang3.tuple.Pair;

import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
import net.minecraftforge.common.ForgeConfigSpec.IntValue;

public class SPSConfig {
	
	/**
     * General configuration that doesn't need to be synchronized but needs to be available before server startup
     */
    public static class Common {
        public final ForgeConfigSpec.ConfigValue<? extends String> str_singleplayersleep_SleepMessage;
        public final BooleanValue bool_singleplayersleep_Enabled;
        public final IntValue int_singleplayersleep_SleepLength;

        Common(ForgeConfigSpec.Builder builder)
        {
            builder.comment("General configuration settings")
                    .push("general");

            str_singleplayersleep_SleepMessage = builder
                    .comment("Defines the sleep message to be displayed when a player sleeps.",
                             "%1$s is a placeholder for the sleeping player's name.")
                    .translation("singleplayersleep.config.sleepmsg")
                    .define("str_singleplayersleep_SleepMessage", "%1$s went to bed. Sweet dreams!");

            bool_singleplayersleep_Enabled = builder
                    .comment("Enable or Disable this mod")
                    .translation("singleplayersleep.config.enabled")
                    .define("bool_singleplayersleep_Enabled", true);

            int_singleplayersleep_SleepLength = builder
                    .comment("Define the length of time to delay in ticks before changing the time.",
                    		"200(10 seconds) is default, as it is just over the vanilla length for single player.")
                    .translation("singleplayersleep.config.delay")
                    .defineInRange("int_singleplayersleep_SleepLength", 200, 0, Integer.MAX_VALUE);

            builder.pop();
        }

    }
    
    public static final ForgeConfigSpec commonSpec;
    public static final Common COMMON;
    static {
        final Pair<Common, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(Common::new);
        commonSpec = specPair.getRight();
        COMMON = specPair.getLeft();
    }
    
}

 

This is where I register the config

Spoiler



package com.github.joelgodofwar.sps;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.github.joelgodofwar.sps.server.config.SPSConfig;
import com.github.joelgodofwar.sps.server.events.InteractEventHandler;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod("singleplayersleepmod")
public class SinglePlayerSleepMod {
	
	// Directly reference a log4j logger.
    public static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "singleplayersleepmod";
    

    public SinglePlayerSleepMod() {
        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
/** Also tried registering here first */
        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
    }
    

    private void setup(final FMLCommonSetupEvent event){ // some preinit code
        LOGGER.info("SinglePlayerSleep Loading...");
        ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, null);
        
        //Config config = new Configuration(new File(event.getModConfigurationDirectory().getAbsolutePath() + "additional/path/to/your/config.cfg"));
    }

    private void enqueueIMC(final InterModEnqueueEvent event){ // Send InterModComms
        // some example code to dispatch IMC to another mod
        //InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
    }

    private void processIMC(final InterModProcessEvent event){ // Receive InterModComms
        // some example code to receive and process InterModComms from other mods
        //LOGGER.info("Got IMC {}", event.getIMCStream().
        //        map(m->m.getMessageSupplier().get()).
        //        collect(Collectors.toList()));
    }

    @SuppressWarnings("resource")
	private void doClientStuff(final FMLClientSetupEvent event) { // Client side stuff
        // do something that can only be done on the client
        //LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().options);
        
    }

    // You can use SubscribeEvent and let the Event Bus discover methods to call
    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        // do something when the server starts
        //LOGGER.info("HELLO from server starting");
    }
    @SubscribeEvent
    public void doServerStuff(final FMLServerStartedEvent  event) {
    	LOGGER.info("Registering Events...");
    	MinecraftForge.EVENT_BUS.register(new InteractEventHandler());
    	ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, SPSConfig.commonSpec); /** Here */
    	LOGGER.info("Loading Complete.");
    }
}

 

This is my en_us.json

Spoiler



{
  "singleplayersleepmod.sleepmsg": "%1$s went to bed. Sweet dreams!",
  "singleplayersleep.config.sleepmsg": "Set the sleep message.",
  "singleplayersleep.config.enabled": "Set if SinglePlayerSleep is enabled.",
  "singleplayersleep.config.delay": "Set delay in ticks before time is changed."
  
}

 

More than likely it is something I am missing.

I found that this part under FMLCommonSetupEvent was the NPE issue, replacing it with my config register was the fix.

ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, null);

 

Edited by joelstoner
Solved issue.
Posted
On 5/12/2021 at 3:20 AM, diesieben07 said:

Forge manages most of the saving for you, correct. I suggest you look at ForgeConfig for an example.

I'm having an issue where the server isn't saving a config toml for my mod, so that people can change the settings.

Here is my config class

Spoiler

package com.github.joelgodofwar.sps.common.config;

import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
import net.minecraftforge.common.ForgeConfigSpec.IntValue;

import org.apache.commons.lang3.tuple.Pair;

public class Config {
    public static final ServerConfig SERVER;
    public static final ForgeConfigSpec SERVER_SPEC;

    static {
        final Pair<ServerConfig, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(ServerConfig::new);
        SERVER_SPEC = specPair.getRight();
        SERVER = specPair.getLeft();
    }
    
    public static String str_singleplayersleep_SleepMessage;//public final ForgeConfigSpec.ConfigValue<? extends String> str_singleplayersleep_SleepMessage;
    public static Boolean bool_singleplayersleep_Enabled;
    public static Integer int_singleplayersleep_SleepLength;
    
    public static void load() {
    	str_singleplayersleep_SleepMessage = SERVER.str_singleplayersleep_SleepMessage.get();
    	bool_singleplayersleep_Enabled = SERVER.bool_singleplayersleep_Enabled.get();
    	int_singleplayersleep_SleepLength = SERVER.int_singleplayersleep_SleepLength.get();
    }
    
    public static class ServerConfig {
    	public final ForgeConfigSpec.ConfigValue<String> str_singleplayersleep_SleepMessage;//public final ForgeConfigSpec.ConfigValue<? extends String> str_singleplayersleep_SleepMessage;
        public final BooleanValue bool_singleplayersleep_Enabled;
        public final IntValue int_singleplayersleep_SleepLength;
    		

    		
    	ServerConfig(final ForgeConfigSpec.Builder builder) {
            builder.comment("General configuration settings")
            .push("settings");

    		str_singleplayersleep_SleepMessage = builder
    		        .comment("Defines the sleep message to be displayed when a player sleeps.",
    		                 "%1$s is a placeholder for the sleeping player's name.")
    		        .translation("singleplayersleep.config.sleepmsg")
    		        .define("str_singleplayersleep_SleepMessage", "%1$s went to bed. Sweet dreams!");
    		
    		bool_singleplayersleep_Enabled = builder
    		        .comment("Enable or Disable this mod")
    		        .translation("singleplayersleep.config.enabled")
    		        .define("bool_singleplayersleep_Enabled", true);
    		
    		int_singleplayersleep_SleepLength = builder
    		        .comment("Define the length of time to delay in ticks before changing the time.",
    		        		"200(10 seconds) is default, as it is just over the vanilla length for single player.")
    		        .translation("singleplayersleep.config.delay")
    		        .defineInRange("int_singleplayersleep_SleepLength", 200, 0, Integer.MAX_VALUE);
    		
    		builder.pop();
    		
    	}
    }
}

 

The Config is registered as

ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Config.SERVER_SPEC, "singleplayersleepmod-server.toml");

 

Posted
1 minute ago, diesieben07 said:

Where is this code located? This should work fine...

Spoiler

@Mod("singleplayersleepmod")
public class SinglePlayerSleepMod {
	
	// Directly reference a log4j logger.
    public static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "singleplayersleepmod";
    InteractEventHandler IEventHandler = new InteractEventHandler();

    public SinglePlayerSleepMod() {
        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
        ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Config.SERVER_SPEC, "singleplayersleepmod-server.toml");
        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
    }

 

 

Posted (edited)
13 hours ago, diesieben07 said:

Your repository is missing the Gradle wrapper, you should include it to keep builds consistent. Additionally, your code does not compile.

Sorry I was in a hurry and forgot to upload the new build.gradle, that branch was just for this, I'll add the wrapper to the main branch.

It should compile now. When I get the configs working I'll clean up the code, and remove the unused classes, etc.

Edited by joelstoner
Forgot something.
Posted
19 minutes ago, diesieben07 said:

Note: Deleting files and committing does not remove those files from your Git repo!

Also: Your code still does not compile.

I just uploaded everything that is not the launch files or the run directory, would a compiled jar work for debugging this issue? I'm wondering if it's related to the String.

Posted
2 minutes ago, diesieben07 said:

Are you not using a Git client?

image.thumb.png.b2bf920883d83bdf2d975f96dffca111.png

No, I never setup the eGit for Eclipse, oh that was one of the files to remove in the clean up, it does nothing, and is not called by my event handler.

Posted
8 minutes ago, diesieben07 said:

The crash does not happen with the code you posted. I can get into singleplayer fine and the config file gets created.

image.thumb.png.ec860159c3e171d572aa299bf2fc4a73.png

Any reason it shows up when running singleplayer and not when on a server alone?

Posted
12 minutes ago, diesieben07 said:

It does though:

image.thumb.png.17686c04d618f85b4b892d002a6b3324.png

Is there a way to set a config value, like with a command? When I've tried, I get an error about "Cannot set config value without assigned Config object present".

Posted
4 minutes ago, diesieben07 said:

Show what you tried.

Under FMLServerStoppingEvent I've also tried "Config.SERVER_SPEC.save();"

Bottom of the file, called on FMLServerStartedEvent

Spoiler

package com.github.joelgodofwar.sps.server.events;


import java.awt.Color;
import java.io.File;
import java.nio.file.Path;
import java.util.Random;

import org.apache.logging.log4j.Logger;

import com.github.joelgodofwar.sps.SinglePlayerSleepMod;
import com.github.joelgodofwar.sps.common.config.Config;
import com.github.joelgodofwar.sps.common.config.ConfigHelper;
import com.github.joelgodofwar.sps.common.config.ConfigHolder;
import com.github.joelgodofwar.sps.common.config.SinglePlayerSleepModConfig;
import com.github.joelgodofwar.sps.server.config.SPSConfig;
import com.mojang.brigadier.exceptions.CommandSyntaxException;

import net.minecraft.block.BedBlock;
import net.minecraft.client.renderer.entity.layers.EnergyLayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.Util;
import net.minecraft.util.text.ChatType;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextComponent;
import net.minecraft.util.text.TextComponentUtils;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.event.TickEvent.ServerTickEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.eventbus.api.Event.Result;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.config.ConfigTracker;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.loading.FMLConfig;
import net.minecraftforge.fml.loading.FMLPaths;

@SuppressWarnings("unused")
public class InteractEventHandler {
	public long daTimer = -1;
	public PlayerEntity sleepingPlayer;
	public World sleepingWorld;
	Logger log;
	private static long mobSpawningStartTime = 12541;//12600;
	private static long mobSpawningStopTime = 23600;
	
	public static String sleepMsg;
	public static boolean enabled;
	public static int delayLen;
	
    @SuppressWarnings("resource")
	@SubscribeEvent(priority = EventPriority.HIGHEST)
    public void playerSleep(PlayerInteractEvent.RightClickBlock event){
    	log = SinglePlayerSleepMod.LOGGER;
    	Result result = event.getResult();
    	boolean canceled = event.isCanceled();
    	
        if(!event.getWorld().isRemote) {
        	log.info("event.getWorld().isRemote=" + event.getWorld().isRemote);
        	final String modId = "singleplayersleepmod";
            final ModConfig.Type type = ModConfig.Type.SERVER;
            final String configFileName = ConfigTracker.INSTANCE.getConfigFileName(modId, type);
            if (configFileName != null) {
            	File f = new File(configFileName);
            	log.info("config file=" + f.getAbsolutePath());
            }else {
            	log.warn("Config file not found! - Warning");
            }
            final Path defaultConfigPath = FMLPaths.GAMEDIR.get().resolve(FMLConfig.defaultConfigPath());
            log.info("defaultConfigPath=" + defaultConfigPath);
            log.info("configFileName=" + configFileName);
            log.info("sleepMsg=" + Config.SERVER.str_singleplayersleep_SleepMessage.get());
            log.info("sleepLength=" + Config.SERVER.int_singleplayersleep_SleepLength.get());
            log.info("enabled=" + Config.SERVER.bool_singleplayersleep_Enabled.get());
            Config.SERVER.str_singleplayersleep_SleepMessage.save();
            //ConfigHelper.setValueAndSave(ConfigHelper.commonConfig, ConfigHelper.SleepLengthPath, 100);
        	//log.info("event.getWorld().isRemote=" + event.getWorld().isRemote);
        	
        	PlayerEntity player = event.getPlayer();
			World world = event.getWorld();
        	
            if (world.getBlockState(event.getPos()).getBlock() instanceof BedBlock) {
            	log.info("IsNight(world)=" + IsNight(world));
            	log.info("world.isThundering()=" + world.isThundering());
                if (!IsNight(world)&&!world.isThundering()) {
                    return;
                }
                if( result != Result.DENY && !canceled ) {
	                if(sleepingPlayer == null) {
	                	sleepingPlayer = player;
	                	log.info("sleepingPlayer SET");
	                }
	                if(sleepingWorld == null) {
	                	sleepingWorld = world;
	                	log.info("sleepingWorld SET");
	                }
	                daTimer = 200; // 200 = 10 seconds
                }
                
                //log.info("world.getDayTime=" + world.getDayTime());
                //log.info("world.getGameTime=" + world.getGameTime());
                //log.info("world.getTimeOfDay=" + world.getTimeOfDay(0));
            }
        }
    }
    
    @SubscribeEvent
	public void servertick(ServerTickEvent event){
    	if(daTimer == 0){
    		log.info("STE - timer finished");
			daTimer = -1;
			broadcast(sleepingWorld, "%1$s went to bed. Sweet dreams!");//"singleplayersleepmod.sleepmsg");
			log.info("STE - broadcast sent");
			setDatime(sleepingPlayer, sleepingWorld);
			log.info("STE - setTime run");
			sleepingPlayer = null;
			sleepingWorld = null;
			log.info("STE - variables reset");
    	}else if(daTimer > 0){
			daTimer--;
		}
    }
    
    public void setDatime(PlayerEntity player, World world){
        //int i = (300 + (new Random()).nextInt(600)) * 20;
        ServerWorld serverworld = (ServerWorld) world;
		if( world.isRaining() || world.isThundering()){
			serverworld.setWeather(60000, 0, false, false);
		}
		long Relative_Time = 24000 - world.getDayTime();
        serverworld.setDayTime(world.getDayTime() + Relative_Time);
		// TODO Add debug log here
	}
	
	public void broadcast(World world, String string){
		//MinecraftServer mcserver = world.getServer();
		StringTextComponent msg = new StringTextComponent(string);
    	msg.getStyle().applyFormatting(TextFormatting.GOLD);
    	
    	TranslationTextComponent component = new TranslationTextComponent(string, sleepingPlayer.getDisplayName());
		component.mergeStyle(TextFormatting.GOLD);
		log.info("B - String parsed");
		//MinecraftServer server = world.getServer().getPlayerList().sendMessageToTeamOrAllPlayers(sleepingPlayer, component);;
        /**for (ServerPlayerEntity player : world.getServer().getPlayerList().getPlayers()) {
    		player.sendMessage(component, Util.DUMMY_UUID);
    		log.info("B - Player " + player.getName() + " messaged");
    		//
        }//*/
        world.getServer().getPlayerList().func_232641_a_(component, ChatType.SYSTEM, sleepingPlayer.getUniqueID());//.sendMessageToTeamOrAllPlayers(sleepingPlayer, component);
        //mcserver.getPlayerList().broadcastMessage(component, ChatType.SYSTEM, Util.NIL_UUID);
        log.info("B - sleepMsg=" + sleepMsg);
        log.info("B - sleepLen=" + delayLen);
        log.info("B - enabled=" + enabled);
	}
	
	public static void writeChatMessage(PlayerEntity player, String translationKey, TextFormatting color) {
		TranslationTextComponent component = new TranslationTextComponent(translationKey);
		component.getStyle().applyFormatting(color);
		player.sendMessage(component, Util.DUMMY_UUID);
	}
	
	public static boolean IsNight(World world){
		long time = (world.getDayTime()) % 24000;
		return time >= mobSpawningStartTime && time < mobSpawningStopTime;
	}
	
	@SubscribeEvent
	public static void onModConfigEvent(final ModConfig.ModConfigEvent event) {
		final ModConfig config = event.getConfig();
		// Rebake the configs when they change
		if (config.getSpec() == ConfigHolder.CLIENT_SPEC) {
			ConfigHelper.bakeClient(config);
		}else if (config.getSpec() == ConfigHolder.SERVER_SPEC) {
			ConfigHelper.bakeServer(config);
		}else if (config.getSpec() == ConfigHolder.COMMON_SPEC) {
			ConfigHelper.bakeCommon(config);
		}
		
	}
	
	public void loadConfig() {
		sleepMsg = SinglePlayerSleepModConfig.str_singleplayersleep_SleepMessage;
		enabled = SinglePlayerSleepModConfig.bool_singleplayersleep_Enabled;
		delayLen = SinglePlayerSleepModConfig.int_singleplayersleep_SleepLength;
	}
	
	public void saveConfig() {
		Config.SERVER.str_singleplayersleep_SleepMessage.set(sleepMsg);
		Config.SERVER.int_singleplayersleep_SleepLength.set(delayLen);
		Config.SERVER.bool_singleplayersleep_Enabled.set(enabled);
		Config.SERVER.str_singleplayersleep_SleepMessage.save();
		Config.SERVER.int_singleplayersleep_SleepLength.save();
		Config.SERVER.bool_singleplayersleep_Enabled.save();
	}
}

 

 

Spoiler

package com.github.joelgodofwar.sps.server.config;

import org.apache.commons.lang3.tuple.Pair;

import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
import net.minecraftforge.common.ForgeConfigSpec.IntValue;

public class SPSConfig {
	
	/**
     * General configuration that doesn't need to be synchronized but needs to be available before server startup
     */
    public static class Common {
        public final ForgeConfigSpec.ConfigValue<String> str_singleplayersleep_SleepMessage;//public final ForgeConfigSpec.ConfigValue<? extends String> str_singleplayersleep_SleepMessage;
        public final BooleanValue bool_singleplayersleep_Enabled;
        public final IntValue int_singleplayersleep_SleepLength;

        Common(ForgeConfigSpec.Builder builder)
        {
            builder.comment("General configuration settings")
                    .push("general");

            str_singleplayersleep_SleepMessage = builder
                    .comment("Defines the sleep message to be displayed when a player sleeps.",
                             "%1$s is a placeholder for the sleeping player's name.")
                    .translation("singleplayersleep.config.sleepmsg")
                    .define("str_singleplayersleep_SleepMessage", "%1$s went to bed. Sweet dreams!");

            bool_singleplayersleep_Enabled = builder
                    .comment("Enable or Disable this mod")
                    .translation("singleplayersleep.config.enabled")
                    .define("bool_singleplayersleep_Enabled", true);

            int_singleplayersleep_SleepLength = builder
                    .comment("Define the length of time to delay in ticks before changing the time.",
                    		"200(10 seconds) is default, as it is just over the vanilla length for single player.")
                    .translation("singleplayersleep.config.delay")
                    .defineInRange("int_singleplayersleep_SleepLength", 200, 0, Integer.MAX_VALUE);

            builder.pop();
        }

    }
    
    public static final ForgeConfigSpec commonSpec;
    public static final Common COMMON;
    static {
        final Pair<Common, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(Common::new);
        commonSpec = specPair.getRight();
        COMMON = specPair.getLeft();
    }
    
}

 

This is where I grabbed the values into variables.

Spoiler

package com.github.joelgodofwar.sps.common.config;

public class SinglePlayerSleepModConfig {

/** // Client	
public static boolean clientBoolean;
public static List<String> clientStringList;
public static EnumDyeColor clientEnumDyeColor;

// Server	
public static boolean serverBoolean;
public static List<String> serverStringList;
public static EnumDyeColor serverEnumDyeColor;*/
	
//Common	
public static String str_singleplayersleep_SleepMessage;//public final ForgeConfigSpec.ConfigValue<? extends String> str_singleplayersleep_SleepMessage;
public static Boolean bool_singleplayersleep_Enabled;
public static Integer int_singleplayersleep_SleepLength;

	
}

 

I think that's it, if not the repo has all of the files.

Posted

I would honestly delete that entire repo and recreate it correctly, that privacy issue is still there for anyone that wants to find it.

Just trying to help keep ya safe buddy!

Posted
13 hours ago, Ugdhar said:

I would honestly delete that entire repo and recreate it correctly, that privacy issue is still there for anyone that wants to find it.

Just trying to help keep ya safe buddy!

While I still don't see my login info in those files, I have deleted the repo and republished it using github Desktop. Thank you.

Posted

For those interested this is the solution for me, instead of using server config, I setup common config.

This is the Config class.

Spoiler

 


package com.github.joelgodofwar.sps.common.config;

import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
import net.minecraftforge.common.ForgeConfigSpec.IntValue;

import org.apache.commons.lang3.tuple.Pair;

public class Config {
    //public static final ServerConfig SERVER;
    //public static final ForgeConfigSpec SERVER_SPEC;
    public static final CommonConfig COMMON;
    public static final ForgeConfigSpec COMMON_SPEC;

    static {
        final Pair<CommonConfig, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(CommonConfig::new);
        COMMON_SPEC = specPair.getRight();
        COMMON = specPair.getLeft();
    }
    
    public static String str_SleepMessage;
    public static Boolean bool_Enabled;
    public static Integer int_SleepLength;
    public static Boolean bool_CancelOnExit;
    public static Boolean bool_Debug;
    
    public static void load() {
    	str_SleepMessage = COMMON.str_SleepMessage.get();
    	bool_Enabled = COMMON.bool_Enabled.get();
    	int_SleepLength = COMMON.int_SleepLength.get();
    	bool_CancelOnExit = COMMON.bool_CancelOnExit.get();
    	bool_Debug = COMMON.bool_Debug.get();
    }
    
    public static class CommonConfig {
    	public final ForgeConfigSpec.ConfigValue<String> str_SleepMessage;
        public final BooleanValue bool_Enabled;
        public final IntValue int_SleepLength;
        public final BooleanValue bool_CancelOnExit;
        public final BooleanValue bool_Debug;
    		

    		
        CommonConfig(final ForgeConfigSpec.Builder builder) {
            builder.comment("Single Player Sleep Mod settings")
            .push("settings");

    		str_SleepMessage = builder
    		        .comment(" Defines the sleep message to be displayed when a player sleeps.",
    		                 " %1$s is a placeholder for the sleeping player's name.")
    		        .translation("singleplayersleep.config.sleepmsg")
    		        .define("str_SleepMessage", "%1$s went to bed. Sweet dreams!");
    		
    		bool_Enabled = builder
    		        .comment(" Enable or Disable this mod")
    		        .translation("singleplayersleep.config.enabled")
    		        .define("bool_Enabled", true);
    		
    		int_SleepLength = builder
    		        .comment(" Define the length of time to delay in ticks before changing the time.",
    		        		" 300(15 seconds) is default, as it is just over the vanilla length for single player.")
    		        .translation("singleplayersleep.config.delay")
    		        .defineInRange("int_SleepLength", 300, 20, Integer.MAX_VALUE);
    		
    		bool_CancelOnExit =  builder
    		        .comment(" Should SPS cancel sleep if the player exits the bed?")
    		        .translation("singleplayersleep.config.cancel_on_exit")
    		        .define("bool_CancelOnExit", true);
    		
    		bool_Debug =  builder
    		        .comment(" Should SPS log debug information in the console/log?")
    		        .translation("singleplayersleep.config.debug")
    		        .define("bool_Devug", false);
    		
    		builder.pop();
    		
    	}
    }
}

 

You register it like this, in the main class of your mod.

Spoiler

package com.github.joelgodofwar.sps;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.github.joelgodofwar.sps.common.config.Config;
import com.github.joelgodofwar.sps.server.events.InteractEventHandler;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod("singleplayersleepmod")
public class SinglePlayerSleepMod {
	
	// Directly reference a log4j logger.
    public static final Logger LOGGER = LogManager.getLogger();
    public static final String MOD_ID = "singleplayersleepmod";
    InteractEventHandler IEventHandler = new InteractEventHandler();

    public SinglePlayerSleepMod() {
        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
        ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.COMMON_SPEC, "singleplayersleepmod-common.toml");
        
        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
    }
    

    private void setup(final FMLCommonSetupEvent event){ // some preinit code
        LOGGER.info("SinglePlayerSleep Loading...");
        
        //Config config = new Configuration(new File(event.getModConfigurationDirectory().getAbsolutePath() + "additional/path/to/your/config.cfg"));
    }

    private void enqueueIMC(final InterModEnqueueEvent event){ // Send InterModComms
        // some example code to dispatch IMC to another mod
        //InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
    }

    private void processIMC(final InterModProcessEvent event){ // Receive InterModComms
        // some example code to receive and process InterModComms from other mods
        //LOGGER.info("Got IMC {}", event.getIMCStream().
        //        map(m->m.getMessageSupplier().get()).
        //        collect(Collectors.toList()));
    }

    @SuppressWarnings("resource")
	private void doClientStuff(final FMLClientSetupEvent event) { // Client side stuff
        // do something that can only be done on the client
        //LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().options);
        
    }

    // You can use SubscribeEvent and let the Event Bus discover methods to call
    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        // do something when the server starts
        //LOGGER.info("HELLO from server starting");
    }
    @SubscribeEvent
    public void doServerStuff(final FMLServerStartedEvent  event) {
    	LOGGER.info("Registering Events...");
    	MinecraftForge.EVENT_BUS.register(new InteractEventHandler());
    	//IEventHandler.loadConfig();
    	LOGGER.info("Loading Complete.");
    }
    @SubscribeEvent
    public void doServerStuff(final FMLServerStoppingEvent  event) {
    	LOGGER.info("Saving configs...");
    	Config.COMMON_SPEC.save();
    }
}

 

and you use the values like this.

Spoiler

if(Config.COMMON.bool_Debug.get()){log.info("sleepingWorld SET");}

 

 

  • joelstoner changed the title to [1.16.5] Help with ServerSided Configuration [SOLVED]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Im playing RlCraft, im about 80+ hours in the game and It started to randomly crash in certain areas. This is the crash log It gives me: https://mclo.gs/H1zdyjG Any Idea what is going on? and if It can be fixed? Thanks  
    • hello, when launching my modded minecraft server (1.20.1) in Fabric, my server constantly reboots with this error  if you have any questions or solutions I will get back to you as soon as possible. sorry, my English is pretty bad     [00:40:24] [main/ERROR]: A mod crashed on startup! net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'spectrelib' at 'com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod'!         at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-launcher.jar:1.0.1] Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'spectrelib' at 'com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod'!         at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:403) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:401) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'spectrelib' due to errors, provided by 'veinmining'!         at com.illusivesoulworks.spectrelib.EntrypointUtils.lambda$invokeEntrypoints$0(EntrypointUtils.java:25) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.gatherExceptions(EntrypointUtils.java:41) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:25) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.util.ServiceConfigurationError: com.illusivesoulworks.veinmining.common.platform.services.IPlatform: com.illusivesoulworks.veinmining.platform.FabricPlatform Unable to get public no-arg constructor         at java.util.ServiceLoader.fail(ServiceLoader.java:586) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:679) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_1297 failed         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinPreProcessorException: Attach error for mixins.sodiumdynamiclights.json:lightsource.EntityMixin from mod sodiumdynamiclights during activity: [Transform -> Method sodiumdynamiclights$scheduleTrackedChunksRebuild(Lnet/minecraft/class_761;)V -> INVOKESTATIC -> net/minecraft/class_310::method_1551:()Lnet/minecraft/class_310;]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:313) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1292) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:203) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:437) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:418) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: net.minecraft.class_310         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:791) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:777) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:743) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:307) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1292) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:203) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:437) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:418) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more Caused by: java.lang.ClassNotFoundException: net.minecraft.class_310         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:791) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:777) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:743) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:307) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1292) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:203) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:437) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:418) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.15.3+mixin.0.8.7.jar:0.15.3+mixin.0.8.7]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]         at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.5.jar:?]         at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]         at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]         at java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) ~[?:?]         at java.lang.Class.getConstructor0(Class.java:3578) ~[?:?]         at java.lang.Class.getConstructor(Class.java:2271) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:666) ~[?:?]         at java.util.ServiceLoader$1.run(ServiceLoader.java:663) ~[?:?]         at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]         at java.util.ServiceLoader.getConstructor(ServiceLoader.java:674) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1240) ~[?:?]         at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]         at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]         at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]         at java.util.ServiceLoader.findFirst(ServiceLoader.java:1811) ~[?:?]         at com.illusivesoulworks.veinmining.common.platform.Services.load(Services.java:31) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.platform.Services.<clinit>(Services.java:27) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.common.veinmining.enchantment.VeinMiningEnchantment.<init>(VeinMiningEnchantment.java:33) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningMod.<clinit>(VeinMiningMod.java:28) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.veinmining.VeinMiningConfigInitializer.onInitializeConfig(VeinMiningConfigInitializer.java:9) ~[veinmining-fabric-1.3.1+1.20.1.jar:?]         at com.illusivesoulworks.spectrelib.EntrypointUtils.invokeEntrypoints(EntrypointUtils.java:23) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at com.illusivesoulworks.spectrelib.SpectrePreLaunchFabricMod.onPreLaunch(SpectrePreLaunchFabricMod.java:32) ~[spectrelib-0.13.15+1.20.1-7f355525f2546358.jar:?]         at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.5.jar:?]         at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ~[fabric-loader-0.16.5.jar:?]         ... 4 more
    • An uneducated guess: can you move the layers by a 1000th in any direction? It works on custom models via Blockbench.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.