diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 000000000..46507b9e2 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "Bash(find:*)" + ], + "deny": [], + "ask": [] + } +} diff --git a/api/build.gradle b/api/build.gradle index a53db100f..d137ea27a 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -1,7 +1,10 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' +} + +neoForge { + version = forge_version } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" } diff --git a/api/src/main/resources/META-INF/MANIFEST.MF b/api/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 000000000..1d093ff86 --- /dev/null +++ b/api/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +COMMENT: This file exists purely for dev time, + anything added here should be mirrored in the build.gradle. +FMLModType: GAMELIBRARY +Automatic-Module-Name: projectred_api diff --git a/build.gradle b/build.gradle index e40ae78a4..a890a857b 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,6 @@ import java.time.Instant plugins { id 'java' id 'maven-publish' - id 'com.github.johnrengelman.shadow' } // Get mod version from CI, else suffix a timestamp (calculated here bc timestamp can change if done separately in each subproject) @@ -65,11 +64,6 @@ subprojects { p -> } } -// Defined explicitly so publishing can access shadowJar property -project(':fabrication') { - apply plugin: 'com.github.johnrengelman.shadow' -} - publishing { repositories { maven { @@ -86,7 +80,7 @@ publishing { artifact project(':core').jar artifact project(':expansion').jar artifact project(':exploration').jar - artifact project(':fabrication').shadowJar + artifact project(':fabrication').jar artifact project(':illumination').jar artifact project(':integration').jar artifact project(':transmission').jar diff --git a/core/build.gradle b/core/build.gradle index 5bc9a900e..1774ba355 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,33 +1,38 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } String mod_id = 'projectred_core' -// Include all sources from API project -sourceSets.main.java.srcDirs += ['../api/src/main/java'] +neoForge { + version = forge_version -minecraft { - accessTransformers.file file("src/main/resources/META-INF/accesstransformer.cfg") -} + accessTransformers { + publish file("src/main/resources/META-INF/accesstransformer.cfg") + } -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } + } - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + unitTest { + enable() } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + + // ProjectRed API + jarJar(implementation project(":api")) // Use JarJar to bake within Core jar + // JEI compileOnly("mezz.jei:jei-${mc_version}-common-api:${jei_version}") compileOnly("mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}") @@ -42,3 +47,8 @@ dependencies { testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } +test { + useJUnitPlatform() + jvmArgs('-Xmx3G', '-Xms1G') +} + diff --git a/core/src/main/generated/.cache/a8d3135d4703cc9330b4a159771e03b835c3ff2f b/core/src/main/generated/.cache/a8d3135d4703cc9330b4a159771e03b835c3ff2f index 51482e87d..faed89843 100644 --- a/core/src/main/generated/.cache/a8d3135d4703cc9330b4a159771e03b835c3ff2f +++ b/core/src/main/generated/.cache/a8d3135d4703cc9330b4a159771e03b835c3ff2f @@ -1,2 +1,2 @@ -// 1.21.1 2025-08-10T20:36:21.936866 Languages: en_us for mod: projectred_core -789a8db6ffa570c8db0bb245338757a5c3790ae6 assets/projectred_core/lang/en_us.json +// 1.21.1 2025-11-28T16:02:07.120057 Languages: en_us for mod: projectred_core +f81ba1baf603907087ec3777768f84bba0911ba4 assets/projectred_core/lang/en_us.json diff --git a/core/src/main/generated/assets/projectred_core/lang/en_us.json b/core/src/main/generated/assets/projectred_core/lang/en_us.json index 0c4a41ee0..fd47b3347 100644 --- a/core/src/main/generated/assets/projectred_core/lang/en_us.json +++ b/core/src/main/generated/assets/projectred_core/lang/en_us.json @@ -52,5 +52,49 @@ "item.projectred_core.wired_plate": "Wired Plate", "item.projectred_core.woven_cloth": "Woven Cloth", "item.projectred_core.yellow_illumar": "Yellow Illumar", - "itemGroup.projectred_core": "Project Red: Core" + "itemGroup.projectred_core": "Project Red: Core", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } \ No newline at end of file diff --git a/core/src/main/java/mrtjp/projectred/core/Configurator.java b/core/src/main/java/mrtjp/projectred/core/Configurator.java index f9ef4088d..a60a9279d 100644 --- a/core/src/main/java/mrtjp/projectred/core/Configurator.java +++ b/core/src/main/java/mrtjp/projectred/core/Configurator.java @@ -2,7 +2,18 @@ import codechicken.lib.config.ConfigCategory; import codechicken.lib.config.ConfigFile; +import codechicken.lib.config.ConfigValue; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.event.config.ModConfigEvent; +import net.neoforged.neoforge.common.ModConfigSpec; +import net.neoforged.neoforge.common.ModConfigSpec.BooleanValue; +import net.neoforged.neoforge.common.ModConfigSpec.IntValue; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; @@ -11,90 +22,273 @@ public class Configurator { - /* Gates */ - public static boolean logicGateSounds = true; - public static boolean logicGateLights = true; - public static int minTimerTicks = 4; - public static boolean unbreakableScrewdriver = false; - - /* Machines */ - public static boolean enableDiamondBlockBreaker = false; - public static int frameMoveLimit = 1024; - - /* Rendering */ - public static boolean logicwires3D = true; - public static boolean staticWires = true; - public static boolean staticGates = true; - public static int lightHaloMax = -1; - public static boolean fabulousLights = true; - - /* World Gen */ - public static String rubyOreKey = "ruby_ore"; - public static String sapphireOreKey = "sapphire_ore"; - public static String peridotOreKey = "peridot_ore"; - public static String tinOreKey = "tin_ore"; - public static String silverOreKey = "silver_ore"; - public static String electrotineOreKey = "electrotine_ore"; - public static String marbleCaveKey = "marble_cave"; - public static boolean gen_MarbleCave = true; - public static boolean gen_Ruby = true; - public static boolean gen_Sapphire = true; - public static boolean gen_Peridot = true; - public static boolean gen_Tin = true; - public static boolean gen_Silver = true; - public static boolean gen_Electrotine = true; - public static Map worldFeatures = new HashMap<>(); - - /* Compatibility */ - public static boolean compat_CCBundledCable = true; - - /* Fabrication */ - public static int autoCompileTileLimit = 20; - - public static void load() { - ConfigFile configFile = new ConfigFile(MOD_ID).path(Paths.get("config/ProjectRed.cfg")); - ConfigCategory config = configFile.load(); - loadValues(config); - config.save(); + private static final Logger LOGGER = LogManager.getLogger(); + + // Public spec for registration + static final ModConfigSpec serverSpec; + public static final Server SERVER; + + static final ModConfigSpec clientSpec; + public static final Client CLIENT; + + static { + final Pair specPair = new ModConfigSpec.Builder().configure(Server::new); + serverSpec = specPair.getRight(); + SERVER = specPair.getLeft(); + + final Pair clientSpecPair = new ModConfigSpec.Builder().configure(Client::new); + clientSpec = clientSpecPair.getRight(); + CLIENT = clientSpecPair.getLeft(); + } + + /** + * Common configuration - synchronized and available on both sides + */ + public static class Server { + + // World Gen feature keys + public static final String RUBY_ORE_KEY = "ruby_ore"; + public static final String SAPPHIRE_ORE_KEY = "sapphire_ore"; + public static final String PERIDOT_ORE_KEY = "peridot_ore"; + public static final String TIN_ORE_KEY = "tin_ore"; + public static final String SILVER_ORE_KEY = "silver_ore"; + public static final String ELECTROTINE_ORE_KEY = "electrotine_ore"; + public static final String MARBLE_CAVE_KEY = "marble_cave"; + + // General + public final BooleanValue logicGateSounds; + public final BooleanValue unbreakableScrewdriver; + + // Performance + public final BooleanValue logicGateLights; + public final IntValue minTimerTicks; + public final IntValue frameMoveLimit; + public final IntValue autoCompileTileLimit; + + // World Gen category - feature toggles + public final BooleanValue generateRubyOres; + public final BooleanValue generateSapphireOres; + public final BooleanValue generatePeridotOres; + public final BooleanValue generateTinOres; + public final BooleanValue generateSilverOres; + public final BooleanValue generateElectrotineOres; + public final BooleanValue generateMarbleCaves; + + // World features map (internal) + private final Map worldFeatures = new HashMap<>(); + + private Server(ModConfigSpec.Builder builder) { + + // Gameplay settings + builder.comment("Settings that effect gameplay, balance, progression, etc.") + .push("gameplay"); + + unbreakableScrewdriver = builder + .comment("If set to true, the basic screwdriver will not take damage") + .define("infinite_screwdriver", false); + + logicGateSounds = builder + .comment("If set to false, logic gates will not make sounds") + .define("gate_sounds", true); + + builder.pop(); + + // Performance settings + builder.comment("Settings that effect performance") + .push("performance"); + + logicGateLights = builder + .comment("If set to false, logic gates will not emit light. Can help reduce light updates " + + "on particularly large and fast-updating redstone circuits.") + .define("gate_lights", true); + + minTimerTicks = builder + .comment("Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce " + + "lower update rates.") + .defineInRange("gate_min_timer_ticks", 4, 4, Integer.MAX_VALUE); + + frameMoveLimit = builder + .comment("Max blocks in a moving frame structure. Limiting this can improve performance on servers where " + + "lots of structures are being moved.") + .defineInRange("frame_move_limit", 1024, 1, 4096); + + autoCompileTileLimit = builder + .comment("Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always " + + "allow, 0 to never allow). Recommended to keep this very low on servers.") + .defineInRange("auto_compile_tile_limit", 20, -1, Integer.MAX_VALUE); + + builder.pop(); + + // World generation settings + builder.comment("World generation settings") + .push("world_gen"); + + generateRubyOres = defineAndStoreFeature(builder, RUBY_ORE_KEY, true); + generateSapphireOres = defineAndStoreFeature(builder, SAPPHIRE_ORE_KEY, true); + generatePeridotOres = defineAndStoreFeature(builder, PERIDOT_ORE_KEY, true); + generateTinOres = defineAndStoreFeature(builder, TIN_ORE_KEY, true); + generateSilverOres = defineAndStoreFeature(builder, SILVER_ORE_KEY, true); + generateElectrotineOres = defineAndStoreFeature(builder, ELECTROTINE_ORE_KEY, true); + generateMarbleCaves = defineAndStoreFeature(builder, MARBLE_CAVE_KEY, true); + + builder.pop(); + } + + private BooleanValue defineAndStoreFeature(ModConfigSpec.Builder builder, String key, boolean defaultValue) { + BooleanValue value = builder.define(key, defaultValue); + worldFeatures.put(key, value); + return value; + } + + /** + * Check if a world feature is enabled by its key + * @param key The feature key from biome modifier JSON + * @return true if the feature is enabled + */ + public boolean isWorldFeatureEnabled(String key) { + if (!worldFeatures.containsKey(key)) { + LOGGER.warn("Requested world feature with unknown config key: {}", key); + return false; + } + return worldFeatures.get(key).get(); + } + } + + /** + * Client-only configuration + */ + public static class Client { + // Rendering category + public final BooleanValue logicwires3D; + public final BooleanValue staticWires; + public final BooleanValue staticGates; + public final IntValue lightHaloMax; + public final BooleanValue fabulousLights; + + private Client(ModConfigSpec.Builder builder) { + // Rendering settings + builder.comment("Render settings") + .push("rendering"); + + logicwires3D = builder + .comment("If set to false, flat wire textures will be used for logic gates. Significant performance improvement") + .define("gate_3d_wires", true); + + staticWires = builder + .comment("If set to false, wires will be rendered in the TESR rather than the WorldRenderer") + .define("static_wire_renderer", true); + + staticGates = builder + .comment("If set to false, gates will be rendered in the TESR rather than the WorldRenderer") + .define("static_gate_renderer", true); + + builder.pop(); + + // Lighting + builder.comment("Lighting settings") + .push("lighting"); + + lightHaloMax = builder + .comment("Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered" + + " around ProjectRed light sources. Lower values improve performance. ") + .defineInRange("max_lights", -1, -1, 1024); + + fabulousLights = builder + .comment("Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspace" + + "blooming effect when looking towards ProjectRed light sources.") + .define("fabulous_lights", true); + + builder.pop(); + } } - private static boolean loadAndStoreFeature(ConfigCategory gen, String key, boolean def) { - boolean value = gen.getValue(key).setDefaultBoolean(def).getBoolean(); - worldFeatures.put(key, value); - return value; + @SubscribeEvent + public static void onLoad(final ModConfigEvent.Loading configEvent) { + var loadedSpec = configEvent.getConfig().getSpec(); + if (loadedSpec != serverSpec && loadedSpec != clientSpec) { + return; + } + + try { + // Check for old config + Path oldConfigPath = Paths.get("config", "ProjectRed.cfg"); + if (!Files.exists(oldConfigPath)) { + LOGGER.debug("ProjectRed config migration: No legacy config found, skipping migration..."); + return; + } else { + LOGGER.debug("ProjectRed config migration: Legacy config found, attempting migration..."); + } + + // Load legacy config using CodeChickenLib + ConfigFile legacyConfig = new ConfigFile(MOD_ID).path(oldConfigPath); + ConfigCategory root = legacyConfig.load(); + ConfigCategory migrationCategory = root + .getCategory("neoforge_config_migration") + .setComment("Records migration from legacy ProjectRed.cfg to NeoForge Config toml config"); + + // Check if already migrated + ConfigValue migrationValue = migrationCategory + .getValue(loadedSpec == serverSpec ? "server_migrated" : "client_migrated") + .setDefaultBoolean(false); + + if (migrationValue.getBoolean()) { + LOGGER.debug("Legacy config indicates already migrated ({}). Skipping...", migrationValue.getName()); + return; + } + + // Run appropriate migration function + LOGGER.info("Migrating server settings {} -> {}", oldConfigPath.getFileName(), configEvent.getConfig().getFileName()); + if (loadedSpec == serverSpec) { + migrateLegacyServerValues(root); + serverSpec.save(); + } else { + migrateLegacyClientValues(root); + clientSpec.save(); + } + + // Mark as migrated to prevent re-migration + migrationValue.setBoolean(true); + migrationCategory.save(); + + } catch (Exception e) { + LOGGER.error("Failed to migrate legacy config, using defaults", e); + } + } + + private static void migrateLegacyServerValues(ConfigCategory root) { + // Gates category + ConfigCategory general = root.getCategory("general"); + SERVER.logicGateSounds.set(general.getValue("gate_sounds").setDefaultBoolean(true).getBoolean()); + SERVER.logicGateLights.set(general.getValue("gate_lights").setDefaultBoolean(true).getBoolean()); + SERVER.minTimerTicks.set(general.getValue("gate_min_timer_ticks").setDefaultInt(4).getInt()); + SERVER.unbreakableScrewdriver.set(general.getValue("infinite_screwdriver").setDefaultBoolean(false).getBoolean()); + + // Machines category + ConfigCategory machines = root.getCategory("machines"); + SERVER.frameMoveLimit.set(machines.getValue("frame_move_limit").setDefaultInt(1024).getInt()); + + // World Gen category + ConfigCategory gen = root.getCategory("world_gen"); + SERVER.generateRubyOres.set(gen.getValue("ruby_ore").setDefaultBoolean(true).getBoolean()); + SERVER.generateSapphireOres.set(gen.getValue("sapphire_ore").setDefaultBoolean(true).getBoolean()); + SERVER.generatePeridotOres.set(gen.getValue("peridot_ore").setDefaultBoolean(true).getBoolean()); + SERVER.generateTinOres.set(gen.getValue("tin_ore").setDefaultBoolean(true).getBoolean()); + SERVER.generateSilverOres.set(gen.getValue("silver_ore").setDefaultBoolean(true).getBoolean()); + SERVER.generateElectrotineOres.set(gen.getValue("electrotine_ore").setDefaultBoolean(true).getBoolean()); + SERVER.generateMarbleCaves.set(gen.getValue("marble_cave").setDefaultBoolean(true).getBoolean()); + + // Fabrication category + ConfigCategory fab = root.getCategory("fabrication"); + SERVER.autoCompileTileLimit.set(fab.getValue("auto_compile_tile_limit").setDefaultInt(20).getInt()); } - private static void loadValues(ConfigCategory config) { - ConfigCategory general = config.getCategory("general").setComment("General settings"); - logicGateSounds = general.getValue("gate_sounds").setDefaultBoolean(logicGateSounds).setComment("If set to false, logic gates will not make sounds").getBoolean(); - logicGateLights = general.getValue("gate_lights").setDefaultBoolean(logicGateLights).setComment("If set to false, logic gates will not emit light").getBoolean(); - minTimerTicks = general.getValue("gate_min_timer_ticks").setDefaultInt(minTimerTicks).setComment("Minimum amount of ticks the timer gates can be set to (min 4)").getInt(); - unbreakableScrewdriver = general.getValue("infinite_screwdriver").setDefaultBoolean(unbreakableScrewdriver).setComment("If set to true, the basic screwdriver will not take damage").getBoolean(); - - ConfigCategory machines = config.getCategory("machines").setComment("Settings related to machines and devices"); - enableDiamondBlockBreaker = machines.getValue("diamond_block_breaker").setDefaultBoolean(enableDiamondBlockBreaker).setComment("Allow the Diamond Block Breaker to be crafted").getBoolean(); - frameMoveLimit = machines.getValue("frame_move_limit").setDefaultInt(frameMoveLimit).setComment("Max blocks in a moving frame structure").getInt(); - - ConfigCategory rendering = config.getCategory("rendering").setComment("Client render settings"); - logicwires3D = rendering.getValue("gate_3d_wires").setDefaultBoolean(logicwires3D).setComment("If set to false, flat wire textures will be used for logic gates. Significant performance improvement").getBoolean(); - staticWires = rendering.getValue("static_wire_renderer").setDefaultBoolean(staticWires).setComment("If set to false, wires will be rendered in the TESR rather than the WorldRenderer").getBoolean(); - staticGates = rendering.getValue("static_gate_renderer").setDefaultBoolean(staticGates).setComment("If set to false, gates will be rendered in the TESR rather than the WorldRenderer").getBoolean(); - lightHaloMax = rendering.getValue("max_lights").setDefaultInt(lightHaloMax).setComment("Max lights on screen at a time, -1 for unlimited").getInt(); - fabulousLights = rendering.getValue("fabulous_lights").setDefaultBoolean(fabulousLights).setComment("Use fabulous shader pipeline for lights when on Fabulous Graphics mode").getBoolean(); - - ConfigCategory gen = config.getCategory("world_gen").setComment("World gen settings"); - gen_Ruby = loadAndStoreFeature(gen, rubyOreKey, true); - gen_Sapphire = loadAndStoreFeature(gen, sapphireOreKey, true); - gen_Peridot = loadAndStoreFeature(gen, peridotOreKey, true); - gen_Tin = loadAndStoreFeature(gen, tinOreKey, true); - gen_Silver = loadAndStoreFeature(gen, silverOreKey, true); - gen_Electrotine = loadAndStoreFeature(gen, electrotineOreKey, true); - gen_MarbleCave = loadAndStoreFeature(gen, marbleCaveKey, true); - - ConfigCategory compat = config.getCategory("compatibility").setComment("Control the loading of various compatibility hooks. These settings are ignored unless the Compatibility module is installed."); - compat_CCBundledCable = compat.getValue("computercraft").setDefaultBoolean(compat_CCBundledCable).setComment("This allows computers to connect to bundled cables with the RS API.").getBoolean(); - - ConfigCategory fab = config.getCategory("fabrication").setComment("Settings for Fabrication circuit compilation"); - autoCompileTileLimit = fab.getValue("auto_compile_tile_limit").setDefaultInt(autoCompileTileLimit).setComment("Tile count before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.").getInt(); + private static void migrateLegacyClientValues(ConfigCategory root) { + // Rendering category + ConfigCategory rendering = root.getCategory("rendering"); + CLIENT.logicwires3D.set(rendering.getValue("gate_3d_wires").setDefaultBoolean(true).getBoolean()); + CLIENT.staticWires.set(rendering.getValue("static_wire_renderer").setDefaultBoolean(true).getBoolean()); + CLIENT.staticGates.set(rendering.getValue("static_gate_renderer").setDefaultBoolean(true).getBoolean()); + CLIENT.lightHaloMax.set(rendering.getValue("max_lights").setDefaultInt(-1).getInt()); + CLIENT.fabulousLights.set(rendering.getValue("fabulous_lights").setDefaultBoolean(true).getBoolean()); } } diff --git a/core/src/main/java/mrtjp/projectred/core/ProjectRedCore.java b/core/src/main/java/mrtjp/projectred/core/ProjectRedCore.java index de208edb7..1f3ecff01 100644 --- a/core/src/main/java/mrtjp/projectred/core/ProjectRedCore.java +++ b/core/src/main/java/mrtjp/projectred/core/ProjectRedCore.java @@ -10,7 +10,6 @@ import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraft.world.inventory.MenuType; -import net.minecraft.world.item.ComplexItem; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.crafting.RecipeSerializer; @@ -20,9 +19,12 @@ import net.neoforged.fml.ModContainer; import net.neoforged.fml.ModList; import net.neoforged.fml.common.Mod; +import net.neoforged.fml.config.ModConfig; import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; import net.neoforged.fml.loading.FMLEnvironment; import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; +import net.neoforged.neoforge.client.gui.ConfigurationScreen; +import net.neoforged.neoforge.client.gui.IConfigScreenFactory; import net.neoforged.neoforge.common.data.BlockTagsProvider; import net.neoforged.neoforge.common.data.ExistingFileHelper; import net.neoforged.neoforge.data.event.GatherDataEvent; @@ -64,6 +66,14 @@ public class ProjectRedCore { public ProjectRedCore(ModContainer container, IEventBus modEventBus) { ProjectRedCore.container = container; + // Register config + container.registerConfig(ModConfig.Type.SERVER, Configurator.serverSpec, "projectred-server.toml"); + container.registerConfig(ModConfig.Type.CLIENT, Configurator.clientSpec, "projectred-client.toml"); + container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new); + + // Register config event handlers + modEventBus.addListener(Configurator::onLoad); + modEventBus.addListener(this::commonSetup); modEventBus.addListener(this::onGatherDataEvent); modEventBus.addListener(this::onRegisterCaps); @@ -88,15 +98,10 @@ public static ModContainer getContainer() { } private void commonSetup(final FMLCommonSetupEvent event) { - // Load config file - Configurator.load(); - // Load compatibility modules - if (Configurator.compat_CCBundledCable) { - //noinspection Convert2MethodRef - ModList.get().getModContainerById("computercraft") - .ifPresent(mod -> ComputerCraftCompatibility.init(mod)); - } + //noinspection Convert2MethodRef + ModList.get().getModContainerById("computercraft") + .ifPresent(mod -> ComputerCraftCompatibility.init(mod)); } private void onGatherDataEvent(final GatherDataEvent event) { diff --git a/core/src/main/java/mrtjp/projectred/core/block/ProjectRedBlock.java b/core/src/main/java/mrtjp/projectred/core/block/ProjectRedBlock.java index 9c40f433a..05d1723d8 100644 --- a/core/src/main/java/mrtjp/projectred/core/block/ProjectRedBlock.java +++ b/core/src/main/java/mrtjp/projectred/core/block/ProjectRedBlock.java @@ -83,8 +83,10 @@ public ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level } @Override - protected InteractionResult useWithoutItem(BlockState p_60503_, Level p_60504_, BlockPos p_60505_, Player p_60506_, BlockHitResult p_60508_) { - return super.useWithoutItem(p_60503_, p_60504_, p_60505_, p_60506_, p_60508_); + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hit) { + BlockEntity tile = level.getBlockEntity(pos); + if (tile instanceof IBlockEventBlockEntity) return ((IBlockEventBlockEntity) tile).useWithoutItem(player, hit); + return InteractionResult.PASS; } @Override diff --git a/core/src/main/java/mrtjp/projectred/core/client/HaloRenderer.java b/core/src/main/java/mrtjp/projectred/core/client/HaloRenderer.java index d6ef33848..f0c9ea43d 100644 --- a/core/src/main/java/mrtjp/projectred/core/client/HaloRenderer.java +++ b/core/src/main/java/mrtjp/projectred/core/client/HaloRenderer.java @@ -139,7 +139,7 @@ public static void addMultiLight(Transformation t, Cuboid6 box, byte[] alphas) { private static void addHalo(LinkedList list, HaloRenderData data) { list.add(data); - if (Configurator.lightHaloMax > -1 && list.size() > Configurator.lightHaloMax) { + if (Configurator.CLIENT.lightHaloMax.get() > -1 && list.size() > Configurator.CLIENT.lightHaloMax.get()) { list.poll(); } } @@ -285,7 +285,7 @@ private static void unloadPostChain() { } private static boolean isFabulous() { - return Configurator.fabulousLights && Minecraft.getInstance().options.graphicsMode().get().getId() >= GraphicsStatus.FABULOUS.getId(); + return Configurator.CLIENT.fabulousLights.get() && Minecraft.getInstance().options.graphicsMode().get().getId() >= GraphicsStatus.FABULOUS.getId(); } //endregion diff --git a/core/src/main/java/mrtjp/projectred/core/data/CoreLanguageProvider.java b/core/src/main/java/mrtjp/projectred/core/data/CoreLanguageProvider.java index dc67ee9fa..7b83b6d0d 100644 --- a/core/src/main/java/mrtjp/projectred/core/data/CoreLanguageProvider.java +++ b/core/src/main/java/mrtjp/projectred/core/data/CoreLanguageProvider.java @@ -75,5 +75,64 @@ protected void addTranslations() { add(DRAW_PLATE_ITEM.get(), "Draw Plate"); add(SCREWDRIVER_ITEM.get(), "Screwdriver"); add(MULTIMETER_ITEM.get(), "Multimeter"); + + addConfigKey("title", "Project Red Configuration"); + addConfigKey("section.projectred.client.toml", "Client Settings"); + addConfigKey("section.projectred.server.toml", "Server Settings"); + addConfigKey("section.projectred.client.toml.title", "Project Red Client Settings"); + addConfigKey("section.projectred.server.toml.title", "Project Red Server Settings"); + + addConfigKey("gameplay", "Gameplay Settings", "Settings that effect gameplay, balance, progression, etc."); + addConfigKey("infinite_screwdriver", "Unbreakable Screwdriver", "If set to ON, the basic screwdriver will not take damage"); + addConfigKey("gate_sounds", "Logic Gate Sounds", "If set to OFF, logic gates will not make sounds"); + + addConfigKey("performance", "Performance Settings", "Settings that effect performance"); + addConfigKey("gate_lights", "Logic Gate Lights", + "If set to OFF, logic gates will not emit light. Can help reduce light updates " + + "on particularly large and fast-updating redstone circuits."); + addConfigKey("gate_min_timer_ticks", "Logic Gate Minimum Timer Ticks", + "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce " + + "lower update rates."); + addConfigKey("frame_move_limit", "Frame Structure Move Limit", + "Max blocks in a moving frame structure. Limiting this can improve performance on servers where " + + "lots of structures are being moved."); + addConfigKey("auto_compile_tile_limit", "Auto-Compile Tile Limit", + "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always " + + "allow, 0 to never allow). Recommended to keep this very low on servers."); + + addConfigKey("world_gen", "World Gen", "World generation settings for ores, structures, etc."); + addConfigKey("ruby_ore", "Enable Ruby Ores"); + addConfigKey("sapphire_ore", "Enable Sapphire Ores"); + addConfigKey("peridot_ore", "Enable Peridot Ores"); + addConfigKey("tin_ore", "Enable Tin Ores"); + addConfigKey("silver_ore", "Enable Silver Ores"); + addConfigKey("electrotine_ore", "Enable Electrotine Ores"); + addConfigKey("marble_cave", "Enable Marble Caves"); + + addConfigKey("rendering", "Rendering Settings", "Settings that effect rendering and special effects"); + addConfigKey("gate_3d_wires", "3D Logic Gate Wires", + "If set to OFF, flat wire textures will be used for logic gates. " + + "Can improve performance significantly for large circuits"); + addConfigKey("static_wire_renderer", "Static Wire Rendering", + "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer"); + addConfigKey("static_gate_renderer", "Static Gate Rendering", + "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer"); + + addConfigKey("lighting", "Lighting Settings", "Settings that effect ProjectRed light sources (lamps, etc)"); + addConfigKey("max_lights", "Light Render Limit", + "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered" + + " around ProjectRed light sources. Lower values improve performance."); + addConfigKey("fabulous_lights", "Fabulous Light Rendering", + "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspace" + + "blooming effect when looking towards ProjectRed light sources."); + } + + private void addConfigKey(String key, String value) { + add(MOD_ID + ".configuration." + key, value); + } + + private void addConfigKey(String key, String value, String tooltip) { + add(MOD_ID + ".configuration." + key, value); + add(MOD_ID + ".configuration." + key + ".tooltip", tooltip); } } diff --git a/core/src/main/java/mrtjp/projectred/core/item/ScrewdriverItem.java b/core/src/main/java/mrtjp/projectred/core/item/ScrewdriverItem.java index 3d33251dd..f6dea25bc 100644 --- a/core/src/main/java/mrtjp/projectred/core/item/ScrewdriverItem.java +++ b/core/src/main/java/mrtjp/projectred/core/item/ScrewdriverItem.java @@ -31,7 +31,7 @@ public boolean canUse(Player player, InteractionHand hand) { @Override public void damageScrewdriver(Player player, InteractionHand hand) { - if (!Configurator.unbreakableScrewdriver) { + if (!Configurator.SERVER.unbreakableScrewdriver.get()) { player.getItemInHand(hand).hurtAndBreak(1, player, LivingEntity.getSlotForHand(hand)); } } diff --git a/core/src/main/java/mrtjp/projectred/lib/ModelVoxelShape.java b/core/src/main/java/mrtjp/projectred/lib/ModelVoxelShape.java index 88428a4e7..3a45e2656 100644 --- a/core/src/main/java/mrtjp/projectred/lib/ModelVoxelShape.java +++ b/core/src/main/java/mrtjp/projectred/lib/ModelVoxelShape.java @@ -147,7 +147,7 @@ public Tri(Vector3 v0, Vector3 v1, Vector3 v2) { this.v1 = v1; this.v2 = v2; this.normal = VectorUtils.calculateNormal(v0, v1, v2); - this.side = Objects.requireNonNull(VectorUtils.findSideE(normal)); + this.side = Objects.requireNonNull(findClosestSideE(normal)); // Precompute some constants to speed up tracing u = v1.copy().subtract(v0); @@ -213,4 +213,21 @@ public Tri(Vertex5 v0, Vertex5 v1, Vertex5 v2) { return intersection; } } + + //TODO use VectorUtils.findClosestSideE once this is merged + private static @Nullable Direction findClosestSideE(Vector3 normal) { + var absx = Math.abs(normal.x); + var absy = Math.abs(normal.y); + var absz = Math.abs(normal.z); + + if (absy > absx && absy > absz) { + return normal.y > 0 ? Direction.UP : Direction.DOWN; + } else if (absz > absx && absz > absy) { + return normal.z > 0 ? Direction.SOUTH : Direction.NORTH; + } else if (absx > absy && absx > absz) { + return normal.x > 0 ? Direction.WEST : Direction.EAST; + } else { + return null; + } + } } diff --git a/core/src/main/resources/META-INF/accesstransformer.cfg b/core/src/main/resources/META-INF/accesstransformer.cfg index 79e8588ad..2e4ac6652 100644 --- a/core/src/main/resources/META-INF/accesstransformer.cfg +++ b/core/src/main/resources/META-INF/accesstransformer.cfg @@ -1,32 +1,7 @@ -public net.minecraft.client.renderer.RenderStateShard * # Everything. -public net.minecraft.client.renderer.RenderStateShard$LineStateShard # LineStateShard. -public net.minecraft.client.renderer.RenderType *() # All Methods -public net.minecraft.client.renderer.RenderType * # All Fields. public net.minecraft.client.renderer.PostChain * # All fields - public net.minecraft.client.renderer.LevelRenderer setSectionDirty(IIIZ)V - -public net.minecraft.client.particle.Particle setAlpha(F)V -public net.minecraft.client.particle.SpellParticle setAlpha(F)V - -public net.minecraft.client.gui.GuiComponent fillGradient(Lcom/mojang/blaze3d/vertex/PoseStack;IIIIIII)V - -public net.minecraft.world.level.lighting.LevelLightEngine blockEngine -public net.minecraft.world.level.lighting.LevelLightEngine skyEngine - public-f net.minecraft.world.level.block.RedStoneWireBlock shouldSignal - public-f net.minecraft.world.level.block.entity.BlockEntity worldPosition - public net.minecraft.world.entity.LivingEntity useItemRemaining public net.minecraft.world.entity.LivingEntity useItem - -public net.minecraft.world.inventory.AbstractContainerMenu updateDataSlotListeners(II)V public net.minecraft.world.SimpleContainer items - -public net.minecraft.world.phys.shapes.VoxelShape (Lnet/minecraft/world/phys/shapes/DiscreteVoxelShape;)V -public net.minecraft.world.phys.shapes.VoxelShape shape -public net.minecraft.world.phys.shapes.VoxelShape getCoords(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; -public net.minecraft.world.phys.shapes.SliceShape getCoords(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; -public net.minecraft.world.phys.shapes.ArrayVoxelShape getCoords(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; -public net.minecraft.world.phys.shapes.CubeVoxelShape getCoords(Lnet/minecraft/core/Direction$Axis;)Lit/unimi/dsi/fastutil/doubles/DoubleList; diff --git a/core/src/main/resources/META-INF/neoforge.mods.toml b/core/src/main/resources/META-INF/neoforge.mods.toml index f08e91bd7..b117b58c4 100644 --- a/core/src/main/resources/META-INF/neoforge.mods.toml +++ b/core/src/main/resources/META-INF/neoforge.mods.toml @@ -8,7 +8,7 @@ license="MIT" displayName="ProjectRed Core" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/zIlxygxr/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description=''' diff --git a/core/src/main/resources/assets/projectred_core/lang/cs_cz.json b/core/src/main/resources/assets/projectred_core/lang/cs_cz.json index 6cafdcf90..dde7fe2a0 100644 --- a/core/src/main/resources/assets/projectred_core/lang/cs_cz.json +++ b/core/src/main/resources/assets/projectred_core/lang/cs_cz.json @@ -57,5 +57,49 @@ "item.projectred_core.wired_plate": "Drátový plát", "item.projectred_core.woven_cloth": "Tkaná látka", "item.projectred_core.yellow_illumar": "Žlutý illumar", - "itemGroup.projectred_core": "Project Red: Kompatibilita" -} \ No newline at end of file + "itemGroup.projectred_core": "Project Red: Kompatibilita", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." +} diff --git a/core/src/main/resources/assets/projectred_core/lang/de_de.json b/core/src/main/resources/assets/projectred_core/lang/de_de.json index dab73dfc3..0d54c6158 100644 --- a/core/src/main/resources/assets/projectred_core/lang/de_de.json +++ b/core/src/main/resources/assets/projectred_core/lang/de_de.json @@ -67,5 +67,49 @@ "item.projectred_core.upgrd_lz": "LZ-Upgrade", "item.projectred_core.upgrd_rx": "RX-Upgrade", "item.projectred_core.upgrd_ry": "RY-Upgrade", - "item.projectred_core.upgrd_rz": "RZ-Upgrade" + "item.projectred_core.upgrd_rz": "RZ-Upgrade", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/fr_fr.json b/core/src/main/resources/assets/projectred_core/lang/fr_fr.json index 930876cf4..765bb2010 100644 --- a/core/src/main/resources/assets/projectred_core/lang/fr_fr.json +++ b/core/src/main/resources/assets/projectred_core/lang/fr_fr.json @@ -89,5 +89,49 @@ "item.projectred_core.upgrd_lz": "Mise à niveau LZ", "item.projectred_core.upgrd_rx": "Mise à niveau RX", "item.projectred_core.upgrd_ry": "Mise à niveau RY", - "item.projectred_core.upgrd_rz": "Mise à niveau RZ" + "item.projectred_core.upgrd_rz": "Mise à niveau RZ", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/it_it.json b/core/src/main/resources/assets/projectred_core/lang/it_it.json index 34428cb9d..342e47d74 100644 --- a/core/src/main/resources/assets/projectred_core/lang/it_it.json +++ b/core/src/main/resources/assets/projectred_core/lang/it_it.json @@ -89,5 +89,49 @@ "item.projectred_core.upgrd_lz": "Upgrade LZ", "item.projectred_core.upgrd_rx": "Upgrade RX", "item.projectred_core.upgrd_ry": "Upgrade RY", - "item.projectred_core.upgrd_rz": "Upgrade RZ" + "item.projectred_core.upgrd_rz": "Upgrade RZ", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/ja_jp.json b/core/src/main/resources/assets/projectred_core/lang/ja_jp.json index 7f3583874..acbcf887f 100644 --- a/core/src/main/resources/assets/projectred_core/lang/ja_jp.json +++ b/core/src/main/resources/assets/projectred_core/lang/ja_jp.json @@ -67,5 +67,49 @@ "item.projectred_core.upgrd_lz": "LZ Upgrade", "item.projectred_core.upgrd_rx": "RX Upgrade", "item.projectred_core.upgrd_ry": "RY Upgrade", - "item.projectred_core.upgrd_rz": "RZ Upgrade" + "item.projectred_core.upgrd_rz": "RZ Upgrade", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/ko_kr.json b/core/src/main/resources/assets/projectred_core/lang/ko_kr.json index fff0f32ea..fa1f1149c 100644 --- a/core/src/main/resources/assets/projectred_core/lang/ko_kr.json +++ b/core/src/main/resources/assets/projectred_core/lang/ko_kr.json @@ -57,5 +57,49 @@ "item.projectred_core.null_routing_chip": "널 로직 라우팅 칩", "item.projectred_core.router_utility": "라우터 유틸리티", "item.projectred_core.silver_ingot": "은 주괴", - "item.projectred_core.tin_ingot": "주석 주괴" + "item.projectred_core.tin_ingot": "주석 주괴", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/nl_nl.json b/core/src/main/resources/assets/projectred_core/lang/nl_nl.json index a36499e37..2d2f2ad14 100644 --- a/core/src/main/resources/assets/projectred_core/lang/nl_nl.json +++ b/core/src/main/resources/assets/projectred_core/lang/nl_nl.json @@ -86,5 +86,49 @@ "item.projectred_core.upgrd_lz": "LZ-upgrade", "item.projectred_core.upgrd_rx": "RX-upgrade", "item.projectred_core.upgrd_ry": "RY-upgrade", - "item.projectred_core.upgrd_rz": "RZ-upgrade" + "item.projectred_core.upgrd_rz": "RZ-upgrade", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/pt_br.json b/core/src/main/resources/assets/projectred_core/lang/pt_br.json index f987c66ea..adecfd24a 100644 --- a/core/src/main/resources/assets/projectred_core/lang/pt_br.json +++ b/core/src/main/resources/assets/projectred_core/lang/pt_br.json @@ -92,5 +92,49 @@ "item.projectred_core.upgrd_lz": "Atualização ´LZ´", "item.projectred_core.upgrd_rx": "Atualização ´RX´", "item.projectred_core.upgrd_ry": "Atualização ´RY´", - "item.projectred_core.upgrd_rz": "Atualização ´RZ´" + "item.projectred_core.upgrd_rz": "Atualização ´RZ´", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/ru_ru.json b/core/src/main/resources/assets/projectred_core/lang/ru_ru.json index 92e25abff..bf17c6b5d 100644 --- a/core/src/main/resources/assets/projectred_core/lang/ru_ru.json +++ b/core/src/main/resources/assets/projectred_core/lang/ru_ru.json @@ -73,5 +73,49 @@ "item.projectred_core.upgrd_lz": "Улучшение LZ", "item.projectred_core.upgrd_rx": "Улучшение RX", "item.projectred_core.upgrd_ry": "Улучшение RY", - "item.projectred_core.upgrd_rz": "Улучшение RZ" + "item.projectred_core.upgrd_rz": "Улучшение RZ", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/uk_ua.json b/core/src/main/resources/assets/projectred_core/lang/uk_ua.json index 86462a811..698cce249 100644 --- a/core/src/main/resources/assets/projectred_core/lang/uk_ua.json +++ b/core/src/main/resources/assets/projectred_core/lang/uk_ua.json @@ -67,5 +67,49 @@ "item.projectred_core.upgrd_lz": "LZ поліпшення", "item.projectred_core.upgrd_rx": "RX поліпшення", "item.projectred_core.upgrd_ry": "RY поліпшення", - "item.projectred_core.upgrd_rz": "RZ поліпшення" + "item.projectred_core.upgrd_rz": "RZ поліпшення", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/zh_cn.json b/core/src/main/resources/assets/projectred_core/lang/zh_cn.json index 2816cf625..208dff2aa 100644 --- a/core/src/main/resources/assets/projectred_core/lang/zh_cn.json +++ b/core/src/main/resources/assets/projectred_core/lang/zh_cn.json @@ -57,5 +57,49 @@ "item.projectred_core.null_routing_chip": "空逻辑路由芯片", "item.projectred_core.router_utility": "路由器工具", "item.projectred_core.silver_ingot": "银锭", - "item.projectred_core.tin_ingot": "锡锭" + "item.projectred_core.tin_ingot": "锡锭", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/core/src/main/resources/assets/projectred_core/lang/zh_tw.json b/core/src/main/resources/assets/projectred_core/lang/zh_tw.json index bb588c65d..be72afd9a 100644 --- a/core/src/main/resources/assets/projectred_core/lang/zh_tw.json +++ b/core/src/main/resources/assets/projectred_core/lang/zh_tw.json @@ -59,5 +59,49 @@ "item.projectred_core.null_routing_chip": "空邏輯路由晶片", "item.projectred_core.router_utility": "路由器工具", "item.projectred_core.silver_ingot": "銀錠", - "item.projectred_core.tin_ingot": "錫錠" + "item.projectred_core.tin_ingot": "錫錠", + "projectred_core.configuration.auto_compile_tile_limit": "Auto-Compile Tile Limit", + "projectred_core.configuration.auto_compile_tile_limit.tooltip": "Max number of tiles allowed in IC Workbench before auto-compile becomes disallowed (-1 to always allow, 0 to never allow). Recommended to keep this very low on servers.", + "projectred_core.configuration.electrotine_ore": "Enable Electrotine Ores", + "projectred_core.configuration.fabulous_lights": "Fabulous Light Rendering", + "projectred_core.configuration.fabulous_lights.tooltip": "Use fabulous shader pipeline for lights when on Fabulous Graphics mode. This creates a screenspaceblooming effect when looking towards ProjectRed light sources.", + "projectred_core.configuration.frame_move_limit": "Frame Structure Move Limit", + "projectred_core.configuration.frame_move_limit.tooltip": "Max blocks in a moving frame structure. Limiting this can improve performance on servers where lots of structures are being moved.", + "projectred_core.configuration.gameplay": "Gameplay Settings", + "projectred_core.configuration.gameplay.tooltip": "Settings that effect gameplay, balance, progression, etc.", + "projectred_core.configuration.gate_3d_wires": "3D Logic Gate Wires", + "projectred_core.configuration.gate_3d_wires.tooltip": "If set to OFF, flat wire textures will be used for logic gates. Can improve performance significantly for large circuits", + "projectred_core.configuration.gate_lights": "Logic Gate Lights", + "projectred_core.configuration.gate_lights.tooltip": "If set to OFF, logic gates will not emit light. Can help reduce light updates on particularly large and fast-updating redstone circuits.", + "projectred_core.configuration.gate_min_timer_ticks": "Logic Gate Minimum Timer Ticks", + "projectred_core.configuration.gate_min_timer_ticks.tooltip": "Minimum amount of ticks the timer gates can be set to (min 4). Can be used to enforce lower update rates.", + "projectred_core.configuration.gate_sounds": "Logic Gate Sounds", + "projectred_core.configuration.gate_sounds.tooltip": "If set to OFF, logic gates will not make sounds", + "projectred_core.configuration.infinite_screwdriver": "Unbreakable Screwdriver", + "projectred_core.configuration.infinite_screwdriver.tooltip": "If set to ON, the basic screwdriver will not take damage", + "projectred_core.configuration.lighting": "Lighting Settings", + "projectred_core.configuration.lighting.tooltip": "Settings that effect ProjectRed light sources (lamps, etc)", + "projectred_core.configuration.marble_cave": "Enable Marble Caves", + "projectred_core.configuration.max_lights": "Light Render Limit", + "projectred_core.configuration.max_lights.tooltip": "Max lights on screen at a time, -1 for unlimited. This limits the number of light halos that can be rendered around ProjectRed light sources. Lower values improve performance.", + "projectred_core.configuration.performance": "Performance Settings", + "projectred_core.configuration.performance.tooltip": "Settings that effect performance", + "projectred_core.configuration.peridot_ore": "Enable Peridot Ores", + "projectred_core.configuration.rendering": "Rendering Settings", + "projectred_core.configuration.rendering.tooltip": "Settings that effect rendering and special effects", + "projectred_core.configuration.ruby_ore": "Enable Ruby Ores", + "projectred_core.configuration.sapphire_ore": "Enable Sapphire Ores", + "projectred_core.configuration.section.projectred.client.toml": "Client Settings", + "projectred_core.configuration.section.projectred.client.toml.title": "Project Red Client Settings", + "projectred_core.configuration.section.projectred.server.toml": "Server Settings", + "projectred_core.configuration.section.projectred.server.toml.title": "Project Red Server Settings", + "projectred_core.configuration.silver_ore": "Enable Silver Ores", + "projectred_core.configuration.static_gate_renderer": "Static Gate Rendering", + "projectred_core.configuration.static_gate_renderer.tooltip": "If set to OFF, gates will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.static_wire_renderer": "Static Wire Rendering", + "projectred_core.configuration.static_wire_renderer.tooltip": "If set to OFF, wires will be rendered by a Block Entity renderer rather than the World Renderer", + "projectred_core.configuration.tin_ore": "Enable Tin Ores", + "projectred_core.configuration.title": "Project Red Configuration", + "projectred_core.configuration.world_gen": "World Gen", + "projectred_core.configuration.world_gen.tooltip": "World generation settings for ores, structures, etc." } diff --git a/expansion/build.gradle b/expansion/build.gradle index 9fdf80bd0..6cfdf8cd4 100644 --- a/expansion/build.gradle +++ b/expansion/build.gradle @@ -1,29 +1,29 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } String mod_id = 'projectred_expansion' -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + + implementation project(":api") implementation project(":core") } diff --git a/expansion/src/main/generated/.cache/3a4806d9ecafca56efccb50ea70089d19ec4c7d6 b/expansion/src/main/generated/.cache/3a4806d9ecafca56efccb50ea70089d19ec4c7d6 index 1274672c5..f328dd055 100644 --- a/expansion/src/main/generated/.cache/3a4806d9ecafca56efccb50ea70089d19ec4c7d6 +++ b/expansion/src/main/generated/.cache/3a4806d9ecafca56efccb50ea70089d19ec4c7d6 @@ -1,2 +1,2 @@ -// 1.21.1 2025-08-10T20:38:13.266859 ProjectRed-Expansion Sound Definitions -a5c096942d7b68dd1d2ad18bb30fb7661e9c4a6e assets/projectred_expansion/sounds.json +// 1.21.1 2025-11-25T13:21:01.667184 ProjectRed-Expansion Sound Definitions +bc480b8d3bd5cf6ea8a5573a53a87d56684effe6 assets/projectred_expansion/sounds.json diff --git a/expansion/src/main/generated/assets/projectred_expansion/sounds.json b/expansion/src/main/generated/assets/projectred_expansion/sounds.json index 54a997edf..64941dda0 100644 --- a/expansion/src/main/generated/assets/projectred_expansion/sounds.json +++ b/expansion/src/main/generated/assets/projectred_expansion/sounds.json @@ -3,15 +3,45 @@ "sounds": [ { "name": "projectred_expansion:depressurize_1", - "volume": 0.8 + "volume": 0.15 + }, + { + "name": "projectred_expansion:depressurize_1", + "pitch": 0.9, + "volume": 0.15 + }, + { + "name": "projectred_expansion:depressurize_1", + "pitch": 0.8, + "volume": 0.15 + }, + { + "name": "projectred_expansion:depressurize_2", + "volume": 0.15 }, { "name": "projectred_expansion:depressurize_2", - "volume": 0.8 + "pitch": 0.9, + "volume": 0.15 + }, + { + "name": "projectred_expansion:depressurize_2", + "pitch": 0.8, + "volume": 0.15 + }, + { + "name": "projectred_expansion:depressurize_3", + "volume": 0.15 + }, + { + "name": "projectred_expansion:depressurize_3", + "pitch": 0.9, + "volume": 0.15 }, { "name": "projectred_expansion:depressurize_3", - "volume": 0.8 + "pitch": 0.8, + "volume": 0.15 } ], "subtitle": "projectred-expansion.subtitle.depressurize" @@ -20,15 +50,45 @@ "sounds": [ { "name": "projectred_expansion:pressurize_1", - "volume": 0.8 + "volume": 0.15 + }, + { + "name": "projectred_expansion:pressurize_1", + "pitch": 0.9, + "volume": 0.15 + }, + { + "name": "projectred_expansion:pressurize_1", + "pitch": 0.8, + "volume": 0.15 + }, + { + "name": "projectred_expansion:pressurize_2", + "volume": 0.15 }, { "name": "projectred_expansion:pressurize_2", - "volume": 0.8 + "pitch": 0.9, + "volume": 0.15 + }, + { + "name": "projectred_expansion:pressurize_2", + "pitch": 0.8, + "volume": 0.15 + }, + { + "name": "projectred_expansion:pressurize_3", + "volume": 0.15 + }, + { + "name": "projectred_expansion:pressurize_3", + "pitch": 0.9, + "volume": 0.15 }, { "name": "projectred_expansion:pressurize_3", - "volume": 0.8 + "pitch": 0.8, + "volume": 0.15 } ], "subtitle": "projectred-expansion.subtitle.pressurize" diff --git a/expansion/src/main/java/mrtjp/projectred/expansion/MovementManager.java b/expansion/src/main/java/mrtjp/projectred/expansion/MovementManager.java index 568ef8a3a..e60595776 100644 --- a/expansion/src/main/java/mrtjp/projectred/expansion/MovementManager.java +++ b/expansion/src/main/java/mrtjp/projectred/expansion/MovementManager.java @@ -147,6 +147,7 @@ public static void onRenderLevelStage(RenderLevelStageEvent event) { Vec3 cam = event.getCamera().getPosition(); PoseStack stack = event.getPoseStack(); stack.pushPose(); + stack.mulPose(event.getModelViewMatrix()); stack.translate(-cam.x, -cam.y, -cam.z); for (MovingStructure structure : manager.structures.values()) { @@ -277,7 +278,7 @@ private void tick(Level level) { public MovementDescriptor beginMove(Level level, Set blocks, int dir, double speed) { - if (blocks.size() > Configurator.frameMoveLimit) { + if (blocks.size() > Configurator.SERVER.frameMoveLimit.get()) { return InternalMovementInfo.failedMovement(blocks.size()); } @@ -621,6 +622,11 @@ public void executePostMove(Level level) { markChunksForRender(); } + // Mark chunks as changed + for (ChunkPos p : getChunkSet()) { + level.getChunk(p.x, p.z).setUnsaved(true); + } + //TODO Tick rescheduling status = FINISHED; } diff --git a/expansion/src/main/java/mrtjp/projectred/expansion/data/ExpansionSoundProvider.java b/expansion/src/main/java/mrtjp/projectred/expansion/data/ExpansionSoundProvider.java index 5dabcec79..a3e23aab2 100644 --- a/expansion/src/main/java/mrtjp/projectred/expansion/data/ExpansionSoundProvider.java +++ b/expansion/src/main/java/mrtjp/projectred/expansion/data/ExpansionSoundProvider.java @@ -12,6 +12,14 @@ public class ExpansionSoundProvider extends SoundDefinitionsProvider { + // Sound files + private static final ResourceLocation PRESSURIZE_1 = ResourceLocation.fromNamespaceAndPath(MOD_ID, "pressurize_1"); + private static final ResourceLocation PRESSURIZE_2 = ResourceLocation.fromNamespaceAndPath(MOD_ID, "pressurize_2"); + private static final ResourceLocation PRESSURIZE_3 = ResourceLocation.fromNamespaceAndPath(MOD_ID, "pressurize_3"); + private static final ResourceLocation DEPRESSURIZE_1 = ResourceLocation.fromNamespaceAndPath(MOD_ID, "depressurize_1"); + private static final ResourceLocation DEPRESSURIZE_2 = ResourceLocation.fromNamespaceAndPath(MOD_ID, "depressurize_2"); + private static final ResourceLocation DEPRESSURIZE_3 = ResourceLocation.fromNamespaceAndPath(MOD_ID, "depressurize_3"); + public ExpansionSoundProvider(PackOutput output, ExistingFileHelper helper) { super(output, MOD_ID, helper); } @@ -27,24 +35,30 @@ public void registerSounds() { add(PRESSURIZE, definition() .subtitle(ExpansionUnlocal.UL_SUBTITLE_PRESSURIZE) .with( - sound(ResourceLocation.fromNamespaceAndPath(MOD_ID, "pressurize_1")) - .volume(0.8F), - sound(ResourceLocation.fromNamespaceAndPath(MOD_ID, "pressurize_2")) - .volume(0.8F), - sound(ResourceLocation.fromNamespaceAndPath(MOD_ID, "pressurize_3")) - .volume(0.8F) + sound(PRESSURIZE_1).volume(0.15).pitch(1.0), + sound(PRESSURIZE_1).volume(0.15).pitch(0.9), + sound(PRESSURIZE_1).volume(0.15).pitch(0.8), + sound(PRESSURIZE_2).volume(0.15).pitch(1.0), + sound(PRESSURIZE_2).volume(0.15).pitch(0.9), + sound(PRESSURIZE_2).volume(0.15).pitch(0.8), + sound(PRESSURIZE_3).volume(0.15).pitch(1.0), + sound(PRESSURIZE_3).volume(0.15).pitch(0.9), + sound(PRESSURIZE_3).volume(0.15).pitch(0.8) ) ); add(DEPRESSURIZE, definition() .subtitle(ExpansionUnlocal.UL_SUBTITLE_DEPRESSURIZE) .with( - sound(ResourceLocation.fromNamespaceAndPath(MOD_ID, "depressurize_1")) - .volume(0.8F), - sound(ResourceLocation.fromNamespaceAndPath(MOD_ID, "depressurize_2")) - .volume(0.8F), - sound(ResourceLocation.fromNamespaceAndPath(MOD_ID, "depressurize_3")) - .volume(0.8F) + sound(DEPRESSURIZE_1).volume(0.15).pitch(1.0), + sound(DEPRESSURIZE_1).volume(0.15).pitch(0.9), + sound(DEPRESSURIZE_1).volume(0.15).pitch(0.8), + sound(DEPRESSURIZE_2).volume(0.15).pitch(1.0), + sound(DEPRESSURIZE_2).volume(0.15).pitch(0.9), + sound(DEPRESSURIZE_2).volume(0.15).pitch(0.8), + sound(DEPRESSURIZE_3).volume(0.15).pitch(1.0), + sound(DEPRESSURIZE_3).volume(0.15).pitch(0.9), + sound(DEPRESSURIZE_3).volume(0.15).pitch(0.8) ) ); } diff --git a/expansion/src/main/java/mrtjp/projectred/expansion/item/IChargable.java b/expansion/src/main/java/mrtjp/projectred/expansion/item/IChargable.java index f7a486b8e..b0bea221c 100644 --- a/expansion/src/main/java/mrtjp/projectred/expansion/item/IChargable.java +++ b/expansion/src/main/java/mrtjp/projectred/expansion/item/IChargable.java @@ -35,6 +35,7 @@ default Tuple drawPower(ItemStack stack, int power) { stack.setDamageValue(stack.getDamageValue() + toDraw); if (getChargedVariant() != getEmptyVariant() && stack.getDamageValue() >= stack.getMaxDamage()) { + //TODO do not copy damage components ItemStack emptyStack = new ItemStack(getEmptyVariant(), 1); emptyStack.applyComponents(stack.getComponents()); stack = emptyStack; diff --git a/expansion/src/main/java/mrtjp/projectred/expansion/part/BaseTubePart.java b/expansion/src/main/java/mrtjp/projectred/expansion/part/BaseTubePart.java index 08b46c5a8..fb7ef8b5f 100644 --- a/expansion/src/main/java/mrtjp/projectred/expansion/part/BaseTubePart.java +++ b/expansion/src/main/java/mrtjp/projectred/expansion/part/BaseTubePart.java @@ -27,7 +27,6 @@ import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.InteractionHand; -import net.minecraft.world.InteractionResult; import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -212,7 +211,7 @@ public int packedConnMap() { } public boolean useStaticRenderer() { - return Configurator.staticWires; + return Configurator.CLIENT.staticWires.get(); } @OnlyIn(Dist.CLIENT) diff --git a/expansion/src/main/java/mrtjp/projectred/expansion/part/PneumaticTubePart.java b/expansion/src/main/java/mrtjp/projectred/expansion/part/PneumaticTubePart.java index 3dd859694..ba1c9d448 100644 --- a/expansion/src/main/java/mrtjp/projectred/expansion/part/PneumaticTubePart.java +++ b/expansion/src/main/java/mrtjp/projectred/expansion/part/PneumaticTubePart.java @@ -228,7 +228,9 @@ public void tick() { protected void onRemovalSeveredLink() { super.onRemovalSeveredLink(); // On removal, we must've severed an active link. Play pressure sound - level().playSound(null, pos(), ExpansionSounds.DEPRESSURIZE.get(), SoundSource.BLOCKS, 1.0F, 1.0F); + level().playSound(null, pos(), ExpansionSounds.DEPRESSURIZE.get(), SoundSource.BLOCKS, + 0.7F + level().getRandom().nextFloat() * 0.3F, //Volume + 1.0F); } @Override @@ -278,7 +280,10 @@ private void onLinksRemoved(List removed) { ) ); Minecraft.getInstance().particleEngine.add(p); - ((ClientLevel)(level())).playLocalSound(pos(), ExpansionSounds.DEPRESSURIZE.get(), SoundSource.BLOCKS, 1.0F, 1.0F, true); + level().playLocalSound(pos(), ExpansionSounds.DEPRESSURIZE.get(), SoundSource.BLOCKS, + 0.7F + level().getRandom().nextFloat() * 0.3F, //Volume + 1.0F, + true); } } @@ -296,7 +301,10 @@ private void onLinksAdded(List added) { ) ); Minecraft.getInstance().particleEngine.add(p); - ((ClientLevel)(level())).playLocalSound(pos(), ExpansionSounds.PRESSURIZE.get(), SoundSource.BLOCKS, 1.0F, 1.0F, true); + level().playLocalSound(pos(), ExpansionSounds.PRESSURIZE.get(), SoundSource.BLOCKS, + 0.7F + level().getRandom().nextFloat() * 0.3F, //Volume + 1.0F, + true); } } //endregion diff --git a/expansion/src/main/java/mrtjp/projectred/expansion/part/RedstoneTubePart.java b/expansion/src/main/java/mrtjp/projectred/expansion/part/RedstoneTubePart.java index 95897a354..9290991f8 100644 --- a/expansion/src/main/java/mrtjp/projectred/expansion/part/RedstoneTubePart.java +++ b/expansion/src/main/java/mrtjp/projectred/expansion/part/RedstoneTubePart.java @@ -83,7 +83,7 @@ protected void read(MCDataInput packet, int key) { case KEY_SIGNAL -> { hasRedstone = packet.readBoolean(); signal = packet.readByte(); - if (Configurator.staticWires) tile().markRender(); + if (Configurator.CLIENT.staticWires.get()) tile().markRender(); } default -> super.read(packet, key); } diff --git a/expansion/src/main/resources/META-INF/neoforge.mods.toml b/expansion/src/main/resources/META-INF/neoforge.mods.toml index 380601357..0bb724b42 100644 --- a/expansion/src/main/resources/META-INF/neoforge.mods.toml +++ b/expansion/src/main/resources/META-INF/neoforge.mods.toml @@ -8,7 +8,7 @@ license="MIT" displayName="ProjectRed Expansion" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/fn5zBLFv/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description=''' diff --git a/exploration/build.gradle b/exploration/build.gradle index 78f4f513b..4c46969ca 100644 --- a/exploration/build.gradle +++ b/exploration/build.gradle @@ -1,29 +1,29 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } String mod_id = 'projectred_exploration' -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + + implementation project(":api") implementation project(":core") } diff --git a/exploration/src/main/java/mrtjp/projectred/exploration/init/ExplorationWorldFeatures.java b/exploration/src/main/java/mrtjp/projectred/exploration/init/ExplorationWorldFeatures.java index d9b503ccd..5c315ed2a 100644 --- a/exploration/src/main/java/mrtjp/projectred/exploration/init/ExplorationWorldFeatures.java +++ b/exploration/src/main/java/mrtjp/projectred/exploration/init/ExplorationWorldFeatures.java @@ -149,15 +149,15 @@ public static void bootstrapBiomeModifiers(BootstrapContext conte HolderSet overworldBiomes = biomes.getOrThrow(BiomeTags.IS_OVERWORLD); // Add overworld ores - context.register(createBiomeModifierKey("add_ruby_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(RUBY_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.rubyOreKey)); - context.register(createBiomeModifierKey("add_sapphire_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(SAPPHIRE_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.sapphireOreKey)); - context.register(createBiomeModifierKey("add_peridot_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(PERIDOT_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.peridotOreKey)); - context.register(createBiomeModifierKey("add_electrotine_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(ELECTROTINE_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.electrotineOreKey)); - context.register(createBiomeModifierKey("add_tin_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(TIN_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.tinOreKey)); - context.register(createBiomeModifierKey("add_silver_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(SILVER_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.silverOreKey)); + context.register(createBiomeModifierKey("add_ruby_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(RUBY_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.Server.RUBY_ORE_KEY)); + context.register(createBiomeModifierKey("add_sapphire_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(SAPPHIRE_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.Server.SAPPHIRE_ORE_KEY)); + context.register(createBiomeModifierKey("add_peridot_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(PERIDOT_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.Server.PERIDOT_ORE_KEY)); + context.register(createBiomeModifierKey("add_electrotine_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(ELECTROTINE_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.Server.ELECTROTINE_ORE_KEY)); + context.register(createBiomeModifierKey("add_tin_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(TIN_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.Server.TIN_ORE_KEY)); + context.register(createBiomeModifierKey("add_silver_ore_to_overworld"), new ConfigFileControlledAddFeaturesBiomeModifier(overworldBiomes, HolderSet.direct(placedFeatures.getOrThrow(SILVER_ORE_PLACED_FEATURE)), GenerationStep.Decoration.UNDERGROUND_ORES, Configurator.Server.SILVER_ORE_KEY)); // Add overworld carvers - context.register(createBiomeModifierKey("add_marble_cave_to_overworld"), new ConfigFileControlledAddCarversBiomeModifier(overworldBiomes, HolderSet.direct(worldCarvers.getOrThrow(MARBLE_CAVE_CONFIGURED_CARVER)), GenerationStep.Carving.AIR, Configurator.marbleCaveKey)); + context.register(createBiomeModifierKey("add_marble_cave_to_overworld"), new ConfigFileControlledAddCarversBiomeModifier(overworldBiomes, HolderSet.direct(worldCarvers.getOrThrow(MARBLE_CAVE_CONFIGURED_CARVER)), GenerationStep.Carving.AIR, Configurator.Server.MARBLE_CAVE_KEY)); } // Registers the actual ore feature. This describes a single cluster of this specific ore type diff --git a/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddCarversBiomeModifier.java b/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddCarversBiomeModifier.java index 25171a66a..8236f458f 100644 --- a/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddCarversBiomeModifier.java +++ b/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddCarversBiomeModifier.java @@ -16,7 +16,7 @@ import net.neoforged.neoforge.common.world.ModifiableBiomeInfo; /** - * For some reason, Forge does not provide this in {@link BiomeModifiers}. This one also allows for + * A custom version of {@link BiomeModifiers.AddCarversBiomeModifier} that allows * dynamic control via ProjectRed's mod config file. */ public record ConfigFileControlledAddCarversBiomeModifier(HolderSet biomes, HolderSet> carvers, GenerationStep.Carving step, String configKey) implements BiomeModifier { @@ -36,7 +36,7 @@ public MapCodec codec() { } private boolean isEnabled() { - return Configurator.worldFeatures.getOrDefault(configKey, false); + return Configurator.SERVER.isWorldFeatureEnabled(configKey); } public static MapCodec createCodec() { diff --git a/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddFeaturesBiomeModifier.java b/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddFeaturesBiomeModifier.java index f5ce66cf4..c026075fc 100644 --- a/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddFeaturesBiomeModifier.java +++ b/exploration/src/main/java/mrtjp/projectred/exploration/world/gen/ConfigFileControlledAddFeaturesBiomeModifier.java @@ -36,7 +36,7 @@ public MapCodec codec() { } private boolean isEnabled() { - return Configurator.worldFeatures.getOrDefault(configKey, false); + return Configurator.SERVER.isWorldFeatureEnabled(configKey); } public static MapCodec createCodec() { diff --git a/exploration/src/main/resources/META-INF/neoforge.mods.toml b/exploration/src/main/resources/META-INF/neoforge.mods.toml index 15de473d1..8f5590fd4 100644 --- a/exploration/src/main/resources/META-INF/neoforge.mods.toml +++ b/exploration/src/main/resources/META-INF/neoforge.mods.toml @@ -8,7 +8,7 @@ license="MIT" displayName="ProjectRed Exploration" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/TVQMH6pX/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description=''' diff --git a/fabrication/build.gradle b/fabrication/build.gradle index 38c64a8fa..7bb23167d 100644 --- a/fabrication/build.gradle +++ b/fabrication/build.gradle @@ -1,48 +1,34 @@ plugins { - id 'net.neoforged.gradle.userdev' - id 'com.github.johnrengelman.shadow' + id 'net.neoforged.moddev' } String mod_id = 'projectred_fabrication' -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" - implementation project(":core") + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" - // Note: Fails if transitives are included. Possible ForgeGradle bug - implementation(project(":integration")) { transitive = false } - implementation(project(":transmission")) { transitive = false } + implementation project(":api") + implementation project(":core") + implementation project(":integration") + implementation project(":transmission") // Dependencies to be packed into jar - shadow("io.github.mrtjp:fabrication-engine:${fabrication_version}") { transitive = false } + jarJar(implementation("io.github.mrtjp:fabrication-engine:${fabrication_version}") { transitive = false }) } - -// Jar settings -jar.enabled = false -shadowJar { - // Jar configurations - archiveClassifier = jar.archiveClassifier - configurations = [project.configurations.shadow] -} - -build.dependsOn shadowJar - diff --git a/fabrication/src/main/java/mrtjp/projectred/fabrication/editor/ICEditorStateMachine.java b/fabrication/src/main/java/mrtjp/projectred/fabrication/editor/ICEditorStateMachine.java index b8757296c..e0ab7b403 100644 --- a/fabrication/src/main/java/mrtjp/projectred/fabrication/editor/ICEditorStateMachine.java +++ b/fabrication/src/main/java/mrtjp/projectred/fabrication/editor/ICEditorStateMachine.java @@ -196,9 +196,9 @@ private void sendAutoCompileState() { } private boolean checkAutoCompileAvailable() { - if (Configurator.autoCompileTileLimit == -1) return true; - if (Configurator.autoCompileTileLimit == 0) return false; - return editor.getTileMap().getTileCount() <= Configurator.autoCompileTileLimit; + if (Configurator.SERVER.autoCompileTileLimit.get() == -1) return true; + if (Configurator.SERVER.autoCompileTileLimit.get() == 0) return false; + return editor.getTileMap().getTileCount() <= Configurator.SERVER.autoCompileTileLimit.get(); } private void setAutoCompileAndSend(boolean enable) { diff --git a/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/RedstoneTimerGateTile.java b/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/RedstoneTimerGateTile.java index 05d1552be..4c2245d54 100644 --- a/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/RedstoneTimerGateTile.java +++ b/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/RedstoneTimerGateTile.java @@ -92,7 +92,7 @@ public void buildInteractionZoneList(List zones) { private void addTimerMax(int delta) { int newMax = pointerMax + delta; - int min = Math.max(4, Configurator.minTimerTicks) - 2; + int min = Math.max(4, Configurator.SERVER.minTimerTicks.get()) - 2; if (newMax < min) newMax = min; if (newMax != pointerMax) { diff --git a/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/SequencerGateTile.java b/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/SequencerGateTile.java index 4bd00564f..077279468 100644 --- a/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/SequencerGateTile.java +++ b/fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/SequencerGateTile.java @@ -84,7 +84,7 @@ public void buildInteractionZoneList(List zones) { private void addTimerMax(int delta) { int newMax = pointerMax + delta; - int min = Math.max(4, Configurator.minTimerTicks) - 2; + int min = Math.max(4, Configurator.SERVER.minTimerTicks.get()) - 2; if (newMax < min) newMax = min; if (newMax != pointerMax) { diff --git a/fabrication/src/main/resources/META-INF/neoforge.mods.toml b/fabrication/src/main/resources/META-INF/neoforge.mods.toml index d94508161..17468e995 100644 --- a/fabrication/src/main/resources/META-INF/neoforge.mods.toml +++ b/fabrication/src/main/resources/META-INF/neoforge.mods.toml @@ -8,7 +8,7 @@ license="MIT" displayName="ProjectRed Fabrication" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/5H1VMCiY/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description=''' diff --git a/illumination/build.gradle b/illumination/build.gradle index 64759d1d9..c120ab1bf 100644 --- a/illumination/build.gradle +++ b/illumination/build.gradle @@ -1,29 +1,29 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } String mod_id = 'projectred_illumination' -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + + implementation project(":api") implementation project(":core") } diff --git a/illumination/src/main/resources/META-INF/neoforge.mods.toml b/illumination/src/main/resources/META-INF/neoforge.mods.toml index c9cdd1e87..fa1f576e1 100644 --- a/illumination/src/main/resources/META-INF/neoforge.mods.toml +++ b/illumination/src/main/resources/META-INF/neoforge.mods.toml @@ -8,7 +8,7 @@ license="MIT" displayName="ProjectRed Illumination" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/9a4Zqq1k/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description=''' diff --git a/integration/build.gradle b/integration/build.gradle index a5ff2625c..480df3a2b 100644 --- a/integration/build.gradle +++ b/integration/build.gradle @@ -1,29 +1,29 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } String mod_id = 'projectred_integration' -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + + implementation project(":api") implementation project(":core") } diff --git a/integration/src/main/java/mrtjp/projectred/integration/client/GatePartRenderer.java b/integration/src/main/java/mrtjp/projectred/integration/client/GatePartRenderer.java index 48d347c36..33dd6f5aa 100644 --- a/integration/src/main/java/mrtjp/projectred/integration/client/GatePartRenderer.java +++ b/integration/src/main/java/mrtjp/projectred/integration/client/GatePartRenderer.java @@ -22,7 +22,7 @@ private GatePartRenderer() { @Override public void renderStatic(GatePart part, @Nullable RenderType layer, CCRenderState ccrs) { - if (layer == null || (layer == RenderType.cutout() && Configurator.staticGates)) { + if (layer == null || (layer == RenderType.cutout() && Configurator.CLIENT.staticGates.get())) { ccrs.setBrightness(part.level(), part.pos()); GateModelRenderer.instance().renderStatic(ccrs, part, RedundantTransformation.INSTANCE); } diff --git a/integration/src/main/java/mrtjp/projectred/integration/part/ArrayGatePart.java b/integration/src/main/java/mrtjp/projectred/integration/part/ArrayGatePart.java index 71d6c761c..2b938aae0 100644 --- a/integration/src/main/java/mrtjp/projectred/integration/part/ArrayGatePart.java +++ b/integration/src/main/java/mrtjp/projectred/integration/part/ArrayGatePart.java @@ -372,7 +372,7 @@ protected void read(MCDataInput packet, int key) { case KEY_SIGNAL: signal1 = packet.readByte(); signal2 = packet.readByte(); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); @@ -589,7 +589,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_SIGNAL: signal = packet.readByte(); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); diff --git a/integration/src/main/java/mrtjp/projectred/integration/part/BundledGatePart.java b/integration/src/main/java/mrtjp/projectred/integration/part/BundledGatePart.java index bfb9086f0..75a35da3f 100644 --- a/integration/src/main/java/mrtjp/projectred/integration/part/BundledGatePart.java +++ b/integration/src/main/java/mrtjp/projectred/integration/part/BundledGatePart.java @@ -198,7 +198,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_PACKED_IO: unpackClientData(packet.readInt()); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); @@ -372,11 +372,11 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_OUTPUT: output = packet.readShort(); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; case KEY_MASK: mask = packet.readShort(); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); @@ -556,7 +556,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_CLIENT_IO: unpackClientData(packet.readShort()); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); @@ -759,7 +759,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_PRESS_MASK: pressMask = packet.readShort(); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); @@ -922,7 +922,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_BUNDLED_INPUT: bInput0 = packet.readShort(); - if (Configurator.staticGates) tile().markRender(); + if (Configurator.CLIENT.staticGates.get()) tile().markRender(); break; default: super.read(packet, key); diff --git a/integration/src/main/java/mrtjp/projectred/integration/part/ComplexGatePart.java b/integration/src/main/java/mrtjp/projectred/integration/part/ComplexGatePart.java index e3800e9cb..a45580ed9 100644 --- a/integration/src/main/java/mrtjp/projectred/integration/part/ComplexGatePart.java +++ b/integration/src/main/java/mrtjp/projectred/integration/part/ComplexGatePart.java @@ -371,7 +371,7 @@ public int getTimerMax() { @Override public void setTimerMax(int t) { - int minTime = Math.max(4, Configurator.minTimerTicks); + int minTime = Math.max(4, Configurator.SERVER.minTimerTicks.get()); if (t < minTime) t = minTime; if (t != pointer_max) { //TODO check this, should be - 2 here i think pointer_max = t - 2; @@ -556,7 +556,7 @@ public int getTimerMax() { @Override public void setTimerMax(int t) { - int minTime = Math.max(4, Configurator.minTimerTicks); + int minTime = Math.max(4, Configurator.SERVER.minTimerTicks.get()); if (t < minTime) t = minTime; if (t != pointer_max) { pointer_max = t; diff --git a/integration/src/main/java/mrtjp/projectred/integration/part/GatePart.java b/integration/src/main/java/mrtjp/projectred/integration/part/GatePart.java index 3e839bff6..1b082b5ef 100644 --- a/integration/src/main/java/mrtjp/projectred/integration/part/GatePart.java +++ b/integration/src/main/java/mrtjp/projectred/integration/part/GatePart.java @@ -205,13 +205,13 @@ protected void read(MCDataInput packet, int key) { break; case KEY_ORIENTATION: orientation = packet.readByte(); - if (Configurator.staticGates) { + if (Configurator.CLIENT.staticGates.get()) { tile().markRender(); } break; case KEY_SHAPE: gateShape = packet.readByte(); - if (Configurator.staticGates) { + if (Configurator.CLIENT.staticGates.get()) { tile().markRender(); } break; @@ -404,7 +404,7 @@ public float getStrength(Player player, PartRayTraceResult hit) { @Override public int getLightEmission() { - return Configurator.logicGateLights ? 7 : 0; + return Configurator.SERVER.logicGateLights.get() ? 7 : 0; } @Override diff --git a/integration/src/main/java/mrtjp/projectred/integration/part/RedstoneGatePart.java b/integration/src/main/java/mrtjp/projectred/integration/part/RedstoneGatePart.java index 796262df9..6d38e2241 100644 --- a/integration/src/main/java/mrtjp/projectred/integration/part/RedstoneGatePart.java +++ b/integration/src/main/java/mrtjp/projectred/integration/part/RedstoneGatePart.java @@ -81,7 +81,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_STATE: gateState = packet.readByte(); - if (Configurator.staticGates) { + if (Configurator.CLIENT.staticGates.get()) { tile().markRender(); } break; @@ -183,7 +183,7 @@ protected void onOutputChange(int mask) { } protected void tickSound() { - if (Configurator.logicGateSounds) { + if (Configurator.SERVER.logicGateSounds.get()) { level().playSound(null, pos(), SoundEvents.LEVER_CLICK, SoundSource.BLOCKS, 0.15F, 0.5f); } } diff --git a/integration/src/main/resources/META-INF/neoforge.mods.toml b/integration/src/main/resources/META-INF/neoforge.mods.toml index b9d779e82..25441c341 100644 --- a/integration/src/main/resources/META-INF/neoforge.mods.toml +++ b/integration/src/main/resources/META-INF/neoforge.mods.toml @@ -8,7 +8,7 @@ license="MIT" displayName="ProjectRed Integration" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/3JruZJb0/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description=''' diff --git a/runtime/build.gradle b/runtime/build.gradle index 0f52f2c47..cf6ad6efc 100644 --- a/runtime/build.gradle +++ b/runtime/build.gradle @@ -2,36 +2,27 @@ * Used only for generating run configs that include all ProjectRed modules in the classpath. */ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - configureEach { - modSource project(":core").sourceSets.main - modSource project(":expansion").sourceSets.main - modSource project(":exploration").sourceSets.main - modSource project(":fabrication").sourceSets.main - modSource project(":illumination").sourceSets.main - modSource project(":integration").sourceSets.main - modSource project(":transmission").sourceSets.main - } + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - client { - workingDirectory file('run') - } + runs { + configureEach { + } - server { - workingDirectory file('run_server') + client { + } + + server { + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - runtimeOnly project(":core") runtimeOnly project(":expansion") runtimeOnly project(":exploration") diff --git a/settings.gradle b/settings.gradle index 4f3043470..ab3e6e722 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,17 +9,13 @@ pluginManagement { id 'java' id 'maven-publish' id 'net.covers1624.signing' version '1.1.3' apply false - id 'net.neoforged.gradle.userdev' version '7.0.165' apply false - id 'com.github.johnrengelman.shadow' version '7.1.+' apply false + id 'net.neoforged.moddev' version '2.0.77' apply false } } rootProject.name = 'ProjectRed' -// Note: Standalone subproject ('core' subproject directly includes its sources) -include 'api' - -include 'core', 'expansion', 'exploration', 'fabrication', 'illumination', 'integration', 'transmission' +include 'api', 'core', 'expansion', 'exploration', 'fabrication', 'illumination', 'integration', 'transmission' // Empty module for client/server run configurations include 'runtime' diff --git a/transmission/build.gradle b/transmission/build.gradle index 9eaf3c5ab..23184ed3f 100644 --- a/transmission/build.gradle +++ b/transmission/build.gradle @@ -1,29 +1,29 @@ plugins { - id 'net.neoforged.gradle.userdev' + id 'net.neoforged.moddev' } String mod_id = 'projectred_transmission' -minecraft { - accessTransformers.file file("../core/src/main/resources/META-INF/accesstransformer.cfg") -} +neoForge { + version = forge_version -runs { - data { - systemProperty 'mixin.env.remapRefMap', 'true' - systemProperty 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" + accessTransformers.from "../core/src/main/resources/META-INF/accesstransformer.cfg" - workingDirectory file('run') - arguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath - modSource sourceSets.main + runs { + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file("src/main/generated").absolutePath, '--existing', file("src/main/resources").absolutePath + } } } dependencies { - implementation "net.neoforged:neoforge:${forge_version}" - implementation "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" implementation "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + accessTransformers "io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}" + accessTransformers "io.codechicken:CBMultipart:${mc_version}-${cbm_version}" + + implementation project(":api") implementation project(":core") } diff --git a/transmission/src/main/java/mrtjp/projectred/transmission/client/FaceWirePartRenderer.java b/transmission/src/main/java/mrtjp/projectred/transmission/client/FaceWirePartRenderer.java index d4ac70e41..e02ca9d39 100644 --- a/transmission/src/main/java/mrtjp/projectred/transmission/client/FaceWirePartRenderer.java +++ b/transmission/src/main/java/mrtjp/projectred/transmission/client/FaceWirePartRenderer.java @@ -44,6 +44,6 @@ private boolean useStaticRenderer(BaseFaceWirePart part) { return true; } - return Configurator.staticWires; + return Configurator.CLIENT.staticWires.get(); } } diff --git a/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseFaceWirePart.java b/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseFaceWirePart.java index 245cba3c9..409398ab2 100644 --- a/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseFaceWirePart.java +++ b/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseFaceWirePart.java @@ -109,7 +109,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_CONN_MAP: connMap = packet.readInt(); - if (Configurator.staticWires) { + if (Configurator.CLIENT.staticWires.get()) { tile().markRender(); } break; diff --git a/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseWirePart.java b/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseWirePart.java index 41ccf2c9c..aaabb84ef 100644 --- a/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseWirePart.java +++ b/transmission/src/main/java/mrtjp/projectred/transmission/part/BaseWirePart.java @@ -96,7 +96,7 @@ public TextureAtlasSprite getIcon() { } public boolean useStaticRenderer() { - return Configurator.staticWires; + return Configurator.CLIENT.staticWires.get(); } @Override diff --git a/transmission/src/main/java/mrtjp/projectred/transmission/part/FramedRedwirePart.java b/transmission/src/main/java/mrtjp/projectred/transmission/part/FramedRedwirePart.java index 3f371c5e9..7aaf4b155 100644 --- a/transmission/src/main/java/mrtjp/projectred/transmission/part/FramedRedwirePart.java +++ b/transmission/src/main/java/mrtjp/projectred/transmission/part/FramedRedwirePart.java @@ -60,7 +60,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_SIGNAL: signal = packet.readByte(); - if (Configurator.staticWires) tile().markRender(); + if (Configurator.CLIENT.staticWires.get()) tile().markRender(); break; default: super.read(packet, key); diff --git a/transmission/src/main/java/mrtjp/projectred/transmission/part/RedwirePart.java b/transmission/src/main/java/mrtjp/projectred/transmission/part/RedwirePart.java index 98cb193b3..157b83004 100644 --- a/transmission/src/main/java/mrtjp/projectred/transmission/part/RedwirePart.java +++ b/transmission/src/main/java/mrtjp/projectred/transmission/part/RedwirePart.java @@ -64,7 +64,7 @@ protected void read(MCDataInput packet, int key) { switch (key) { case KEY_SIGNAL: signal = packet.readByte(); - if (Configurator.staticWires) tile().markRender(); + if (Configurator.CLIENT.staticWires.get()) tile().markRender(); break; default: super.read(packet, key); diff --git a/transmission/src/main/resources/META-INF/neoforge.mods.toml b/transmission/src/main/resources/META-INF/neoforge.mods.toml index 3e4508417..63110a8b2 100644 --- a/transmission/src/main/resources/META-INF/neoforge.mods.toml +++ b/transmission/src/main/resources/META-INF/neoforge.mods.toml @@ -6,10 +6,9 @@ license="MIT" [[mods]] modId="projectred_transmission" displayName="ProjectRed Transmission" - entryClass="mrtjp.projectred.ProjectRedTransmission" version="${file.jarVersion}" - updateJSONURL="https://version-check.covers1624.net/check/?mod=ProjectRed&mc=${mc_version}" + updateJSONURL = "https://api.modrinth.com/updates/dXmH4rEw/forge_updates.json?neoforge=only" displayURL="https://github.com/MrTJP/ProjectRed" authors="MrTJP, Chicken Bones, covers1624" description='''