Add EntityPushedByEntityEvent (#7704)
Dieser Commit ist enthalten in:
Ursprung
e6f61f715d
Commit
47abd1c50c
@ -1,22 +1,22 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Brokkonaut <hannos17@gmx.de>
|
From: Brokkonaut <hannos17@gmx.de>
|
||||||
Date: Mon, 18 Jun 2018 15:40:39 +0200
|
Date: Mon, 18 Jun 2018 15:40:39 +0200
|
||||||
Subject: [PATCH] Add EntityKnockbackByEntityEvent
|
Subject: [PATCH] Add EntityKnockbackByEntityEvent and
|
||||||
|
EntityPushedByEntityAttackEvent
|
||||||
|
|
||||||
|
Co-authored-by: aerulion <aerulion@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java
|
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..9efecabab813f575bb447a356e5e7e952d110f30
|
index 0000000000000000000000000000000000000000..42fdf7a5bfab99a61ff2fbf562f2872ac360bef2
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java
|
||||||
@@ -0,0 +1,82 @@
|
@@ -0,0 +1,46 @@
|
||||||
+package com.destroystokyo.paper.event.entity;
|
+package com.destroystokyo.paper.event.entity;
|
||||||
+
|
+
|
||||||
|
+import io.papermc.paper.event.entity.EntityPushedByEntityAttackEvent;
|
||||||
+import org.bukkit.entity.Entity;
|
+import org.bukkit.entity.Entity;
|
||||||
+import org.bukkit.entity.LivingEntity;
|
+import org.bukkit.entity.LivingEntity;
|
||||||
+import org.bukkit.event.Cancellable;
|
|
||||||
+import org.bukkit.event.HandlerList;
|
|
||||||
+import org.bukkit.event.entity.EntityEvent;
|
|
||||||
+import org.bukkit.util.Vector;
|
+import org.bukkit.util.Vector;
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+
|
+
|
||||||
@ -25,18 +25,72 @@ index 0000000000000000000000000000000000000000..9efecabab813f575bb447a356e5e7e95
|
|||||||
+ * vector can be modified. If this event is cancelled, the entity is not knocked back.
|
+ * vector can be modified. If this event is cancelled, the entity is not knocked back.
|
||||||
+ *
|
+ *
|
||||||
+ */
|
+ */
|
||||||
+public class EntityKnockbackByEntityEvent extends EntityEvent implements Cancellable {
|
+public class EntityKnockbackByEntityEvent extends EntityPushedByEntityAttackEvent {
|
||||||
+ private static final HandlerList handlers = new HandlerList();
|
|
||||||
+
|
|
||||||
+ @NotNull private final Entity hitBy;
|
|
||||||
+ private final float knockbackStrength;
|
+ private final float knockbackStrength;
|
||||||
+ @NotNull private final Vector acceleration;
|
|
||||||
+ private boolean cancelled = false;
|
|
||||||
+
|
+
|
||||||
+ public EntityKnockbackByEntityEvent(@NotNull LivingEntity entity, @NotNull Entity hitBy, float knockbackStrength, @NotNull Vector acceleration) {
|
+ public EntityKnockbackByEntityEvent(@NotNull LivingEntity entity, @NotNull Entity hitBy, float knockbackStrength, @NotNull Vector acceleration) {
|
||||||
+ super(entity);
|
+ super(entity, hitBy, acceleration);
|
||||||
+ this.hitBy = hitBy;
|
|
||||||
+ this.knockbackStrength = knockbackStrength;
|
+ this.knockbackStrength = knockbackStrength;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * @return the entity which was knocked back
|
||||||
|
+ */
|
||||||
|
+ @NotNull
|
||||||
|
+ @Override
|
||||||
|
+ public LivingEntity getEntity() {
|
||||||
|
+ return (LivingEntity) super.getEntity();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * @return the original knockback strength.
|
||||||
|
+ */
|
||||||
|
+ public float getKnockbackStrength() {
|
||||||
|
+ return knockbackStrength;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * @return the Entity which hit
|
||||||
|
+ */
|
||||||
|
+ @NotNull
|
||||||
|
+ public Entity getHitBy() {
|
||||||
|
+ return super.getPushedBy();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/event/entity/EntityPushedByEntityAttackEvent.java b/src/main/java/io/papermc/paper/event/entity/EntityPushedByEntityAttackEvent.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..c15401cd206eb9e1a7a8b7154aba0247e2da1e19
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/io/papermc/paper/event/entity/EntityPushedByEntityAttackEvent.java
|
||||||
|
@@ -0,0 +1,70 @@
|
||||||
|
+package io.papermc.paper.event.entity;
|
||||||
|
+
|
||||||
|
+import org.bukkit.entity.Entity;
|
||||||
|
+import org.bukkit.event.Cancellable;
|
||||||
|
+import org.bukkit.event.HandlerList;
|
||||||
|
+import org.bukkit.event.entity.EntityEvent;
|
||||||
|
+import org.bukkit.util.Vector;
|
||||||
|
+import org.jetbrains.annotations.NotNull;
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Fired when an entity is pushed by another entity's attack. The acceleration vector can be
|
||||||
|
+ * modified. If this event is cancelled, the entity will not get pushed.
|
||||||
|
+ * <p>
|
||||||
|
+ * Note: Some entities might trigger this multiple times on the same entity
|
||||||
|
+ * as multiple acceleration calculations are done.
|
||||||
|
+ */
|
||||||
|
+public class EntityPushedByEntityAttackEvent extends EntityEvent implements Cancellable {
|
||||||
|
+
|
||||||
|
+ private static final HandlerList handlers = new HandlerList();
|
||||||
|
+
|
||||||
|
+ private final @NotNull Entity pushedBy;
|
||||||
|
+ private final @NotNull Vector acceleration;
|
||||||
|
+ private boolean cancelled = false;
|
||||||
|
+
|
||||||
|
+ public EntityPushedByEntityAttackEvent(@NotNull Entity entity, @NotNull Entity pushedBy, @NotNull Vector acceleration) {
|
||||||
|
+ super(entity);
|
||||||
|
+ this.pushedBy = pushedBy;
|
||||||
+ this.acceleration = acceleration;
|
+ this.acceleration = acceleration;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -61,31 +115,19 @@ index 0000000000000000000000000000000000000000..9efecabab813f575bb447a356e5e7e95
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * @return the entity which was knocked back
|
+ * Gets the entity which pushed the affected entity.
|
||||||
|
+ *
|
||||||
|
+ * @return the pushing entity
|
||||||
+ */
|
+ */
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ @Override
|
+ public Entity getPushedBy() {
|
||||||
+ public LivingEntity getEntity() {
|
+ return pushedBy;
|
||||||
+ return (LivingEntity) super.getEntity();
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * @return the original knockback strength.
|
+ * Gets the acceleration that will be applied to the affected entity.
|
||||||
+ */
|
+ *
|
||||||
+ public float getKnockbackStrength() {
|
+ * @return the acceleration vector
|
||||||
+ return knockbackStrength;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * @return the Entity which hit
|
|
||||||
+ */
|
|
||||||
+ @NotNull
|
|
||||||
+ public Entity getHitBy() {
|
|
||||||
+ return hitBy;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * @return the acceleration that will be applied
|
|
||||||
+ */
|
+ */
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ public Vector getAcceleration() {
|
+ public Vector getAcceleration() {
|
@ -1,12 +1,39 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Brokkonaut <hannos17@gmx.de>
|
From: Brokkonaut <hannos17@gmx.de>
|
||||||
Date: Mon, 18 Jun 2018 15:46:23 +0200
|
Date: Mon, 18 Jun 2018 15:46:23 +0200
|
||||||
Subject: [PATCH] Implement EntityKnockbackByEntityEvent
|
Subject: [PATCH] Implement EntityKnockbackByEntityEvent and
|
||||||
|
EntityPushedByEntityAttackEvent
|
||||||
|
|
||||||
|
Co-authored-by: aerulion <aerulion@gmail.com>
|
||||||
|
|
||||||
This event is called when an entity receives knockback by another entity.
|
This event is called when an entity receives knockback by another entity.
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
index 66b727c533d3a2b7b5938ab9b9b7b4a76bb62966..378027b72852e5d465c8f621168605ee5c522770 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
@@ -1767,8 +1767,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void push(double deltaX, double deltaY, double deltaZ) {
|
||||||
|
- this.setDeltaMovement(this.getDeltaMovement().add(deltaX, deltaY, deltaZ));
|
||||||
|
- this.hasImpulse = true;
|
||||||
|
+ // Paper start - call EntityPushedByEntityEvent
|
||||||
|
+ this.push(deltaX, deltaY, deltaZ, null);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void push(double deltaX, double deltaY, double deltaZ, @org.jetbrains.annotations.Nullable Entity pushingEntity) {
|
||||||
|
+ org.bukkit.util.Vector delta = new org.bukkit.util.Vector(deltaX, deltaY, deltaZ);
|
||||||
|
+ if (pushingEntity == null || new io.papermc.paper.event.entity.EntityPushedByEntityAttackEvent(getBukkitEntity(), pushingEntity.getBukkitEntity(), delta).callEvent()) {
|
||||||
|
+ this.setDeltaMovement(this.getDeltaMovement().add(delta.getX(), delta.getY(), delta.getZ()));
|
||||||
|
+ this.hasImpulse = true;
|
||||||
|
+ }
|
||||||
|
+ // Paper end - call EntityPushedByEntityEvent
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void markHurt() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 4ebdf94833062cde6882f09f1d6878062f2c579e..677ba704c32e590f3298575b1cc060bb69414ca4 100644
|
index 4ebdf94833062cde6882f09f1d6878062f2c579e..19cd680bd77196b99767b274599e9eb5ead80192 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1457,7 +1457,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -1457,7 +1457,7 @@ public abstract class LivingEntity extends Entity {
|
||||||
@ -14,7 +41,7 @@ index 4ebdf94833062cde6882f09f1d6878062f2c579e..677ba704c32e590f3298575b1cc060bb
|
|||||||
|
|
||||||
this.hurtDir = (float) (Mth.atan2(d1, d0) * 57.2957763671875D - (double) this.getYRot());
|
this.hurtDir = (float) (Mth.atan2(d1, d0) * 57.2957763671875D - (double) this.getYRot());
|
||||||
- this.knockback(0.4000000059604645D, d0, d1);
|
- this.knockback(0.4000000059604645D, d0, d1);
|
||||||
+ this.knockback(0.4000000059604645D, d0, d1, entity1);
|
+ this.knockback(0.4000000059604645D, d0, d1, entity1); // Paper
|
||||||
} else {
|
} else {
|
||||||
this.hurtDir = (float) ((int) (Math.random() * 2.0D) * 180);
|
this.hurtDir = (float) ((int) (Math.random() * 2.0D) * 180);
|
||||||
}
|
}
|
||||||
@ -23,7 +50,7 @@ index 4ebdf94833062cde6882f09f1d6878062f2c579e..677ba704c32e590f3298575b1cc060bb
|
|||||||
|
|
||||||
protected void blockedByShield(LivingEntity target) {
|
protected void blockedByShield(LivingEntity target) {
|
||||||
- target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ());
|
- target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ());
|
||||||
+ target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ(), this);
|
+ target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ(), this); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkTotemDeathProtection(DamageSource source) {
|
private boolean checkTotemDeathProtection(DamageSource source) {
|
||||||
@ -81,19 +108,74 @@ index 61328cde67c994c4ec0629b5869a878eda7c6cab..9b64a465be77bcc07e420c84f19fe758
|
|||||||
this.finishRam(world, entity);
|
this.finishRam(world, entity);
|
||||||
world.playSound((Player)null, entity, this.getImpactSound.apply(entity), SoundSource.NEUTRAL, 1.0F, 1.0F);
|
world.playSound((Player)null, entity, this.getImpactSound.apply(entity), SoundSource.NEUTRAL, 1.0F, 1.0F);
|
||||||
} else if (this.hasRammedHornBreakingBlock(world, entity)) {
|
} else if (this.hasRammedHornBreakingBlock(world, entity)) {
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
|
||||||
|
index c8c5a46f526b3f8823b3c2047463c2e67f12c92e..27aea5c5e284767a2a9b7de1b7912c3d50ff3c3c 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java
|
||||||
|
@@ -69,7 +69,7 @@ public class SonicBoom extends Behavior<Warden> {
|
||||||
|
target.hurt(DamageSource.sonicBoom(entity), 10.0F);
|
||||||
|
double d = 0.5D * (1.0D - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE));
|
||||||
|
double e = 2.5D * (1.0D - target.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE));
|
||||||
|
- target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e);
|
||||||
|
+ target.push(vec33.x() * e, vec33.y() * d, vec33.z() * e, entity); // Paper
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
|
index a889be9dd2a94b531a227ff69a5e761e103067be..7bf3ad1ccef09b697655dc949abab9ab006a95a9 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
|
@@ -432,7 +432,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||||
|
double d3 = entity.getZ() - d1;
|
||||||
|
double d4 = Math.max(d2 * d2 + d3 * d3, 0.1D);
|
||||||
|
|
||||||
|
- entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D);
|
||||||
|
+ entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D, this); // Paper
|
||||||
|
if (!this.phaseManager.getCurrentPhase().isSitting() && ((LivingEntity) entity).getLastHurtByMobTimestamp() < entity.tickCount - 2) {
|
||||||
|
entity.hurt(DamageSource.mobAttack(this), 5.0F);
|
||||||
|
this.doEnchantDamageEffects(this, entity);
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||||
|
index 8517fd004727b083545082a5de26b11cb2a93623..01dfe3e29ea55b9e839a4db027fdd6a1dbb5ca23 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||||
|
@@ -275,7 +275,7 @@ public class Ravager extends Raider {
|
||||||
|
double d1 = entity.getZ() - this.getZ();
|
||||||
|
double d2 = Math.max(d0 * d0 + d1 * d1, 0.001D);
|
||||||
|
|
||||||
|
- entity.push(d0 / d2 * 4.0D, 0.2D, d1 / d2 * 4.0D);
|
||||||
|
+ entity.push(d0 / d2 * 4.0D, 0.2D, d1 / d2 * 4.0D, this); // Paper
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java
|
||||||
|
index 127948e7c8620de1f4fabce0d654fbb502510156..191f7afcb23b5ee58df9dd6bd8c78ac993630034 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java
|
||||||
|
@@ -41,7 +41,7 @@ public interface HoglinBase {
|
||||||
|
double j = f * (double)(attacker.level.random.nextFloat() * 0.5F + 0.2F);
|
||||||
|
Vec3 vec3 = (new Vec3(g, 0.0D, h)).normalize().scale(j).yRot(i);
|
||||||
|
double k = f * (double)attacker.level.random.nextFloat() * 0.5D;
|
||||||
|
- target.push(vec3.x, k, vec3.z);
|
||||||
|
+ target.push(vec3.x, k, vec3.z, attacker); // Paper
|
||||||
|
target.hurtMarked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index b6027f4f5f747b81062d83ef7a3f62d420832729..26709e64ffbe1a41516908e4b3fc9d21d4c0dff0 100644
|
index b6027f4f5f747b81062d83ef7a3f62d420832729..811ab2a967db7a6767c98869034ea75bd443f301 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1278,7 +1278,7 @@ public abstract class Player extends LivingEntity {
|
@@ -1278,9 +1278,9 @@ public abstract class Player extends LivingEntity {
|
||||||
if (flag5) {
|
if (flag5) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
if (target instanceof LivingEntity) {
|
if (target instanceof LivingEntity) {
|
||||||
- ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
|
- ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
|
||||||
+ ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper
|
+ ((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper
|
||||||
} else {
|
} else {
|
||||||
target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
|
- target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
|
||||||
|
+ target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F), this); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||||
@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity {
|
@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity {
|
||||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||||
// CraftBukkit start - Only apply knockback if the damage hits
|
// CraftBukkit start - Only apply knockback if the damage hits
|
||||||
@ -103,3 +185,16 @@ index b6027f4f5f747b81062d83ef7a3f62d420832729..26709e64ffbe1a41516908e4b3fc9d21
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
|
index cfd202d32048abcd3e961d9f7f08c1bc6282e601..0057c96609bf657ff1282a0a6cc78bdc4bc68f92 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
|
@@ -401,7 +401,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||||
|
Vec3 vec3d = this.getDeltaMovement().multiply(1.0D, 0.0D, 1.0D).normalize().scale((double) this.knockback * 0.6D * d0);
|
||||||
|
|
||||||
|
if (vec3d.lengthSqr() > 0.0D) {
|
||||||
|
- entityliving.push(vec3d.x, 0.1D, vec3d.z);
|
||||||
|
+ entityliving.push(vec3d.x, 0.1D, vec3d.z, this); // Paper
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
|||||||
UUID, ticks lived, valid, dead
|
UUID, ticks lived, valid, dead
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 66b727c533d3a2b7b5938ab9b9b7b4a76bb62966..ac6bd21798192c4c07737a2320c3626caebc7e22 100644
|
index 378027b72852e5d465c8f621168605ee5c522770..0ae266bea5be068ece32a5a2f9b677117680e67b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2994,7 +2994,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3003,7 +3003,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String s = this.level == null ? "~NULL~" : this.level.toString();
|
String s = this.level == null ? "~NULL~" : this.level.toString();
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ this is going to be the best soultion all around.
|
|||||||
Improvements/suggestions welcome!
|
Improvements/suggestions welcome!
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 15d4ad53cca71272e491bea31d83e8c8e697dac0..c7fe091d13349348b7288c0aa8bdde046dc47fa4 100644
|
index 521dee771a4942854b80e62d3f8e5f9c4a1076c4..5be2158d720014fb2088351edeb692acb5d933ab 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -1366,11 +1366,13 @@ public class ServerPlayer extends Player {
|
@@ -1366,11 +1366,13 @@ public class ServerPlayer extends Player {
|
||||||
@ -41,10 +41,10 @@ index 15d4ad53cca71272e491bea31d83e8c8e697dac0..c7fe091d13349348b7288c0aa8bdde04
|
|||||||
|
|
||||||
if (entity1 != entity && this.connection != null) {
|
if (entity1 != entity && this.connection != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index b8257959acd2b38243fd259f367564080aff951e..d664b8691a8248a035cbe1b12a353f633980ea7b 100644
|
index 5116be3075c1249254524bf6a5b6bc28c61400e6..6d7632ca9b8b63be637c89b374b8769ab01e91cb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2396,11 +2396,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2405,11 +2405,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeVehicle() {
|
public void removeVehicle() {
|
||||||
@ -62,7 +62,7 @@ index b8257959acd2b38243fd259f367564080aff951e..d664b8691a8248a035cbe1b12a353f63
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2467,7 +2472,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2476,7 +2481,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return true; // CraftBukkit
|
return true; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ index b8257959acd2b38243fd259f367564080aff951e..d664b8691a8248a035cbe1b12a353f63
|
|||||||
if (entity.getVehicle() == this) {
|
if (entity.getVehicle() == this) {
|
||||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||||
} else {
|
} else {
|
||||||
@@ -2477,7 +2485,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2486,7 +2494,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||||
VehicleExitEvent event = new VehicleExitEvent(
|
VehicleExitEvent event = new VehicleExitEvent(
|
||||||
(Vehicle) this.getBukkitEntity(),
|
(Vehicle) this.getBukkitEntity(),
|
||||||
@ -83,7 +83,7 @@ index b8257959acd2b38243fd259f367564080aff951e..d664b8691a8248a035cbe1b12a353f63
|
|||||||
);
|
);
|
||||||
// Suppress during worldgen
|
// Suppress during worldgen
|
||||||
if (this.valid) {
|
if (this.valid) {
|
||||||
@@ -2491,7 +2499,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2500,7 +2508,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@ -93,7 +93,7 @@ index b8257959acd2b38243fd259f367564080aff951e..d664b8691a8248a035cbe1b12a353f63
|
|||||||
if (this.valid) {
|
if (this.valid) {
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 2c804ef89d910f706c449b4ce540ed1be3ac242a..3ff18ddb1d4b36fcfd97c9b29f2ecdcb4958916e 100644
|
index 03004dbb8ab4cdb982ea2f6d7464258d025ff411..163ee915ae26f23f213ef576129111ba446c89d3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3432,9 +3432,15 @@ public abstract class LivingEntity extends Entity {
|
@@ -3432,9 +3432,15 @@ public abstract class LivingEntity extends Entity {
|
||||||
@ -114,7 +114,7 @@ index 2c804ef89d910f706c449b4ce540ed1be3ac242a..3ff18ddb1d4b36fcfd97c9b29f2ecdcb
|
|||||||
this.dismountVehicle(entity);
|
this.dismountVehicle(entity);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 12904581bcf666c31ca6b02e5e0be2f5fe17de34..ba8b6d3fbc10eb9f02d3409eb2038827c47ca14d 100644
|
index 319e6dbaae25835204ec916a44df3f3c2e7f6f51..d2f700cde5632d54324dd694c8e9a227113698ae 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1142,7 +1142,13 @@ public abstract class Player extends LivingEntity {
|
@@ -1142,7 +1142,13 @@ public abstract class Player extends LivingEntity {
|
||||||
|
@ -35,7 +35,7 @@ index bd880228aaaefb2299b09ce91a58b2da1f04d953..01cfa93571effead5498e766f6c7e254
|
|||||||
});
|
});
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index d664b8691a8248a035cbe1b12a353f633980ea7b..15625d54c32530eae73d6360ef68ffd1ddf752b0 100644
|
index 6d7632ca9b8b63be637c89b374b8769ab01e91cb..74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -74,6 +74,8 @@ import net.minecraft.world.InteractionHand;
|
@@ -74,6 +74,8 @@ import net.minecraft.world.InteractionHand;
|
||||||
@ -55,7 +55,7 @@ index d664b8691a8248a035cbe1b12a353f633980ea7b..15625d54c32530eae73d6360ef68ffd1
|
|||||||
|
|
||||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||||
private CraftEntity bukkitEntity;
|
private CraftEntity bukkitEntity;
|
||||||
@@ -2038,6 +2041,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2047,6 +2050,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ index d664b8691a8248a035cbe1b12a353f633980ea7b..15625d54c32530eae73d6360ef68ffd1
|
|||||||
// Save entity's from mob spawner status
|
// Save entity's from mob spawner status
|
||||||
if (spawnedViaMobSpawner) {
|
if (spawnedViaMobSpawner) {
|
||||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||||
@@ -2183,6 +2189,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2192,6 +2198,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||||
|
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
|
|||||||
heightmap resolves the issue without having to load all spawn chunks.
|
heightmap resolves the issue without having to load all spawn chunks.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 35cfe934493a7425e415d58834d4016b4ea31e3b..4709b3577aa83607da97fdbcd8c2b7d662fb0118 100644
|
index d8cb7a53940c244b3ad36d32cdbbee1b3746e543..6b11da94839a677c6bf63fd2d8d4994754e3ad05 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3201,6 +3201,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3210,6 +3210,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (flag1) {
|
if (flag1) {
|
||||||
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||||
} else {
|
} else {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 4709b3577aa83607da97fdbcd8c2b7d662fb0118..f0c7c31c2646c2b26a3f98e5b5c822712696d960 100644
|
index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d49c7a3c1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -16,7 +16,7 @@ index 4709b3577aa83607da97fdbcd8c2b7d662fb0118..f0c7c31c2646c2b26a3f98e5b5c82271
|
|||||||
protected int numCollisions = 0; // Paper
|
protected int numCollisions = 0; // Paper
|
||||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||||
@javax.annotation.Nullable
|
@javax.annotation.Nullable
|
||||||
@@ -2059,6 +2060,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2068,6 +2069,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (spawnedViaMobSpawner) {
|
if (spawnedViaMobSpawner) {
|
||||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ index 4709b3577aa83607da97fdbcd8c2b7d662fb0118..f0c7c31c2646c2b26a3f98e5b5c82271
|
|||||||
// Paper end
|
// Paper end
|
||||||
return nbt;
|
return nbt;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -2200,6 +2204,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2209,6 +2213,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||||
|
@ -7,10 +7,10 @@ The code following this has better support for null worlds to move
|
|||||||
them back to the world spawn.
|
them back to the world spawn.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index fada693b270d0954f6bbc5965fb3af82a8bd524e..0a07a99e67e087db87c493d7c2b8b0c94d5b3771 100644
|
index 1e4699372b22c3fe3eed6859c3f15f9b70a537c0..7e8d434944596b4d82675448ddff4046a1b0b4b4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2177,9 +2177,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2186,9 +2186,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
bworld = server.getWorld(worldName);
|
bworld = server.getWorld(worldName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
|||||||
same item twice because the source was destroyed.
|
same item twice because the source was destroyed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695635861c1 100644
|
index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8594d8b9d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2307,11 +2307,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2316,11 +2316,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start - Capture drops for death event
|
// CraftBukkit start - Capture drops for death event
|
||||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||||
@ -34,7 +34,7 @@ index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695
|
|||||||
|
|
||||||
entityitem.setDefaultPickUpDelay();
|
entityitem.setDefaultPickUpDelay();
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -3086,6 +3087,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3095,6 +3096,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@Nullable
|
@Nullable
|
||||||
public Entity teleportTo(ServerLevel worldserver, PositionImpl location) {
|
public Entity teleportTo(ServerLevel worldserver, PositionImpl location) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -47,7 +47,7 @@ index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695
|
|||||||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||||
this.level.getProfiler().push("changeDimension");
|
this.level.getProfiler().push("changeDimension");
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -3112,6 +3119,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3121,6 +3128,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.level.getProfiler().popPush("reloading");
|
this.level.getProfiler().popPush("reloading");
|
||||||
@ -59,7 +59,7 @@ index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695
|
|||||||
Entity entity = this.getType().create(worldserver);
|
Entity entity = this.getType().create(worldserver);
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
@@ -3125,10 +3137,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3134,10 +3146,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||||
this.getBukkitEntity().setHandle(entity);
|
this.getBukkitEntity().setHandle(entity);
|
||||||
entity.bukkitEntity = this.getBukkitEntity();
|
entity.bukkitEntity = this.getBukkitEntity();
|
||||||
@ -70,7 +70,7 @@ index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3249,7 +3257,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3258,7 +3266,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canChangeDimensions() {
|
public boolean canChangeDimensions() {
|
||||||
@ -135,7 +135,7 @@ index e463ae13ce6f65675c2b6d553ecf91db5a047dbc..7ff1e7e4d493770bfdbc0ad5e8f10387
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 417ae46d36690f7f7c72fb85331f8d5ff21ab937..7069b447c12c170683dee7052327a55c29af83c4 100644
|
index 24f1be1dcf2156fe17fec1c66529514b50925e2b..cd6e0904dbdac5d7e1630e59d6ffa2ba0a5b3b2f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -810,6 +810,11 @@ public class CraftEventFactory {
|
@@ -810,6 +810,11 @@ public class CraftEventFactory {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 2609bdb3f051e449f9a2e760e9c4d38f85855cf6..09b2b6633b108739e8fe6d4c400d42d88b27435e 100644
|
index 016cfb63f686352db750065938894df9bc0ee233..1a33ce4ff0e00ac2f6bba288cb43880ca5dae19a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -713,8 +713,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -713,8 +713,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -19,7 +19,7 @@ index 2609bdb3f051e449f9a2e760e9c4d38f85855cf6..09b2b6633b108739e8fe6d4c400d42d8
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected AABB makeBoundingBox() {
|
protected AABB makeBoundingBox() {
|
||||||
@@ -3995,6 +3995,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4004,6 +4004,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setPosRaw(double x, double y, double z) {
|
public final void setPosRaw(double x, double y, double z) {
|
||||||
@ -31,7 +31,7 @@ index 2609bdb3f051e449f9a2e760e9c4d38f85855cf6..09b2b6633b108739e8fe6d4c400d42d8
|
|||||||
// Paper start - rewrite chunk system
|
// Paper start - rewrite chunk system
|
||||||
if (this.updatingSectionStatus) {
|
if (this.updatingSectionStatus) {
|
||||||
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
|
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
|
||||||
@@ -4018,6 +4023,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4027,6 +4032,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.levelCallback.onMove();
|
this.levelCallback.onMove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index ff65d3125da3d2716cccac24317e40d0e54f405c..d2f5a1591e360b4af4613f4e3d3635894bd50ee3 100644
|
index 873206bb65b2412d3066a0f7e35fe0684e29661a..d170254265a789998be96ce1dcaf71c9900d75ab 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4212,4 +4212,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4221,4 +4221,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|
||||||
void accept(Entity entity, double x, double y, double z);
|
void accept(Entity entity, double x, double y, double z);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index d2f5a1591e360b4af4613f4e3d3635894bd50ee3..13ed0e5290e0685d7b310b0d591010aeac207427 100644
|
index d170254265a789998be96ce1dcaf71c9900d75ab..6ba3e91c2a937d288b67ec32c818bebf38b04d5c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4217,5 +4217,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4226,5 +4226,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
public static int nextEntityId() {
|
public static int nextEntityId() {
|
||||||
return ENTITY_COUNTER.incrementAndGet();
|
return ENTITY_COUNTER.incrementAndGet();
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 13ed0e5290e0685d7b310b0d591010aeac207427..7bb5bb36d14de2a884301e99b571878200f834d0 100644
|
index 6ba3e91c2a937d288b67ec32c818bebf38b04d5c..d8dfd84a8e97e0e852362e1424e50c2f00fe6458 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1911,6 +1911,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1920,6 +1920,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPushable() {
|
public boolean isPushable() {
|
||||||
|
@ -28,10 +28,10 @@ index 5ca3ad7b3d7606accd0a58b3c708fadb349608f7..4b6e0fe2fabcc55007fd8979e81f66df
|
|||||||
|
|
||||||
public Vec3 decode(long x, long y, long z) {
|
public Vec3 decode(long x, long y, long z) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 7bb5bb36d14de2a884301e99b571878200f834d0..7451ee1537c67a96dc33af13cf6ad43338434d43 100644
|
index d8dfd84a8e97e0e852362e1424e50c2f00fe6458..9833207c4d29a082cd68d52e72490e7a314f420c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4020,6 +4020,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4029,6 +4029,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
|
@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was
|
|||||||
designed to happen in the first place.
|
designed to happen in the first place.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index b2c85ef84d5455cbdcb211af94a5046593d663c3..331e88186cc47dabbb35e849313721f38070c4d6 100644
|
index ae89716b1dc6f54cb1a6356f52697a00bd8a4218..fb4ae2cd4cb1a775d64cec9f5131a95f8919c38e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -509,6 +509,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -509,6 +509,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -51,7 +51,7 @@ index b2c85ef84d5455cbdcb211af94a5046593d663c3..331e88186cc47dabbb35e849313721f3
|
|||||||
|
|
||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
@@ -2704,6 +2734,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2713,6 +2743,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.processPortalCooldown();
|
this.processPortalCooldown();
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 331e88186cc47dabbb35e849313721f38070c4d6..e70272cd9e6566e79c5aa9d2a1440b19f6c7a19c 100644
|
index fb4ae2cd4cb1a775d64cec9f5131a95f8919c38e..f8d9864de8ec5e49d8d48d6808d0027c839b7bb6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3704,20 +3704,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3713,20 +3713,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stream<Entity> getIndirectPassengersStream() {
|
private Stream<Entity> getIndirectPassengersStream() {
|
||||||
@ -43,7 +43,7 @@ index 331e88186cc47dabbb35e849313721f38070c4d6..e70272cd9e6566e79c5aa9d2a1440b19
|
|||||||
return () -> {
|
return () -> {
|
||||||
return this.getIndirectPassengersStream().iterator();
|
return this.getIndirectPassengersStream().iterator();
|
||||||
};
|
};
|
||||||
@@ -3734,6 +3748,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3743,6 +3757,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
|
|
||||||
public boolean hasExactlyOnePlayerPassenger() {
|
public boolean hasExactlyOnePlayerPassenger() {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index e70272cd9e6566e79c5aa9d2a1440b19f6c7a19c..c5cbb845d5b79af580cb2d4f3df6d52ffe4e4f82 100644
|
index f8d9864de8ec5e49d8d48d6808d0027c839b7bb6..5483a6a81b6a9de524e7116356fa71af686c70aa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3188,6 +3188,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3197,6 +3197,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
worldserver = shapedetectorshape.world;
|
worldserver = shapedetectorshape.world;
|
||||||
@ -32,7 +32,7 @@ index e70272cd9e6566e79c5aa9d2a1440b19f6c7a19c..c5cbb845d5b79af580cb2d4f3df6d52f
|
|||||||
if (worldserver == this.level) {
|
if (worldserver == this.level) {
|
||||||
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
|
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
|
||||||
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
|
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
|
||||||
@@ -3207,8 +3224,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3216,8 +3233,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
entity.restoreFrom(this);
|
entity.restoreFrom(this);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index c5cbb845d5b79af580cb2d4f3df6d52ffe4e4f82..15d9159bb67619a40edc4be5556615dcd9a211a0 100644
|
index 5483a6a81b6a9de524e7116356fa71af686c70aa..f19ece7738e493c3e69ea298f55e3f32da31204e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2000,6 +2000,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2009,6 +2009,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ index ef6aabd65651fe2eabe319908e6adfe9f97ee467..380733b27c4e091c9376b779701e8e39
|
|||||||
|
|
||||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 15d9159bb67619a40edc4be5556615dcd9a211a0..a4d4e5cb3bd7a4816671b058c640ccc90dec8f54 100644
|
index f19ece7738e493c3e69ea298f55e3f32da31204e..ef515ec320454fd6a54457ca419ddd42d0c3b5c8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -971,7 +971,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -971,7 +971,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -182,7 +182,7 @@ index 15d9159bb67619a40edc4be5556615dcd9a211a0..a4d4e5cb3bd7a4816671b058c640ccc9
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
||||||
@@ -4018,7 +4060,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4027,7 +4069,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeltaMovement(Vec3 velocity) {
|
public void setDeltaMovement(Vec3 velocity) {
|
||||||
@ -192,7 +192,7 @@ index 15d9159bb67619a40edc4be5556615dcd9a211a0..a4d4e5cb3bd7a4816671b058c640ccc9
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addDeltaMovement(Vec3 velocity) {
|
public void addDeltaMovement(Vec3 velocity) {
|
||||||
@@ -4104,7 +4148,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4113,7 +4157,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
// Paper end - fix MC-4
|
// Paper end - fix MC-4
|
||||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||||
|
@ -1215,7 +1215,7 @@ index 6c7d68f910d3be55ed0b3124bfc861d5446c1388..88e9c5faca16eeb5cafcedb811a3d9d4
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 9d7304e97ecc56b78e1a890762346d192c792f4c..9c2d5619f22a8be2d22c6ae926630132c2fffb30 100644
|
index b284a9fd506f30256b8194603c12865086eebdaa..48606a6d6ee4e1ba9d6cdb1600bbe8e62a16e400 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1160,9 +1160,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1160,9 +1160,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -1366,7 +1366,7 @@ index 9d7304e97ecc56b78e1a890762346d192c792f4c..9c2d5619f22a8be2d22c6ae926630132
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List<VoxelShape> collisions) {
|
public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List<VoxelShape> collisions) {
|
||||||
@@ -2469,11 +2550,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2478,11 +2559,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
float f = this.dimensions.width * 0.8F;
|
float f = this.dimensions.width * 0.8F;
|
||||||
AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f);
|
AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 9c2d5619f22a8be2d22c6ae926630132c2fffb30..12a032f265a4a5aaac248599cc263896279b54bb 100644
|
index 48606a6d6ee4e1ba9d6cdb1600bbe8e62a16e400..9bbc8e1f15b5dfc62bcb065d6ebb87fa58afb91e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3302,6 +3302,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3311,6 +3311,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void restoreFrom(Entity original) {
|
public void restoreFrom(Entity original) {
|
||||||
@ -22,7 +22,7 @@ index 9c2d5619f22a8be2d22c6ae926630132c2fffb30..12a032f265a4a5aaac248599cc263896
|
|||||||
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
|
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
|
||||||
|
|
||||||
nbttagcompound.remove("Dimension");
|
nbttagcompound.remove("Dimension");
|
||||||
@@ -3383,10 +3390,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3392,10 +3399,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit
|
if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit
|
||||||
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit
|
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 12a032f265a4a5aaac248599cc263896279b54bb..9c9251f9f8ac83dddef87561af1d3ea2ab37009c 100644
|
index 9bbc8e1f15b5dfc62bcb065d6ebb87fa58afb91e..ac9a612488bf8a3efdfbfbfe9fb1de818dac742b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -396,6 +396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -396,6 +396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -25,7 +25,7 @@ index 12a032f265a4a5aaac248599cc263896279b54bb..9c9251f9f8ac83dddef87561af1d3ea2
|
|||||||
this.setTicksFrozen(0);
|
this.setTicksFrozen(0);
|
||||||
this.level.levelEvent((Player) null, 1009, this.blockPosition, 1);
|
this.level.levelEvent((Player) null, 1009, this.blockPosition, 1);
|
||||||
}
|
}
|
||||||
@@ -2276,6 +2277,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2285,6 +2286,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (fromNetherPortal) {
|
if (fromNetherPortal) {
|
||||||
nbt.putBoolean("Paper.FromNetherPortal", true);
|
nbt.putBoolean("Paper.FromNetherPortal", true);
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ index 12a032f265a4a5aaac248599cc263896279b54bb..9c9251f9f8ac83dddef87561af1d3ea2
|
|||||||
// Paper end
|
// Paper end
|
||||||
return nbt;
|
return nbt;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -2440,6 +2444,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2449,6 +2453,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (spawnReason == null) {
|
if (spawnReason == null) {
|
||||||
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
|
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity
|
|||||||
Bad plugins doing this would cause some obvious problems...
|
Bad plugins doing this would cause some obvious problems...
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 9c9251f9f8ac83dddef87561af1d3ea2ab37009c..4728b08a363dfc9e33f6858a88faba404d79af6f 100644
|
index ac9a612488bf8a3efdfbfbfe9fb1de818dac742b..49ee1960c1f48a77fe6f5fe458374045eea36ee8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2703,6 +2703,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2712,6 +2712,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Guard against invalid entity positions
|
|||||||
Anything not finite should be blocked and logged
|
Anything not finite should be blocked and logged
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 4728b08a363dfc9e33f6858a88faba404d79af6f..8770c02b6ba1d1dcb7b5fa3ac7f006a7097234f5 100644
|
index 49ee1960c1f48a77fe6f5fe458374045eea36ee8..5597c0ff49179e4978b82d36d92ba96f147c590c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4247,11 +4247,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4256,11 +4256,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
|
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 0bc808ac268dce5a170e7e55666885b8c2c09164..b2a0423b92f1a74a6c07433519fdbd5fdfa56976 100644
|
index 0e27a7b943a5e4d580fdbce4cd14d0528c808735..e46a62a01319e011a79889ee686dd13c6c4d309e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2535,6 +2535,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2544,6 +2544,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
|
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
|
||||||
|
|
||||||
entityitem.setDefaultPickUpDelay();
|
entityitem.setDefaultPickUpDelay();
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index b2a0423b92f1a74a6c07433519fdbd5fdfa56976..23a2551fa27a0882f939268ab1595c20b81194e7 100644
|
index e46a62a01319e011a79889ee686dd13c6c4d309e..10d8e11ea1e851b19f038230a9b1fb5c3a024f25 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2886,6 +2886,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2895,6 +2895,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||||
this.level.getProfiler().push("portal");
|
this.level.getProfiler().push("portal");
|
||||||
this.portalTime = i;
|
this.portalTime = i;
|
||||||
@ -22,7 +22,7 @@ index b2a0423b92f1a74a6c07433519fdbd5fdfa56976..23a2551fa27a0882f939268ab1595c20
|
|||||||
this.setPortalCooldown();
|
this.setPortalCooldown();
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this instanceof ServerPlayer) {
|
if (this instanceof ServerPlayer) {
|
||||||
@@ -2893,6 +2900,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2902,6 +2909,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
} else {
|
} else {
|
||||||
this.changeDimension(worldserver1);
|
this.changeDimension(worldserver1);
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 23a2551fa27a0882f939268ab1595c20b81194e7..407d954935a5213a31329c4008f262c450118422 100644
|
index 10d8e11ea1e851b19f038230a9b1fb5c3a024f25..7443fb7fae30f22b2eaa2727c383c56891904068 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3155,6 +3155,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3164,6 +3164,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
pluginManager.callEvent(entityCombustEvent);
|
pluginManager.callEvent(entityCombustEvent);
|
||||||
if (!entityCombustEvent.isCancelled()) {
|
if (!entityCombustEvent.isCancelled()) {
|
||||||
this.setSecondsOnFire(entityCombustEvent.getDuration(), false);
|
this.setSecondsOnFire(entityCombustEvent.getDuration(), false);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 407d954935a5213a31329c4008f262c450118422..7f94da8059147760cbdc2476d0e8beda4a105f40 100644
|
index 7443fb7fae30f22b2eaa2727c383c56891904068..778f2112db84655113b29df39567e4135940b305 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3840,9 +3840,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3849,9 +3849,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
EnchantmentHelper.doPostDamageEffects(attacker, target);
|
EnchantmentHelper.doPostDamageEffects(attacker, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 7f94da8059147760cbdc2476d0e8beda4a105f40..be54a70b47433c2abaeb8632ffe55d0762f619d6 100644
|
index 778f2112db84655113b29df39567e4135940b305..a05fdfdc1878d4f4619b7eaff81edbae9f1b1537 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3533,7 +3533,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3542,7 +3542,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
Location enter = bukkitEntity.getLocation();
|
Location enter = bukkitEntity.getLocation();
|
||||||
Location exit = new Location(exitWorldServer.getWorld(), exitPosition.x(), exitPosition.y(), exitPosition.z());
|
Location exit = new Location(exitWorldServer.getWorld(), exitPosition.x(), exitPosition.y(), exitPosition.z());
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren