mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-22 23:31:42 +01:00
Add 2 Purpur MC fixes
This commit is contained in:
parent
026b294dac
commit
1c004f9466
@ -0,0 +1,42 @@
|
||||
From edba04e37814d1cf5e9f49ceded7f8b0a8efe142 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 21 Feb 2020 17:04:51 -0600
|
||||
Subject: [PATCH] Purpur MC-125757 Fix - Always increment arrow despawn counter
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/EntityArrow.java | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index 4dc53d3fa1..3b1b133f90 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -147,6 +147,8 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
+ this.checkDespawnCounter(); // Purpur - moved from below - MC-125757
|
||||
+
|
||||
if (this.inGround && !flag) {
|
||||
if (this.aq != iblockdata && this.world.a(this.getBoundingBox().g(0.06D))) {
|
||||
this.inGround = false;
|
||||
@@ -154,7 +156,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
this.despawnCounter = 0;
|
||||
this.as = 0;
|
||||
} else if (!this.world.isClientSide) {
|
||||
- this.i();
|
||||
+ // this.i(); // Purpur moved up - MC-125757
|
||||
}
|
||||
|
||||
++this.d;
|
||||
@@ -275,6 +277,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
}
|
||||
}
|
||||
|
||||
+ protected void checkDespawnCounter() { i(); } // Purpur - OBFHELPER
|
||||
protected void i() {
|
||||
++this.despawnCounter;
|
||||
if (this.despawnCounter >= (fromPlayer == PickupStatus.CREATIVE_ONLY ? world.paperConfig.creativeArrowDespawnRate : (fromPlayer == PickupStatus.DISALLOWED ? world.paperConfig.nonPlayerArrowDespawnRate : ((this instanceof EntityThrownTrident) ? world.spigotConfig.tridentDespawnRate : world.spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init?
|
||||
--
|
||||
2.25.1.windows.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 67e2a0dc20dbbb616efa940d653a5a85971ae06a Mon Sep 17 00:00:00 2001
|
||||
From: tr7zw <tr7zw@live.de>
|
||||
Date: Tue, 21 Apr 2020 14:43:02 +0200
|
||||
Subject: [PATCH] Purpur MC-4 Fix - Item position desync
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/EntityTrackerEntry.java | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index 5269e45a81..8928f23eba 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -128,6 +128,12 @@ public class EntityTrackerEntry {
|
||||
j = MathHelper.d(this.tracker.pitch * 256.0F / 360.0F);
|
||||
Vec3D vec3d = this.tracker.getPositionVector().d(PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc));
|
||||
boolean flag1 = vec3d.g() >= 7.62939453125E-6D;
|
||||
+ // Purpur start - fixes MC-4
|
||||
+ if (this.tracker instanceof EntityItem) {
|
||||
+ Vec3D loc = PacketPlayOutEntity.a(PacketPlayOutEntity.a(tracker.locX()), PacketPlayOutEntity.a(tracker.locY()), PacketPlayOutEntity.a(tracker.locZ()));
|
||||
+ tracker.setPosition(loc.getX(), loc.getY(), loc.getZ());
|
||||
+ }
|
||||
+ // Purpur end
|
||||
Packet<?> packet1 = null;
|
||||
boolean flag2 = flag1 || this.tickCounter % 60 == 0;
|
||||
boolean flag3 = Math.abs(i - this.yRot) >= 1 || Math.abs(j - this.xRot) >= 1;
|
||||
--
|
||||
2.25.1.windows.1
|
||||
|
Loading…
Reference in New Issue
Block a user