"Downgrade" Vineflower to 1.10.1 release (#10423)

* "Downgrade" Vineflower to 1.10.1 release

The main thing we lose from the 1.11 snapshots is a recent fix for redundant casts.

* Thanks intellij

* a
This commit is contained in:
Jason Penilla
2024-04-16 12:44:59 -07:00
parent 14b0751f02
commit 76be2651ca
25 changed files with 68 additions and 64 deletions

View File

@@ -2473,9 +2473,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// Paper end
VoxelShape voxelShape = blockState.getCollisionShape(this.collisionGetter, this.pos, this.context);
if (voxelShape == Shapes.block()) {
- if (this.box.intersects(i, j, k, i + 1.0, j + 1.0, k + 1.0)) {
- if (this.box.intersects((double)i, (double)j, (double)k, (double)i + 1.0, (double)j + 1.0, (double)k + 1.0)) {
+ if (io.papermc.paper.util.CollisionUtil.voxelShapeIntersect(this.box, i, j, k, i + 1.0, j + 1.0, k + 1.0)) { // Paper - keep vanilla behavior for voxelshape intersection - See comment in CollisionUtil
return this.resultProvider.apply(this.pos, voxelShape.move(i, j, k));
return this.resultProvider.apply(this.pos, voxelShape.move((double)i, (double)j, (double)k));
}
} else {
diff --git a/src/main/java/net/minecraft/world/level/ClipContext.java b/src/main/java/net/minecraft/world/level/ClipContext.java
@@ -3237,7 +3237,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
public AABB(BlockPos pos) {
this(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1);
this((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)(pos.getY() + 1), (double)(pos.getZ() + 1));
}
@@ -0,0 +0,0 @@ public class AABB {
}
@@ -3638,12 +3638,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- l,
- m,
- n,
- (int)Math.round(minX * l),
- (int)Math.round(minY * m),
- (int)Math.round(minZ * n),
- (int)Math.round(maxX * l),
- (int)Math.round(maxY * m),
- (int)Math.round(maxZ * n)
- (int)Math.round(minX * (double)l),
- (int)Math.round(minY * (double)m),
- (int)Math.round(minZ * (double)n),
- (int)Math.round(maxX * (double)l),
- (int)Math.round(maxY * (double)m),
- (int)Math.round(maxZ * (double)n)
+ return new ArrayVoxelShape(
+ BLOCK.shape,
+ minX == 0.0 && maxX == 1.0 ? io.papermc.paper.util.CollisionUtil.ZERO_ONE : DoubleArrayList.wrap(new double[] { minX, maxX }),
@@ -4620,9 +4620,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- Vec3 vec32 = start.add(vec3.scale(0.001));
- return this.shape
- .isFullWide(
- this.findIndex(Direction.Axis.X, vec32.x - pos.getX()),
- this.findIndex(Direction.Axis.Y, vec32.y - pos.getY()),
- this.findIndex(Direction.Axis.Z, vec32.z - pos.getZ())
- this.findIndex(Direction.Axis.X, vec32.x - (double)pos.getX()),
- this.findIndex(Direction.Axis.Y, vec32.y - (double)pos.getY()),
- this.findIndex(Direction.Axis.Z, vec32.z - (double)pos.getZ())
- )
- ? new BlockHitResult(vec32, Direction.getNearest(vec3.x, vec3.y, vec3.z).getOpposite(), pos, true)
- : AABB.clip(this.toAabbs(), start, end, pos);