Fix TODOs in Optional TNT doesn't move in water
Turns out the doWaterMovement method was never called. Moved the tracker updates into tick() and delete doWaterMovement
Dieser Commit ist enthalten in:
Ursprung
5a44b38dc5
Commit
dc97f7d401
@ -1,11 +1,11 @@
|
||||
From 530d6b6635e21f94b2334b735f3c773ce70a947c Mon Sep 17 00:00:00 2001
|
||||
From a5cc6d0bdc188837b612dbfdfe57b0b8f3fc351e Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sun, 22 May 2016 20:20:55 -0500
|
||||
Subject: [PATCH] Optional TNT doesn't move in water
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 805aa56999..92ab55182f 100644
|
||||
index 805aa5699..92ab55182 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -2,7 +2,6 @@ package com.destroystokyo.paper;
|
||||
@ -32,32 +32,10 @@ index 805aa56999..92ab55182f 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2f4e56fc56..2f1cd47619 100644
|
||||
index 2f4e56fc5..5d11348df 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -107,7 +107,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
public double locX;
|
||||
public double locY;
|
||||
public double locZ;
|
||||
- private Vec3D mot;
|
||||
+ protected Vec3D mot; // Paper - private -> protected
|
||||
public float yaw;
|
||||
public float pitch;
|
||||
public float lastYaw;
|
||||
@@ -1103,6 +1103,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public boolean au() {
|
||||
+ // Paper start
|
||||
+ return this.doWaterMovement();
|
||||
+ }
|
||||
+
|
||||
+ public boolean doWaterMovement() {
|
||||
+ // Paper end
|
||||
return this.isInWater() || this.l();
|
||||
}
|
||||
|
||||
@@ -2640,6 +2646,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2640,6 +2640,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public boolean bD() {
|
||||
@ -71,10 +49,39 @@ index 2f4e56fc56..2f1cd47619 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index e0535604b6..723ed45d5e 100644
|
||||
index e0535604b..baeb85142 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -149,4 +149,50 @@ public class EntityTNTPrimed extends Entity {
|
||||
@@ -80,7 +80,27 @@ public class EntityTNTPrimed extends Entity {
|
||||
this.ax();
|
||||
this.world.addParticle(Particles.SMOKE, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
-
|
||||
+ // Paper start - Optional prevent TNT from moving in water
|
||||
+ if (!this.dead && this.inWater && this.world.paperConfig.preventTntFromMovingInWater) {
|
||||
+ /*
|
||||
+ * Author: Jedediah Smith <jedediah@silencegreys.com>
|
||||
+ */
|
||||
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
|
||||
+ // This does pretty well at keeping their clients in sync with the server.
|
||||
+ PlayerChunkMap.EntityTracker ete = this.tracker;
|
||||
+ if (ete != null) {
|
||||
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
|
||||
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
|
||||
+
|
||||
+ ete.trackedPlayers.stream()
|
||||
+ .filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16)
|
||||
+ .forEach(viewer -> {
|
||||
+ viewer.playerConnection.sendPacket(velocityPacket);
|
||||
+ viewer.playerConnection.sendPacket(positionPacket);
|
||||
+ });
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
@@ -149,4 +169,11 @@ public class EntityTNTPrimed extends Entity {
|
||||
public Packet<?> N() {
|
||||
return new PacketPlayOutSpawnEntity(this);
|
||||
}
|
||||
@ -84,49 +91,10 @@ index e0535604b6..723ed45d5e 100644
|
||||
+ public boolean pushedByWater() {
|
||||
+ return !world.paperConfig.preventTntFromMovingInWater && super.pushedByWater();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Author: Jedediah Smith <jedediah@silencegreys.com>
|
||||
+ */
|
||||
+ @Override
|
||||
+ public boolean doWaterMovement() {
|
||||
+ if (!world.paperConfig.preventTntFromMovingInWater) return super.doWaterMovement();
|
||||
+
|
||||
+ // Preserve velocity while calling the super method
|
||||
+ // TODO test this patch...
|
||||
+// double oldMotX = this.motX;
|
||||
+// double oldMotY = this.motY;
|
||||
+// double oldMotZ = this.motZ;
|
||||
+//
|
||||
+// super.doWaterMovement();
|
||||
+//
|
||||
+// this.motX = oldMotX;
|
||||
+// this.motY = oldMotY;
|
||||
+// this.motZ = oldMotZ;
|
||||
+
|
||||
+ if (this.inWater) {
|
||||
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
|
||||
+ // This does pretty well at keeping their clients in sync with the server.
|
||||
+ PlayerChunkMap.EntityTracker ete = this.tracker; // TODO review this (this field isn't written to)
|
||||
+ if (ete != null) {
|
||||
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
|
||||
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
|
||||
+
|
||||
+ ete.trackedPlayers.stream()
|
||||
+ .filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16)
|
||||
+ .forEach(viewer -> {
|
||||
+ viewer.playerConnection.sendPacket(velocityPacket);
|
||||
+ viewer.playerConnection.sendPacket(positionPacket);
|
||||
+ });
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return this.inWater;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index aaf3a54b08..afd8748da8 100644
|
||||
index aaf3a54b0..afd8748da 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -36,7 +36,7 @@ public class EntityTrackerEntry {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 2ac056ffdc0345a4c864592cc8b401220649867f Mon Sep 17 00:00:00 2001
|
||||
From 3763f45c6d542d371acea2adcc6bbe3477d01efc Mon Sep 17 00:00:00 2001
|
||||
From: Alfie Cleveland <alfeh@me.com>
|
||||
Date: Sun, 8 Jan 2017 04:31:36 +0000
|
||||
Subject: [PATCH] Don't allow entities to ride themselves - #572
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index e74baac5bc..92e450f668 100644
|
||||
index cce163769..c67028524 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1994,6 +1994,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1988,6 +1988,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 833f6f6f14af57ed256f90d2ec87367e89490d0c Mon Sep 17 00:00:00 2001
|
||||
From 4a489d4824f988d677e4f09f84724af2bd6da02c Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
||||
Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 14fbea5460..f2a001c28b 100644
|
||||
index 82cd8995f..9bec96f4a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -16,7 +16,7 @@ index 14fbea5460..f2a001c28b 100644
|
||||
protected int numCollisions = 0; // Paper
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@@ -1587,6 +1588,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1581,6 +1582,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
if (this.origin != null) {
|
||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -27,7 +27,7 @@ index 14fbea5460..f2a001c28b 100644
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -1714,6 +1719,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1708,6 +1713,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
if (!originTag.isEmpty()) {
|
||||
origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||
}
|
||||
@ -37,7 +37,7 @@ index 14fbea5460..f2a001c28b 100644
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 6499d27e63..2b2af2daa7 100644
|
||||
index 6499d27e6..2b2af2daa 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -133,6 +133,7 @@ public abstract class MobSpawnerAbstract {
|
||||
@ -49,7 +49,7 @@ index 6499d27e63..2b2af2daa7 100644
|
||||
if ( entity.world.spigotConfig.nerfSpawnerMobs )
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 0b7fc359d9..4af2527d63 100644
|
||||
index 0b7fc359d..4af2527d6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1047,5 +1047,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c1dc8df7250f1045ac10f88413451b8bc08b6c9d Mon Sep 17 00:00:00 2001
|
||||
From 04ade8056728004873333103857f46687dc9897d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 19 Jul 2018 01:13:28 -0400
|
||||
Subject: [PATCH] add more information to Entity.toString()
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
||||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index f2a001c28b..0088d6088a 100644
|
||||
index 9bec96f4a..f99624d48 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2443,7 +2443,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2437,7 +2437,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 87f19f8f0e3245d63d69328ac2941f934d31a857 Mon Sep 17 00:00:00 2001
|
||||
From be17548de6f7c83b90722b7a747a8cc7d220d047 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
||||
Subject: [PATCH] Improve death events
|
||||
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
|
||||
internal code.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
index 20db76abd7..a148cd437c 100644
|
||||
index 20db76abd..a148cd437 100644
|
||||
--- a/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
@@ -175,6 +175,7 @@ public class CombatTracker {
|
||||
@ -27,10 +27,10 @@ index 20db76abd7..a148cd437c 100644
|
||||
int i = this.f ? 300 : 100;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 9bfc725a2c..b406dc5232 100644
|
||||
index 71d557a68..60d43bb50 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1469,6 +1469,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1463,6 +1463,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ index 9bfc725a2c..b406dc5232 100644
|
||||
public void a(Entity entity, int i, DamageSource damagesource) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
|
||||
@@ -2361,6 +2362,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2355,6 +2356,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 9bfc725a2c..b406dc5232 100644
|
||||
|
||||
protected void i(double d0, double d1, double d2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
index 7031dd0e4c..f6dc96434b 100644
|
||||
index 5c35909eb..19ba4e059 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
@@ -675,7 +675,8 @@ public class EntityArmorStand extends EntityLiving {
|
||||
@ -61,7 +61,7 @@ index 7031dd0e4c..f6dc96434b 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
index 917d603507..95d6b3f369 100644
|
||||
index 917d60350..95d6b3f36 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal {
|
||||
@ -94,7 +94,7 @@ index 917d603507..95d6b3f369 100644
|
||||
|
||||
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 78b7ab59b9..88cb1ac8f0 100644
|
||||
index 78b7ab59b..88cb1ac8f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -249,7 +249,7 @@ index 78b7ab59b9..88cb1ac8f0 100644
|
||||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 870ef557a2..a3f5919fe8 100644
|
||||
index 32ac372bc..c5621d9dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -300,7 +300,7 @@ index 870ef557a2..a3f5919fe8 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 73cb64e09d..9f317ff2e8 100644
|
||||
index 73cb64e09..9f317ff2e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -806,6 +806,22 @@ public enum CraftSound {
|
||||
@ -327,7 +327,7 @@ index 73cb64e09d..9f317ff2e8 100644
|
||||
this.minecraftKey = minecraftKey;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 53d61790c5..6a390c1146 100644
|
||||
index 53d61790c..6a390c114 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1713,7 +1713,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -348,7 +348,7 @@ index 53d61790c5..6a390c1146 100644
|
||||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 23c4b93466..aafd71d65c 100644
|
||||
index da2a440c1..49be89158 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -720,9 +720,16 @@ public class CraftEventFactory {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 165bf7b900c559ab01d80ea169e175e417093290 Mon Sep 17 00:00:00 2001
|
||||
From c9d621cca01f33243a1433499213955a892bc3cd Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sat, 22 Sep 2018 15:56:59 -0400
|
||||
Subject: [PATCH] Catch JsonParseException in Entity and TE names
|
||||
@ -13,7 +13,7 @@ Shulkers) may need to be changed in order for it to re-save properly
|
||||
No more crashing though.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
||||
index 4b7aefb7a7..9e568d5d15 100644
|
||||
index 4b7aefb7a..9e568d5d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
||||
@@ -56,7 +56,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
@ -26,10 +26,10 @@ index 4b7aefb7a7..9e568d5d15 100644
|
||||
|
||||
if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index b406dc5232..c85cbe2af8 100644
|
||||
index 60d43bb50..969e7a111 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1653,7 +1653,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1647,7 +1647,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.setYawPitch(this.yaw, this.pitch);
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
@ -39,7 +39,7 @@ index b406dc5232..c85cbe2af8 100644
|
||||
|
||||
this.setCustomNameVisible(nbttagcompound.getBoolean("CustomNameVisible"));
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index d2019fb74c..8cf2602828 100644
|
||||
index 6d278a0da..ec3732193 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -339,4 +339,19 @@ public final class MCUtil {
|
||||
@ -63,7 +63,7 @@ index d2019fb74c..8cf2602828 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityBanner.java b/src/main/java/net/minecraft/server/TileEntityBanner.java
|
||||
index 1f26d8a022..12264c4d03 100644
|
||||
index 1f26d8a02..12264c4d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityBanner.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityBanner.java
|
||||
@@ -57,7 +57,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity {
|
||||
@ -76,7 +76,7 @@ index 1f26d8a022..12264c4d03 100644
|
||||
|
||||
if (this.hasWorld()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityContainer.java b/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
index 3590b4e317..ea7d5a430a 100644
|
||||
index 3590b4e31..ea7d5a430 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
@@ -17,7 +17,7 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3ae1dc7b8e3d26ec9aee3c24b1345eda01e6a14c Mon Sep 17 00:00:00 2001
|
||||
From e1c0f3575fee37a5f1b2ed2a4d83506563fde55c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 27 Sep 2018 00:08:31 -0400
|
||||
Subject: [PATCH] Ignore Dimension NBT field in Entity data
|
||||
@ -14,10 +14,10 @@ DimensionManager set to the world it is being placed into.
|
||||
This fixes corrupt entities breaking chunk saving in custom worlds.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index c85cbe2af8..af26b4bffb 100644
|
||||
index 969e7a111..941d4eae8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1638,7 +1638,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1632,7 +1632,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.setAirTicks(nbttagcompound.getShort("Air"));
|
||||
this.onGround = nbttagcompound.getBoolean("OnGround");
|
||||
if (nbttagcompound.hasKey("Dimension")) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 9d17483d9365afeef430427bbaf7a47ef7670843 Mon Sep 17 00:00:00 2001
|
||||
From 7a0f04ee81f62b896a32dc69570a183706171816 Mon Sep 17 00:00:00 2001
|
||||
From: GreenMeanie <GreenMeanieMC@gmail.com>
|
||||
Date: Sat, 20 Oct 2018 22:34:02 -0400
|
||||
Subject: [PATCH] Reset players airTicks on respawn
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index c7e5539dd..60fac7757 100644
|
||||
index 941d4eae8..ff1488389 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2274,7 +2274,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2268,7 +2268,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3bf62b0b605808c72f1bf7f47e5b6a1277813f56 Mon Sep 17 00:00:00 2001
|
||||
From 5e42d9e4061851b4ff927c800f3c1add6c957642 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Thu, 15 Nov 2018 13:38:37 +0000
|
||||
Subject: [PATCH] force entity dismount during teleportation
|
||||
@ -20,10 +20,10 @@ this is going to be the best soultion all around.
|
||||
Improvements/suggestions welcome!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7f4e18c991..5068511111 100644
|
||||
index ff1488389..b1ab590d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1996,12 +1996,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1990,12 +1990,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ index 7f4e18c991..5068511111 100644
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2052,7 +2055,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2046,7 +2049,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ index 7f4e18c991..5068511111 100644
|
||||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2062,7 +2068,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2056,7 +2062,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) getBukkitEntity(),
|
||||
@ -62,7 +62,7 @@ index 7f4e18c991..5068511111 100644
|
||||
);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||
@@ -2073,7 +2079,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2067,7 +2073,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
@ -72,7 +72,7 @@ index 7f4e18c991..5068511111 100644
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index f17c1c54bf..e811a29175 100644
|
||||
index f17c1c54b..e811a2917 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -937,9 +937,11 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -91,7 +91,7 @@ index f17c1c54bf..e811a29175 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 4f7ebe3642..a9d7eea368 100644
|
||||
index 88cb1ac8f..3e819f540 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2661,11 +2661,13 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -112,7 +112,7 @@ index 4f7ebe3642..a9d7eea368 100644
|
||||
this.B(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 14710abe1a..d23178331e 100644
|
||||
index f5244de49..0d3dba95b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -997,11 +997,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ca4d62e9d537d9d2bbee183c3730cf5788e3fd20 Mon Sep 17 00:00:00 2001
|
||||
From 0d182f9394258fa2098734587c774a3a81eef263 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 22 Sep 2018 00:33:08 -0500
|
||||
Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||
@ -46,10 +46,10 @@ index b38fc50bb..d02c77664 100644
|
||||
double[] adouble = new double[] { 1.0D};
|
||||
double d0 = vec3d1.x - vec3d.x;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 506851111..1cb96685a 100644
|
||||
index b1ab590d1..0adf4b69a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1449,6 +1449,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1443,6 +1443,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.c(f - 90.0F, f1);
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ index 506851111..1cb96685a 100644
|
||||
public Vec3D j(float f) {
|
||||
if (f == 1.0F) {
|
||||
return new Vec3D(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
|
||||
@@ -2095,6 +2096,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2089,6 +2090,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.getPassengers().size() < 1;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ index 506851111..1cb96685a 100644
|
||||
return 0.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index a9d7eea36..dacaa16e0 100644
|
||||
index 3e819f540..20e8ae96d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -3217,6 +3217,37 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From faab98f0277620b2a58857119f013b3b06e6a313 Mon Sep 17 00:00:00 2001
|
||||
From 27c174a8be5a9a526e6809af5e8d64fec60c8417 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Mar 2019 00:24:52 -0400
|
||||
Subject: [PATCH] Entity#getEntitySpawnReason
|
||||
@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners,
|
||||
or DEFAULT since data was not stored.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 1cb96685a..23f910187 100644
|
||||
index 0adf4b69a..b4bd05220 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -21,7 +21,7 @@ index 1cb96685a..23f910187 100644
|
||||
// Paper end
|
||||
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
|
||||
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
@@ -1594,6 +1595,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1588,6 +1589,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
if (this.origin != null) {
|
||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -31,7 +31,7 @@ index 1cb96685a..23f910187 100644
|
||||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.setBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -1727,6 +1731,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1721,6 +1725,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -72,7 +72,7 @@ index 51272a51b..4bc465ef4 100644
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index a1f5f7b07..bfc3432a8 100644
|
||||
index 72b8561ac..03da9b3f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -939,6 +939,7 @@ public class WorldServer extends World {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren