Skip to content

Commit

Permalink
Removed Capital + Fixed SCHEDULAR Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MeAlam1 committed Oct 25, 2024
1 parent 7d70a61 commit c076002
Show file tree
Hide file tree
Showing 60 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/software/bluelib/BlueLibConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ private BlueLibConstants() {
public static final Logger LOGGER = Logger.getLogger(BlueLibConstants.MOD_NAME);

/**
* A {@code public static final} {@link ScheduledExecutorService} used to schedule tasks, such as printing messages after a delay.
* A {@code public static} {@link ScheduledExecutorService} used to schedule tasks, such as printing messages after a delay.
* <p>
* This executor runs tasks on a single thread to ensure delayed tasks run in a separate thread from the main thread.
* </p>
*
* @since 1.0.0
*/
public static final ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(1);
public static ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(1);

/**
* A {@code public static final} {@link String} representing the Mod ID for the {@code BlueLib} mod.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -50,6 +51,7 @@ public class ReloadHandler extends ReloadEventHandler {
* @since 1.0.0
*/
public static void onServerStart(MinecraftServer pServer) {
BlueLibConstants.SCHEDULER = new ScheduledThreadPoolExecutor(1);
server = pServer;
ReloadHandler.LoadEntityVariants(server);
BaseLogger.log(BaseLogLevel.INFO, "Entity variants loaded.", true);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -55,6 +56,7 @@ public class ReloadHandler extends ReloadEventHandler {
*/
@SubscribeEvent
public static void onServerStart(ServerStartingEvent pEvent) {
BlueLibConstants.SCHEDULER = new ScheduledThreadPoolExecutor(1);
server = pEvent.getServer();
ReloadHandler.LoadEntityVariants(server);
BaseLogger.log(BaseLogLevel.INFO, "Entity variants loaded.", true);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ forge_version_range=[51,)
forge_loader_version_range=[0,)

# NeoForge
neoforge_version=21.0.167
neoforge_version=21.1.72
neoforge_loader_version_range=[4,)
neoforge_version_range=[21.0.0-beta,)

Expand Down
4 changes: 2 additions & 2 deletions NeoForge/build.gradle → neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ neoForge {
}

dependencies {
compileOnly("curse.maven:geckolib-388172:5605715")
runtimeOnly("curse.maven:geckolib-388172:5605715")
compileOnly("curse.maven:geckolib-388172:5763144")
runtimeOnly("curse.maven:geckolib-388172:5763144")
}

sourceSets.main.resources { srcDir 'src/generated/resources' }
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.fml.event.lifecycle.FMLLoadCompleteEvent;
import net.neoforged.fml.loading.FMLEnvironment;
import org.spongepowered.asm.launch.MixinBootstrap;
import software.bluelib.example.event.ClientEvents;
import software.bluelib.example.init.ModEntities;

import java.util.concurrent.ScheduledThreadPoolExecutor;

/**
* The main class of the {@code BlueLib} mod.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -58,6 +59,7 @@ public class ReloadHandler extends ReloadEventHandler {
*/
@SubscribeEvent
public static void onServerStart(ServerStartingEvent pEvent) {
BlueLibConstants.SCHEDULER = new ScheduledThreadPoolExecutor(1);
server = pEvent.getServer();
ReloadHandler.LoadEntityVariants(server);
BaseLogger.log(BaseLogLevel.INFO, "Entity variants loaded.", true);
Expand Down

0 comments on commit c076002

Please sign in to comment.