Skip to content

Commit 42a80d2

Browse files
committed
Update to MC 1.21.4
1 parent 4149afd commit 42a80d2

File tree

41 files changed

+205
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+205
-219
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ All stable releases (including deobfuscated builds) can be found on [CurseForge]
2424

2525
### Branching Strategy
2626

27-
For every major Minecraft version, two branches exist:
28-
29-
* `master-{mc_version}`: Latest (potentially unstable) development.
30-
* `release-{mc_version}`: Latest stable release for that Minecraft version. This is also tagged with all mod releases.
31-
32-
### Building and setting up a development environment
33-
34-
This mod uses [Project Lombok](http://projectlombok.org/) -- an annotation processor that allows us you to generate constructors, getters and setters using annotations -- to speed up recurring tasks and keep part of our codebase clean at the same time. Because of this it is advised that you install a plugin for your IDE that supports Project Lombok. Should you encounter any weird errors concerning missing getter or setter methods, it's probably because your code has not been processed by Project Lombok's processor. A list of Project Lombok plugins can be found [here](http://projectlombok.org/download.html).
27+
For every major Minecraft version, a `master-{mc_version} branch exists.
3528

3629
### License
3730
All code and images are licenced under the [MIT License](https://github.com/CyclopsMC/IntegratedScripting/blob/master-1.19-lts/LICENSE.txt)

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'net.neoforged.gradle.userdev' version '7.0.145'
2+
id 'net.neoforged.gradle.userdev' version '7.0.171'
33
id 'net.darkhax.curseforgegradle' version '1.0.8'
44
id 'com.github.kt3k.coveralls' version '2.12.0'
55
id 'com.diffplug.spotless' version '6.25.0'
@@ -185,15 +185,15 @@ runs {
185185

186186
server {
187187
systemProperty 'neoforge.enabledGameTestNamespaces', "cyclopscore,${mod_id}"
188-
programArgument '--nogui'
188+
argument '--nogui'
189189
}
190190

191191
gameTestServer {
192192
systemProperty 'neoforge.enabledGameTestNamespaces', "cyclopscore,${mod_id}"
193193
}
194194

195-
data {
196-
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
195+
clientData {
196+
arguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
197197
}
198198
}
199199

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ group=org.cyclops.integratedscripting
44
java_version=21
55

66
# Common
7-
minecraft_version=1.21.1
7+
minecraft_version=1.21.4
88
mod_name=IntegratedScripting
99
mod_author=rubensworks (aka kroeser)
1010
mod_id=integratedscripting
@@ -15,17 +15,17 @@ display_url=https://www.curseforge.com/minecraft/mc-mods/integrated-scripting
1515
description=Create scripts for handling operations in Integrated Dynamics.
1616
fingerprint=bd0353b3e8a2810d60dd584e256e364bc3bedd44
1717

18-
parchment_version=2024.07.07
19-
parchment_minecraft_version=1.21
18+
parchment_version=2024.12.07
19+
parchment_minecraft_version=1.21.4
2020
curseforge_project_id=889785
2121
modrinth_project_id=uDJkuFRe
2222

2323
# NeoForge
24-
neoforge_version=21.1.2
24+
neoforge_version=21.4.33-beta
2525
neoforge_loader_version_range=[4,)
2626
neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/integrated-scripting.json
2727

2828
# Dependencies
29-
cyclopscore_version=1.25.5-643
30-
integrateddynamics_version=1.24.1-993
31-
commoncapabilities_version=2.9.3-147
29+
cyclopscore_version=1.25.5-704
30+
integrateddynamics_version=1.24.1-1059
31+
commoncapabilities_version=2.9.7-194
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,47 @@
11
package org.cyclops.integratedscripting;
22

3-
import net.neoforged.fml.config.ModConfig;
4-
import org.cyclops.cyclopscore.config.ConfigurableProperty;
5-
import org.cyclops.cyclopscore.config.extendedconfig.DummyConfig;
6-
import org.cyclops.cyclopscore.tracking.Versions;
3+
import org.cyclops.cyclopscore.config.ConfigurablePropertyCommon;
4+
import org.cyclops.cyclopscore.config.ModConfigLocation;
5+
import org.cyclops.cyclopscore.config.extendedconfig.DummyConfigCommon;
6+
import org.cyclops.cyclopscore.init.IModBase;
77

88
/**
99
* A config with general options for this mod.
1010
* @author rubensworks
1111
*
1212
*/
13-
public class GeneralConfig extends DummyConfig {
13+
public class GeneralConfig extends DummyConfigCommon<IModBase> {
1414

15-
@ConfigurableProperty(category = "core", comment = "If the version checker should be enabled.")
15+
@ConfigurablePropertyCommon(category = "core", comment = "If the version checker should be enabled.")
1616
public static boolean versionChecker = true;
1717

18-
@ConfigurableProperty(category = "general", comment = "The base energy usage for the scripting drive.", minimalValue = 0, configLocation = ModConfig.Type.SERVER)
18+
@ConfigurablePropertyCommon(category = "general", comment = "The base energy usage for the scripting drive.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)
1919
public static int scriptingDriveBaseConsumption = 2;
20-
@ConfigurableProperty(category = "general", comment = "The base energy usage for the scripting terminal.", minimalValue = 0, configLocation = ModConfig.Type.SERVER)
20+
@ConfigurablePropertyCommon(category = "general", comment = "The base energy usage for the scripting terminal.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)
2121
public static int terminalScriptingBaseConsumption = 1;
22-
@ConfigurableProperty(category = "general", comment = "The minimum number of ticks inbetween sending a script change packet from client to server.", minimalValue = 0, configLocation = ModConfig.Type.SERVER)
22+
@ConfigurablePropertyCommon(category = "general", comment = "The minimum number of ticks inbetween sending a script change packet from client to server.", minimalValue = 0, configLocation = ModConfigLocation.SERVER)
2323
public static int terminalScriptingClientSyncTickInterval = 20;
2424

25-
@ConfigurableProperty(category = "general", comment = "If new processes can be created from guest languages.", configLocation = ModConfig.Type.SERVER)
25+
@ConfigurablePropertyCommon(category = "general", comment = "If new processes can be created from guest languages.", configLocation = ModConfigLocation.SERVER)
2626
public static boolean graalAllowCreateProcess = false;
27-
@ConfigurableProperty(category = "general", comment = "If new threads can be created from guest languages.", configLocation = ModConfig.Type.SERVER)
27+
@ConfigurablePropertyCommon(category = "general", comment = "If new threads can be created from guest languages.", configLocation = ModConfigLocation.SERVER)
2828
public static boolean graalAllowCreateThread = false;
29-
@ConfigurableProperty(category = "general", comment = "If IO is allowed from guest languages.", configLocation = ModConfig.Type.SERVER)
29+
@ConfigurablePropertyCommon(category = "general", comment = "If IO is allowed from guest languages.", configLocation = ModConfigLocation.SERVER)
3030
public static boolean graalAllowIo = false;
31-
@ConfigurableProperty(category = "general", comment = "If host class loading is allowed from guest languages.", configLocation = ModConfig.Type.SERVER)
31+
@ConfigurablePropertyCommon(category = "general", comment = "If host class loading is allowed from guest languages.", configLocation = ModConfigLocation.SERVER)
3232
public static boolean graalAllowHostClassLoading = false;
33-
@ConfigurableProperty(category = "general", comment = "If experimental options can be used in guest languages.", configLocation = ModConfig.Type.SERVER)
33+
@ConfigurablePropertyCommon(category = "general", comment = "If experimental options can be used in guest languages.", configLocation = ModConfigLocation.SERVER)
3434
public static boolean graalAllowExperimentalOptions = false;
35-
@ConfigurableProperty(category = "general", comment = "If environment variables can be accessed from guest languages.", configLocation = ModConfig.Type.SERVER)
35+
@ConfigurablePropertyCommon(category = "general", comment = "If environment variables can be accessed from guest languages.", configLocation = ModConfigLocation.SERVER)
3636
public static boolean graalAllowEnvironment = false;
37-
@ConfigurableProperty(category = "general", comment = "If the native interface can be accessed from guest languages.", configLocation = ModConfig.Type.SERVER)
37+
@ConfigurablePropertyCommon(category = "general", comment = "If the native interface can be accessed from guest languages.", configLocation = ModConfigLocation.SERVER)
3838
public static boolean graalAllowNative = false;
39-
@ConfigurableProperty(category = "general", comment = "The maximum number of statements that can be executed in one evaluation. This is to avoid infinite loops or very complex programs. Set to -1 to disable limit (not recommended).", configLocation = ModConfig.Type.SERVER, minimalValue = -1)
39+
@ConfigurablePropertyCommon(category = "general", comment = "The maximum number of statements that can be executed in one evaluation. This is to avoid infinite loops or very complex programs. Set to -1 to disable limit (not recommended).", configLocation = ModConfigLocation.SERVER, minimalValue = -1)
4040
public static int graalStatementLimit = 16384;
41-
@ConfigurableProperty(category = "general", comment = "The maximum number of lines in stdout and stderr script log files. Set to -1 to disable limit.", minimalValue = -1, configLocation = ModConfig.Type.SERVER)
41+
@ConfigurablePropertyCommon(category = "general", comment = "The maximum number of lines in stdout and stderr script log files. Set to -1 to disable limit.", minimalValue = -1, configLocation = ModConfigLocation.SERVER)
4242
public static int maxLogLines = 2096;
4343

4444
public GeneralConfig() {
4545
super(IntegratedScripting._instance, "general");
4646
}
47-
48-
@Override
49-
public void onRegistered() {
50-
if(versionChecker) {
51-
Versions.registerMod(getMod(), IntegratedScripting._instance, Reference.VERSION_URL);
52-
}
53-
}
5447
}

src/main/java/org/cyclops/integratedscripting/IntegratedScripting.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
import net.neoforged.neoforge.event.tick.ServerTickEvent;
2020
import net.neoforged.neoforge.registries.NewRegistryEvent;
2121
import org.apache.logging.log4j.Level;
22-
import org.cyclops.cyclopscore.config.ConfigHandler;
23-
import org.cyclops.cyclopscore.helper.MinecraftHelpers;
22+
import org.cyclops.cyclopscore.config.ConfigHandlerCommon;
2423
import org.cyclops.cyclopscore.infobook.IInfoBookRegistry;
25-
import org.cyclops.cyclopscore.init.ModBaseVersionable;
24+
import org.cyclops.cyclopscore.init.ModBaseNeoForge;
2625
import org.cyclops.cyclopscore.proxy.IClientProxy;
2726
import org.cyclops.cyclopscore.proxy.ICommonProxy;
2827
import org.cyclops.integrateddynamics.IntegratedDynamics;
@@ -56,7 +55,7 @@
5655
*
5756
*/
5857
@Mod(Reference.MOD_ID)
59-
public class IntegratedScripting extends ModBaseVersionable<IntegratedScripting> {
58+
public class IntegratedScripting extends ModBaseNeoForge<IntegratedScripting> {
6059

6160
public static IntegratedScripting _instance;
6261

@@ -81,7 +80,7 @@ public void onRegistriesCreate(NewRegistryEvent event) {
8180
.registerHandler(ScriptVariableFacadeHandler.getInstance());
8281

8382
// Load client models
84-
if (MinecraftHelpers.isClientSide()) {
83+
if (getModHelpers().getMinecraftHelpers().isClientSide()) {
8584
ScriptingVariableModelProviders.load();
8685
}
8786

@@ -145,7 +144,7 @@ protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTa
145144
}
146145

147146
@Override
148-
protected void onConfigsRegister(ConfigHandler configHandler) {
147+
protected void onConfigsRegister(ConfigHandlerCommon configHandler) {
149148
super.onConfigsRegister(configHandler);
150149

151150
configHandler.addConfigurable(new GeneralConfig());

src/main/java/org/cyclops/integratedscripting/Reference.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.cyclops.integratedscripting;
22

3-
import org.cyclops.cyclopscore.helper.MinecraftHelpers;
3+
import org.cyclops.cyclopscore.helper.IModHelpers;
44

55
/**
66
* Class that can hold basic static things that are better not hard-coded
@@ -13,7 +13,7 @@ public class Reference {
1313

1414
// Mod info
1515
public static final String MOD_ID = "integratedscripting";
16-
public static final String VERSION_URL = "https://raw.githubusercontent.com/CyclopsMC/Versions/master/" + MinecraftHelpers.getMinecraftVersionMajorMinor() + "/IntegratedREST.txt";
16+
public static final String VERSION_URL = "https://raw.githubusercontent.com/CyclopsMC/Versions/master/" + IModHelpers.get().getMinecraftHelpers().getMinecraftVersionMajorMinor() + "/IntegratedREST.txt";
1717

1818
// MOD ID's
1919
public static final String MOD_FORGE = "forge";

src/main/java/org/cyclops/integratedscripting/block/BlockMendesiteConfig.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
import net.minecraft.world.level.block.Block;
44
import net.minecraft.world.level.block.SoundType;
5-
import org.cyclops.cyclopscore.config.extendedconfig.BlockConfig;
5+
import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon;
6+
import org.cyclops.cyclopscore.init.IModBase;
67
import org.cyclops.integratedscripting.IntegratedScripting;
78

89
/**
910
* Config for the Mendesite block.
1011
* @author rubensworks
1112
*
1213
*/
13-
public class BlockMendesiteConfig extends BlockConfig {
14+
public class BlockMendesiteConfig extends BlockConfigCommon<IModBase> {
1415

1516
public BlockMendesiteConfig() {
1617
super(
1718
IntegratedScripting._instance,
1819
"mendesite",
19-
eConfig -> new Block(Block.Properties.of()
20+
(eConfig, properties) -> new Block(properties
2021
.sound(SoundType.SNOW)
2122
.strength(1.5F)
2223
.noOcclusion()),

src/main/java/org/cyclops/integratedscripting/block/BlockScriptingDrive.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import net.minecraft.world.level.block.state.BlockState;
1313
import net.minecraft.world.level.block.state.StateDefinition;
1414
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
15-
import net.minecraft.world.level.block.state.properties.DirectionProperty;
15+
import net.minecraft.world.level.block.state.properties.EnumProperty;
1616
import org.cyclops.integrateddynamics.core.block.BlockWithEntityGuiCabled;
1717
import org.cyclops.integratedscripting.blockentity.BlockEntityScriptingDrive;
1818

@@ -27,7 +27,7 @@ public class BlockScriptingDrive extends BlockWithEntityGuiCabled {
2727

2828
public static final MapCodec<BlockScriptingDrive> CODEC = simpleCodec(BlockScriptingDrive::new);
2929

30-
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
30+
public static final EnumProperty<Direction> FACING = BlockStateProperties.HORIZONTAL_FACING;
3131

3232
public BlockScriptingDrive(Properties properties) {
3333
super(properties, BlockEntityScriptingDrive::new);

src/main/java/org/cyclops/integratedscripting/block/BlockScriptingDriveConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
package org.cyclops.integratedscripting.block;
22

3-
import net.minecraft.world.level.block.Block;
43
import net.minecraft.world.level.block.SoundType;
5-
import org.cyclops.cyclopscore.config.extendedconfig.BlockConfig;
4+
import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon;
5+
import org.cyclops.cyclopscore.init.IModBase;
66
import org.cyclops.integratedscripting.IntegratedScripting;
77

88
/**
99
* Config for {@link BlockScriptingDrive}.
1010
* @author rubensworks
1111
*/
12-
public class BlockScriptingDriveConfig extends BlockConfig {
12+
public class BlockScriptingDriveConfig extends BlockConfigCommon<IModBase> {
1313

1414
public BlockScriptingDriveConfig() {
1515
super(
1616
IntegratedScripting._instance,
1717
"scripting_drive",
18-
eConfig -> new BlockScriptingDrive(Block.Properties.of()
18+
(eConfig, properties) -> new BlockScriptingDrive(properties
1919
.strength(2.0F, 5.0F)
2020
.sound(SoundType.METAL)),
2121
getDefaultItemConstructor(IntegratedScripting._instance)

0 commit comments

Comments
 (0)