Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed May 18, 2024
1 parent bc8f234 commit e51db9d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
## Changelog
- port to 1.20.6
- code clean
- (NeoForge) Fix register events issue (#24)
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ public static boolean isModLoaded(String modid) {
throw new AssertionError();
}

@ExpectPlatform
public static boolean isDevEnvironment() {
throw new AssertionError();
}

@ExpectPlatform
public static Path getConfigDir() {
throw new AssertionError();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ public static boolean isModLoaded(String modid) {
return FabricLoader.getInstance().isModLoaded(modid);
}

public static boolean isDevEnvironment() {
return FabricLoader.getInstance().isDevelopmentEnvironment();
}

public static Path getConfigDir() {
return FabricLoader.getInstance().getConfigDir();
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ enabled_platforms=fabric,neoforge
yarn_mappings=1.20.6+build.1

archives_base_name=RyoamicLights
mod_version=0.2.5
mod_version=0.2.6
maven_group=org.thinkingstudio.ryoamiclights

fabric_loader_version=0.15.11
Expand All @@ -15,7 +15,7 @@ mod_menu_version=10.0.0-beta.1

neoforge_version=20.6.70-beta

obsidianui_version=0.2.4+mc1.20.6
obsidianui_version=0.2.5+mc1.20.6

modrinth_id=reCfnRvJ
curseforge_id=913587
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.thinkingstudio.ryoamiclights.neoforge;

import net.neoforged.fml.ModList;
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.fml.loading.FMLPaths;

import java.nio.file.Path;
Expand All @@ -11,10 +10,6 @@ public static boolean isModLoaded(String modid) {
return ModList.get().isLoaded(modid);
}

public static boolean isDevEnvironment() {
return !FMLLoader.isProduction();
}

public static Path getConfigDir() {
return FMLPaths.CONFIGDIR.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
@Mod(RyoamicLights.NAMESPACE)
public class RyoamicLightsNeoForge {
public RyoamicLightsNeoForge(IEventBus modEventBus) {
IEventBus forgeEventBus = NeoForge.EVENT_BUS;
ModLoadingContext context = ModLoadingContext.get();

if (FMLLoader.getDist().isClient()) {
RyoamicLights.get().clientInit();

context.registerExtensionPoint(IConfigScreenFactory.class, () -> (client, screen) -> new SettingsScreen(screen));

modEventBus.addListener(EventPriority.HIGHEST, RenderLevelStageEvent.class, event -> {
forgeEventBus.addListener(EventPriority.HIGHEST, RenderLevelStageEvent.class, event -> {
if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_TRIPWIRE_BLOCKS) {
MinecraftClient.getInstance().getProfiler().swap("dynamic_lighting");
RyoamicLights.get().updateAll(event.getLevelRenderer());
Expand Down

0 comments on commit e51db9d

Please sign in to comment.