46 lines
3.1 KiB
Diff
46 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <novau233@163.com>
|
|
Date: Wed, 7 Feb 2024 07:18:27 +0000
|
|
Subject: [PATCH] Piston fixes from molean server
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 45fd500c1a41ec4568c9e0e579da3d477feb541a..d8b06e08e6b59f0e6a50f450d1a682ef459d5b57 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1460,7 +1460,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
if (movement.lengthSqr() <= 1.0E-7D) {
|
|
return movement;
|
|
} else {
|
|
- long i = this.level().getGameTime();
|
|
+ long i = this.level().getRedstoneGameTime(); //Luminol - Piston fixes from molean server
|
|
|
|
if (i != this.pistonDeltasGameTime) {
|
|
Arrays.fill(this.pistonDeltas, 0.0D);
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
|
index be74adc86f0ca467f3b59e7b57fd47a8f381d86e..3482ed0449478b258d85751ffc90ce677acbc60f 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
|
@@ -152,7 +152,7 @@ public class PistonBaseBlock extends DirectionalBlock {
|
|
if (tileentity instanceof PistonMovingBlockEntity) {
|
|
PistonMovingBlockEntity tileentitypiston = (PistonMovingBlockEntity) tileentity;
|
|
|
|
- if (tileentitypiston.isExtending() && (tileentitypiston.getProgress(0.0F) < 0.5F || world.getGameTime() == tileentitypiston.getLastTicked() || ((ServerLevel) world).isHandlingTick())) {
|
|
+ if (tileentitypiston.isExtending() && (tileentitypiston.getProgress(0.0F) < 0.5F || world.getRedstoneGameTime() == tileentitypiston.getLastTicked() || ((ServerLevel) world).isHandlingTick())) { //Luminol - Piston fixes from molean server
|
|
b0 = 2;
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
|
index 1c23597f172f46eec714b510acfedb415bb01bff..3262398db1b053115b83ed6aab15f9fef511d5d3 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
|
@@ -277,7 +277,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
|
}
|
|
|
|
public static void tick(Level world, BlockPos pos, BlockState state, PistonMovingBlockEntity blockEntity) {
|
|
- blockEntity.lastTicked = world.getGameTime();
|
|
+ blockEntity.lastTicked = world.getRedstoneGameTime(); //Luminol - Piston fixes from molean server
|
|
blockEntity.progressO = blockEntity.progress;
|
|
if (blockEntity.progressO >= 1.0F) {
|
|
if (world.isClientSide && blockEntity.deathTicks < 5) {
|