geforkt von Mirrors/Paper
net.minecraft.world.entity.projectile.windcharge
Dieser Commit ist enthalten in:
Ursprung
5b0289a248
Commit
ce9d79a81b
@ -0,0 +1,38 @@
|
|||||||
|
--- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
|
||||||
|
+++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
|
||||||
|
@@ -85,7 +_,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
- public void push(double x, double y, double z) {
|
||||||
|
+ public void push(double x, double y, double z, @Nullable Entity pushingEntity) { // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void explode(Vec3 pos);
|
||||||
|
@@ -98,7 +_,7 @@
|
||||||
|
Vec3 vec3 = Vec3.atLowerCornerOf(unitVec3i).multiply(0.25, 0.25, 0.25);
|
||||||
|
Vec3 vec31 = result.getLocation().add(vec3);
|
||||||
|
this.explode(vec31);
|
||||||
|
- this.discard();
|
||||||
|
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -106,7 +_,7 @@
|
||||||
|
protected void onHit(HitResult result) {
|
||||||
|
super.onHit(result);
|
||||||
|
if (!this.level().isClientSide) {
|
||||||
|
- this.discard();
|
||||||
|
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -140,7 +_,7 @@
|
||||||
|
public void tick() {
|
||||||
|
if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxY() + 30) {
|
||||||
|
this.explode(this.position());
|
||||||
|
- this.discard();
|
||||||
|
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
|
||||||
|
} else {
|
||||||
|
super.tick();
|
||||||
|
}
|
@ -1,48 +0,0 @@
|
|||||||
--- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
|
|
||||||
+++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
|
|
||||||
@@ -24,6 +24,9 @@
|
|
||||||
import net.minecraft.world.phys.EntityHitResult;
|
|
||||||
import net.minecraft.world.phys.HitResult;
|
|
||||||
import net.minecraft.world.phys.Vec3;
|
|
||||||
+// CraftBukkit start
|
|
||||||
+import org.bukkit.event.entity.EntityRemoveEvent;
|
|
||||||
+// CraftBukkit end
|
|
||||||
|
|
||||||
public abstract class AbstractWindCharge extends AbstractHurtingProjectile implements ItemSupplier {
|
|
||||||
|
|
||||||
@@ -98,7 +101,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
- public void push(double deltaX, double deltaY, double deltaZ) {}
|
|
||||||
+ public void push(double deltaX, double deltaY, double deltaZ, @Nullable Entity pushingEntity) {} // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
|
|
||||||
|
|
||||||
public abstract void explode(Vec3 pos);
|
|
||||||
|
|
||||||
@@ -111,7 +114,7 @@
|
|
||||||
Vec3 vec3d1 = blockHitResult.getLocation().add(vec3d);
|
|
||||||
|
|
||||||
this.explode(vec3d1);
|
|
||||||
- this.discard();
|
|
||||||
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -120,7 +123,7 @@
|
|
||||||
protected void onHit(HitResult hitResult) {
|
|
||||||
super.onHit(hitResult);
|
|
||||||
if (!this.level().isClientSide) {
|
|
||||||
- this.discard();
|
|
||||||
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -155,7 +158,7 @@
|
|
||||||
public void tick() {
|
|
||||||
if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxY() + 30) {
|
|
||||||
this.explode(this.position());
|
|
||||||
- this.discard();
|
|
||||||
+ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
|
|
||||||
} else {
|
|
||||||
super.tick();
|
|
||||||
}
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren