Skip to content

Commit

Permalink
Update to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LLytho committed Oct 7, 2023
1 parent 28e11fd commit b78e9f3
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- 'v1.19-fabric-*.*.*'
- 'v1.20.1-fabric-*.*.*'

env:
JAVA_DIST: 'zulu'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.3.0]
- Update to 1.20.1

## [1.2.0]
- Update to KubeJS 6.1

Expand Down Expand Up @@ -47,6 +50,7 @@
- Default structure will be used if no structure provided

<!-- Versions -->
[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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public int run(CommandContext<CommandSourceStack> 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,22 +26,22 @@ public static FluidParticleData createFluidParticleData(FluidStackJS fluid, Part
}

public static Stream<ParticleType<?>> 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);
}
}
6 changes: 3 additions & 3 deletions src/main/java/com/almostreliable/ponderjs/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit b78e9f3

Please sign in to comment.