Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.20.5 #4

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.20.2-rc2
yarn_mappings=1.20.2-rc2+build.1
loader_version=0.14.21
minecraft_version=24w13a
yarn_mappings=24w13a+build.2
loader_version=0.15.7

#Fabric api
fabric_version=0.89.0+1.20.2
fabric_version=0.96.12+1.20.5

# Mod Properties
mod_version = 0.3.0+1.20.2
mod_version = 0.3.0+1.20.5
maven_group = eu.pb4
archives_base_name = predicate-api

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions src/main/java/eu/pb4/predicate/api/PredicateContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
import net.minecraft.text.Text;
import net.minecraft.util.math.Vec2f;
import net.minecraft.util.math.Vec3d;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

public record PredicateContext(MinecraftServer server,
ServerCommandSource source,
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/eu/pb4/predicate/api/PredicateRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ public static MinecraftPredicate decode(JsonElement object) {
}

public static <T> MinecraftPredicate decode(DynamicOps<T> ops, T object) {
try {
var data = CODEC.decode(ops, object);
return data.getOrThrow(false, (s) -> {}).getFirst();
} catch (Throwable e) {
throw new IllegalArgumentException(e);
}
var data = CODEC.decode(ops, object);
return data.getOrThrow(IllegalArgumentException::new).getFirst();
}

@Nullable
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/eu/pb4/predicate/api/PredicateResult.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package eu.pb4.predicate.api;

import net.minecraft.text.PlainTextContent;
import net.minecraft.text.Text;
import net.minecraft.text.TextContent;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;
Expand Down Expand Up @@ -32,7 +32,7 @@ public static PredicateResult<Boolean> ofBoolean(boolean value) {
}

public static PredicateResult<Text> ofText(Text value) {
return new PredicateResult<>(!value.getSiblings().isEmpty() && value.getContent() != TextContent.EMPTY, value);
return new PredicateResult<>(!value.getSiblings().isEmpty() && value.getContent() != PlainTextContent.EMPTY, value);
}

public static <T> PredicateResult<T> ofOptional(Optional<T> optional) {
Expand Down
Loading