Skip to content

Commit 1616828

Browse files
committed
Merge with master-1.21-lts
1 parent 81ec5bd commit 1616828

6 files changed

Lines changed: 14 additions & 14 deletions

loader-neoforge/src/main/java/org/cyclops/cyclopscore/nbt/path/parse/NbtPathExpressionParseHandlerBooleanLogicalAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static boolean isTruthy(Tag tag) {
4040
return false;
4141
}
4242
if (tag.getId() == Tag.TAG_BYTE) {
43-
return ((ByteTag) tag).getAsByte() == (byte) 1;
43+
return tag.asBoolean().orElse(false);
4444
}
4545
// Non-null non-ByteTags are truthy
4646
return true;

loader-neoforge/src/test/java/org/cyclops/cyclopscore/nbt/path/TestNbtPathLogicalOperators.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import net.minecraft.nbt.CompoundTag;
66
import net.minecraft.nbt.ListTag;
77
import net.minecraft.nbt.Tag;
8-
import org.junit.Test;
8+
import org.junit.jupiter.api.Test;
99

1010
import java.util.List;
1111
import java.util.stream.Collectors;

loader-neoforge/src/test/java/org/cyclops/cyclopscore/nbt/path/parse/TestNbtPathExpressionHandlerBooleanLogicalAnd.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import net.minecraft.nbt.ByteTag;
55
import net.minecraft.nbt.IntTag;
66
import org.cyclops.cyclopscore.nbt.path.INbtPathExpression;
7-
import org.junit.Before;
8-
import org.junit.Test;
7+
import org.junit.jupiter.api.BeforeEach;
8+
import org.junit.jupiter.api.Test;
99

1010
import java.util.stream.Collectors;
1111
import java.util.stream.Stream;
@@ -18,7 +18,7 @@ public class TestNbtPathExpressionHandlerBooleanLogicalAnd {
1818

1919
private NbtPathExpressionParseHandlerBooleanLogicalAnd handler;
2020

21-
@Before
21+
@BeforeEach
2222
public void beforeEach() {
2323
handler = new NbtPathExpressionParseHandlerBooleanLogicalAnd();
2424
}

loader-neoforge/src/test/java/org/cyclops/cyclopscore/nbt/path/parse/TestNbtPathExpressionHandlerBooleanLogicalNot.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import net.minecraft.nbt.ByteTag;
55
import net.minecraft.nbt.CompoundTag;
66
import org.cyclops.cyclopscore.nbt.path.INbtPathExpression;
7-
import org.junit.Before;
8-
import org.junit.Test;
7+
import org.junit.jupiter.api.BeforeEach;
8+
import org.junit.jupiter.api.Test;
99

1010
import java.util.stream.Collectors;
1111
import java.util.stream.Stream;
@@ -18,7 +18,7 @@ public class TestNbtPathExpressionHandlerBooleanLogicalNot {
1818

1919
private NbtPathExpressionParseHandlerBooleanLogicalNot handler;
2020

21-
@Before
21+
@BeforeEach
2222
public void beforeEach() {
2323
handler = new NbtPathExpressionParseHandlerBooleanLogicalNot();
2424
}

loader-neoforge/src/test/java/org/cyclops/cyclopscore/nbt/path/parse/TestNbtPathExpressionHandlerBooleanLogicalOr.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import net.minecraft.nbt.ByteTag;
55
import net.minecraft.nbt.IntTag;
66
import org.cyclops.cyclopscore.nbt.path.INbtPathExpression;
7-
import org.junit.Before;
8-
import org.junit.Test;
7+
import org.junit.jupiter.api.BeforeEach;
8+
import org.junit.jupiter.api.Test;
99

1010
import java.util.stream.Collectors;
1111
import java.util.stream.Stream;
@@ -18,7 +18,7 @@ public class TestNbtPathExpressionHandlerBooleanLogicalOr {
1818

1919
private NbtPathExpressionParseHandlerBooleanLogicalOr handler;
2020

21-
@Before
21+
@BeforeEach
2222
public void beforeEach() {
2323
handler = new NbtPathExpressionParseHandlerBooleanLogicalOr();
2424
}

loader-neoforge/src/test/java/org/cyclops/cyclopscore/nbt/path/parse/TestNbtPathExpressionHandlerBooleanRelationalNotEqual.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import net.minecraft.nbt.ByteTag;
55
import net.minecraft.nbt.IntTag;
66
import org.cyclops.cyclopscore.nbt.path.INbtPathExpression;
7-
import org.junit.Before;
8-
import org.junit.Test;
7+
import org.junit.jupiter.api.BeforeEach;
8+
import org.junit.jupiter.api.Test;
99

1010
import java.util.stream.Collectors;
1111
import java.util.stream.Stream;
@@ -18,7 +18,7 @@ public class TestNbtPathExpressionHandlerBooleanRelationalNotEqual {
1818

1919
private NbtPathExpressionParseHandlerBooleanRelationalNotEqual handler;
2020

21-
@Before
21+
@BeforeEach
2222
public void beforeEach() {
2323
handler = new NbtPathExpressionParseHandlerBooleanRelationalNotEqual();
2424
}

0 commit comments

Comments
 (0)