diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6300b46..8e93ab5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: workflow_dispatch: push: branches: - - '1.19-fabric' + - '1.20.1-fabric' tags-ignore: - '**' pull_request: branches: - - '1.19-fabric' + - '1.20.1-fabric' env: JAVA_DIST: 'zulu' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8098483..e894188 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: tags: - - 'v1.19-fabric-*.*.*' + - 'v1.20.1-fabric-*.*.*' env: JAVA_DIST: 'zulu' diff --git a/CHANGELOG.md b/CHANGELOG.md index c82b047..a414075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [1.3.0] +- Update to 1.20.1 + ## [1.2.0] - Update to KubeJS 6.1 @@ -47,6 +50,7 @@ - Default structure will be used if no structure provided +[1.3.0]: https://github.com/AlmostReliable/ponderjs/releases/tag/v1.20.1-1.3.0 [1.2.0]: https://github.com/AlmostReliable/ponderjs/releases/tag/v1.18-1.2.0 [1.1.11]: https://github.com/AlmostReliable/ponderjs/releases/tag/v1.18-1.1.11 [1.1.10]: https://github.com/AlmostReliable/ponderjs/releases/tag/v1.18-1.1.10 diff --git a/build.gradle b/build.gradle index 60e21c0..060b419 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}" - modApi("com.simibubi.create:create-fabric-1.19.2:${create_version}") { transitive = false } + modApi("com.simibubi.create:create-fabric-${minecraft_version}:${create_version}") { transitive = false } modApi("com.tterrag.registrate_fabric:Registrate:MC1.18.2-1.1.5") { transitive = false } modApi("dev.latvian.mods:kubejs-fabric:${kubejs_version}") } diff --git a/gradle.properties b/gradle.properties index 2fcf617..6f27c63 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,19 +4,19 @@ org.gradle.daemon=false # Mod data mod_id=ponderjs mod_name=PonderJS -mod_version=1.2.0 +mod_version=1.3.0 mod_base_package=com.almostreliable mod_authors=kotakotik22, AlmostReliable mod_description=Allows creating ponder scenes and tags with KubeJS. mod_credits=Continuation of kotakotik22 mod. # Versions -minecraft_version=1.19.2 -forge_version=43.1.32 -forge_min_version=43.0 +minecraft_version=1.20.1 +forge_version=47.2.0 +forge_min_version=47.0.0 mixin_version=0.8.5 # Mappings mappings_channel=parchment -mappings_version=2022.09.18 +mappings_version=2023.06.26 # Github license=MIT github_user=AlmostReliable @@ -25,11 +25,11 @@ github_branch=1.19-fabric # CurseForge project_id=622888 # Mod dependencies -create_version=0.5.1.b-1053+1.19.2 +create_version=0.5.1-d-build.1147+mc1.20.1 create_min_version=0.5.1 -kubejs_version=1902.6.1-build.300 -kubejs_min_version=1902.6.1-build.300 +kubejs_version=2001.6.3-build.38 +kubejs_min_version=2001.6.3-build.38 # Addition Fabric stuff -fabric_loader_version=0.14.9 -fabric_api_version=0.63.0+1.19.2 +fabric_loader_version=0.14.21 +fabric_api_version=0.84.0+1.20.1 diff --git a/src/main/java/com/almostreliable/ponderjs/commands/GenerateKubeJSLangCommand.java b/src/main/java/com/almostreliable/ponderjs/commands/GenerateKubeJSLangCommand.java index f6cc373..3aef04a 100644 --- a/src/main/java/com/almostreliable/ponderjs/commands/GenerateKubeJSLangCommand.java +++ b/src/main/java/com/almostreliable/ponderjs/commands/GenerateKubeJSLangCommand.java @@ -14,9 +14,9 @@ public int run(CommandContext context) { CommandSourceStack source = context.getSource(); if (ponderLang.generate(lang)) { - source.sendSuccess(Component.literal("Changes detected - New lang file created."), false); + source.sendSuccess(() -> Component.literal("Changes detected - New lang file created."), false); } else { - source.sendSuccess(Component.literal("Lang file the same. Nothing created."), false); + source.sendSuccess(() -> Component.literal("Lang file the same. Nothing created."), false); } return SINGLE_SUCCESS; diff --git a/src/main/java/com/almostreliable/ponderjs/particles/ParticleDataBuilder.java b/src/main/java/com/almostreliable/ponderjs/particles/ParticleDataBuilder.java index cab97a0..07e5559 100644 --- a/src/main/java/com/almostreliable/ponderjs/particles/ParticleDataBuilder.java +++ b/src/main/java/com/almostreliable/ponderjs/particles/ParticleDataBuilder.java @@ -1,6 +1,5 @@ package com.almostreliable.ponderjs.particles; -import com.mojang.math.Vector3f; import com.simibubi.create.Create; import com.simibubi.create.content.kinetics.base.RotationIndicatorParticleData; import dev.latvian.mods.rhino.mod.util.color.Color; @@ -161,13 +160,13 @@ public DustParticleDataBuilder color(Color color) { @Override DustParticleOptionsBase createOptions() { float s = scale == null ? 1.0f : scale; - Vector3f fC = new com.simibubi.create.foundation.utility.Color(fromColor.getRgbJS()).asVectorF(); + var fC = new com.simibubi.create.foundation.utility.Color(fromColor.getRgbJS()).asVectorF(); if (toColor == null) { return new DustParticleOptions(fC, s); } - Vector3f toC = new com.simibubi.create.foundation.utility.Color(toColor.getRgbJS()).asVectorF(); + var toC = new com.simibubi.create.foundation.utility.Color(toColor.getRgbJS()).asVectorF(); return new DustColorTransitionOptions(fC, toC, s); } } diff --git a/src/main/java/com/almostreliable/ponderjs/util/PonderPlatform.java b/src/main/java/com/almostreliable/ponderjs/util/PonderPlatform.java index a6f6f06..ecff5bc 100644 --- a/src/main/java/com/almostreliable/ponderjs/util/PonderPlatform.java +++ b/src/main/java/com/almostreliable/ponderjs/util/PonderPlatform.java @@ -4,6 +4,7 @@ import dev.latvian.mods.kubejs.fluid.FluidStackJS; import net.minecraft.core.Registry; import net.minecraft.core.particles.ParticleType; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.Item; @@ -25,22 +26,22 @@ public static FluidParticleData createFluidParticleData(FluidStackJS fluid, Part } public static Stream> getParticleTypes() { - return Registry.PARTICLE_TYPE.stream(); + return BuiltInRegistries.PARTICLE_TYPE.stream(); } public static ResourceLocation getParticleTypeName(ParticleType particleType) { - return Registry.PARTICLE_TYPE.getKey(particleType); + return BuiltInRegistries.PARTICLE_TYPE.getKey(particleType); } public static ResourceLocation getBlockName(Block block) { - return Registry.BLOCK.getKey(block); + return BuiltInRegistries.BLOCK.getKey(block); } public static ResourceLocation getEntityTypeName(EntityType entityType) { - return Registry.ENTITY_TYPE.getKey(entityType); + return BuiltInRegistries.ENTITY_TYPE.getKey(entityType); } public static ResourceLocation getItemName(Item item) { - return Registry.ITEM.getKey(item); + return BuiltInRegistries.ITEM.getKey(item); } } diff --git a/src/main/java/com/almostreliable/ponderjs/util/Util.java b/src/main/java/com/almostreliable/ponderjs/util/Util.java index e15ee2e..a3dc330 100644 --- a/src/main/java/com/almostreliable/ponderjs/util/Util.java +++ b/src/main/java/com/almostreliable/ponderjs/util/Util.java @@ -5,10 +5,10 @@ import com.simibubi.create.foundation.ponder.PonderTag; import com.simibubi.create.foundation.ponder.Selection; import dev.latvian.mods.kubejs.block.predicate.BlockIDPredicate; -import dev.latvian.mods.kubejs.registry.KubeJSRegistries; import dev.latvian.mods.kubejs.util.ConsoleJS; import dev.latvian.mods.kubejs.util.UtilsJS; import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -59,7 +59,7 @@ public static Selection selectionOf(@Nullable Object o) { } Vec3 v = UtilsJS.vec3Of(o); - return Selection.of(new BoundingBox(new BlockPos(v.x, v.y, v.z))); + return Selection.of(new BoundingBox(new BlockPos((int) v.x, (int) v.y, (int) v.z))); } public static AllIcons allIconsOf(@Nullable Object o) { @@ -97,7 +97,7 @@ public static BlockState blockStateOf(@Nullable Object o) { if (o instanceof CharSequence s) { ResourceLocation location = ResourceLocation.tryParse(s.toString()); if (location != null) { - Block block = KubeJSRegistries.blocks().get(location); + Block block = BuiltInRegistries.BLOCK.getOptional(location).orElse(null); if (block != null) { return block.defaultBlockState(); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index a88ff55..b928664 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -21,7 +21,7 @@ side = "BOTH" [[dependencies.ponderjs]] modId = "minecraft" mandatory = true -versionRange = "[1.19,1.20)" +versionRange = "[1.20.1,)" ordering = "NONE" side = "BOTH"