9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-23 00:49:31 +00:00

Move to 1.21.4

This commit is contained in:
Dreeam
2025-01-07 21:07:30 -05:00
parent c7601efd97
commit 37f3d33d47
27 changed files with 9 additions and 9 deletions

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Cache blockstate cache
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index ca2b57d13128717ebb772dd6523d2909f12560cd..cabb4b79248725ea8f831d5f1b27902c3c9ea262 100644
index 9b94d8bf3415734776c81297d5d34eea46ad7e78..65d8ac795282117ba88003e7a703ee649a359473 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -1446,6 +1446,10 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -1438,6 +1438,10 @@ public abstract class BlockBehaviour implements FeatureElement {
private static final Direction[] DIRECTIONS = Direction.values();
private static final int SUPPORT_TYPE_COUNT = SupportType.values().length;
@@ -19,7 +19,7 @@ index ca2b57d13128717ebb772dd6523d2909f12560cd..cabb4b79248725ea8f831d5f1b27902c
protected final VoxelShape collisionShape;
protected boolean largeCollisionShape; // Leaf - not final
private final boolean[] faceSturdy;
@@ -1459,7 +1463,7 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -1451,7 +1455,7 @@ public abstract class BlockBehaviour implements FeatureElement {
throw new IllegalStateException(String.format(Locale.ROOT, "%s has a collision shape and an offset type, but is not marked as dynamicShape in its properties.", BuiltInRegistries.BLOCK.getKey(block)));
} else {
// Leaf start - Remove stream
@@ -28,7 +28,7 @@ index ca2b57d13128717ebb772dd6523d2909f12560cd..cabb4b79248725ea8f831d5f1b27902c
if (this.collisionShape.min(axis) < 0.0D || this.collisionShape.max(axis) > 1.0D) {
this.largeCollisionShape = true;
break;
@@ -1472,7 +1476,7 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -1464,7 +1468,7 @@ public abstract class BlockBehaviour implements FeatureElement {
for (int j = 0; j < i; ++j) {
Direction enumdirection = aenumdirection[j];

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Cache tile entity position
Check if there is a way to cache isRemoved without problem
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 06a969587f25748d4e29036e1b73ab8ff27fe12f..2d4650b8c6b2d51df7eb70b08b9a12caee6458a5 100644
index b8246d7255bffc7e12a67772df2ceac1925b2a05..2ac51b5ed6fe50746f4f64f94e289f5ad75fd715 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1038,13 +1038,16 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p

View File

@@ -10,10 +10,10 @@ which the contains iteration call is very expensive if called everytime
In the test, it can improve ~30% performance in ~1577000 times of canHoldAnyFluid calls (~159ms -> ~111ms)
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index cabb4b79248725ea8f831d5f1b27902c3c9ea262..d371c3846917a7cea17cd38510d366535c2b6954 100644
index 65d8ac795282117ba88003e7a703ee649a359473..b0df5ac8efdca17498f7f87bb86e376122aa6fe3 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -844,6 +844,8 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -836,6 +836,8 @@ public abstract class BlockBehaviour implements FeatureElement {
private VoxelShape[] occlusionShapesByFace;
private boolean propagatesSkylightDown;
private int lightBlock;
@@ -22,7 +22,7 @@ index cabb4b79248725ea8f831d5f1b27902c3c9ea262..d371c3846917a7cea17cd38510d36653
// Paper start - rewrite chunk system
private boolean isConditionallyFullOpaque;
@@ -999,6 +1001,8 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -991,6 +993,8 @@ public abstract class BlockBehaviour implements FeatureElement {
this.propagatesSkylightDown = ((Block) this.owner).propagatesSkylightDown(this.asState());
this.lightBlock = ((Block) this.owner).getLightBlock(this.asState());
@@ -31,7 +31,7 @@ index cabb4b79248725ea8f831d5f1b27902c3c9ea262..d371c3846917a7cea17cd38510d36653
// Paper start - rewrite chunk system
this.isConditionallyFullOpaque = this.canOcclude & this.useShapeForLightOcclusion;
// Paper end - rewrite chunk system
@@ -1058,6 +1062,18 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -1050,6 +1054,18 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.legacySolid;
}