mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Preliminary update to 1.17.1
This commit is contained in:
@@ -5,49 +5,15 @@ Subject: [PATCH] Add MC-4 fix back
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 57a80aed6106ec55aeb636c5b5f3abc7fb4fff14..7ebbe6588256471b6e5903ed6aaa20878340332e 100644
|
||||
index 1e21e75558dc69cb9c32dce99644ddd022165b58..9c0bf033f15d344944fefcfb0696f83197a5704d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4026,17 +4026,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
|
||||
}
|
||||
|
||||
- public final void setPosRaw(double x, double y, double z) {
|
||||
- // Paper start - fix MC-4
|
||||
- if (this instanceof ItemEntity) {
|
||||
- if (false && com.destroystokyo.paper.PaperConfig.fixEntityPositionDesync) { // Tuinity - revert
|
||||
- // encode/decode from PacketPlayOutEntity
|
||||
- x = Mth.lfloor(x * 4096.0D) * (1 / 4096.0D);
|
||||
- y = Mth.lfloor(y * 4096.0D) * (1 / 4096.0D);
|
||||
- z = Mth.lfloor(z * 4096.0D) * (1 / 4096.0D);
|
||||
- }
|
||||
- }
|
||||
- // Paper end - fix MC-4
|
||||
+ public void setPosRaw(double x, double y, double z) { // Purpur - remove final for ItemEntity
|
||||
// Paper start - never allow AABB to become desynced from position
|
||||
// hanging has its own special logic
|
||||
if (!(this instanceof net.minecraft.world.entity.decoration.HangingEntity) && (this.position.x != x || this.position.y != y || this.position.z != z)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 5201e59c7ce9e92790c185279ba69d7fbbfccf90..8845c7b55ac1e6284c4fcd69b395dfb1f5523f90 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -87,6 +87,19 @@ public class ItemEntity extends Entity {
|
||||
this.bobOffs = entity.bobOffs;
|
||||
}
|
||||
|
||||
+ // Purpur start - fix MC-4
|
||||
+ @Override
|
||||
+ public void setPosRaw(double x, double y, double z) {
|
||||
+ if (com.destroystokyo.paper.PaperConfig.fixEntityPositionDesync) { // Tuinity - revert // Purpur - No.
|
||||
+ // encode/decode from PacketPlayOutEntity
|
||||
+ x = Mth.lfloor(x * 4096.0D) * (1 / 4096.0D);
|
||||
+ y = Mth.lfloor(y * 4096.0D) * (1 / 4096.0D);
|
||||
+ z = Mth.lfloor(z * 4096.0D) * (1 / 4096.0D);
|
||||
+ }
|
||||
+ super.setPosRaw(x, y, z);
|
||||
+ }
|
||||
+ // Purpur end - fix MC-4
|
||||
+
|
||||
@Override
|
||||
public boolean occludesVibrations() {
|
||||
return ItemTags.OCCLUDES_VIBRATION_SIGNALS.contains(this.getItem().getItem());
|
||||
@@ -3838,7 +3838,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
public final void setPosRaw(double x, double y, double z) {
|
||||
// Paper start - fix MC-4
|
||||
if (this instanceof ItemEntity) {
|
||||
- if (com.destroystokyo.paper.PaperConfig.fixEntityPositionDesync) {
|
||||
+ if (com.destroystokyo.paper.PaperConfig.fixEntityPositionDesync) { // Purpur
|
||||
// encode/decode from PacketPlayOutEntity
|
||||
x = Mth.lfloor(x * 4096.0D) * (1 / 4096.0D);
|
||||
y = Mth.lfloor(y * 4096.0D) * (1 / 4096.0D);
|
||||
|
||||
Reference in New Issue
Block a user