Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes:d0bb0a1d
Fix some tests randomly failing997d378d
Fix client stall in specific teleportation scenariosb3dc2366
SPIGOT-4307: Fix hacky API for banners on shields2a271162
SPIGOT-4301: Fix more invalid enchants5d0d83bb
SPIGOT-4309: Add "forced" display of particlesa6772578
Add additional tests for CraftBlockDatace1af0c3
Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
61 Zeilen
3.4 KiB
Diff
61 Zeilen
3.4 KiB
Diff
From 8f7eca760bb5d7e6a932cf26fa200c680f7288cc Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sat, 21 Jul 2018 01:51:27 -0500
|
|
Subject: [PATCH] EnderDragon Events
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
|
index b78d3fe508..ef8b0e765f 100644
|
|
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
|
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
|
@@ -63,7 +63,9 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
|
this.d.setDuration(200);
|
|
this.d.setParticle(Particles.j);
|
|
this.d.a(new MobEffect(MobEffects.HARM));
|
|
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFlameEvent((org.bukkit.entity.EnderDragon) this.a.getBukkitEntity(), (org.bukkit.entity.AreaEffectCloud) this.d.getBukkitEntity()).callEvent()) // Paper
|
|
this.a.world.addEntity(this.d);
|
|
+ else this.removeAreaEffect(); // Paper
|
|
}
|
|
|
|
}
|
|
@@ -73,6 +75,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
|
++this.c;
|
|
}
|
|
|
|
+ public void removeAreaEffect() { this.e(); } // Paper - OBFHELPER
|
|
public void e() {
|
|
if (this.d != null) {
|
|
this.d.die();
|
|
diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
|
index 9c158fd588..b4887d6586 100644
|
|
--- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
|
+++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
|
@@ -67,7 +67,9 @@ public class DragonControllerStrafe extends AbstractDragonController {
|
|
EntityDragonFireball entitydragonfireball = new EntityDragonFireball(this.a.world, this.a, d9, d10, d11);
|
|
|
|
entitydragonfireball.setPositionRotation(d6, d7, d8, 0.0F, 0.0F);
|
|
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) a.getBukkitEntity(), (org.bukkit.entity.DragonFireball) entitydragonfireball.getBukkitEntity()).callEvent()) // Paper
|
|
this.a.world.addEntity(entitydragonfireball);
|
|
+ else entitydragonfireball.die(); // Paper
|
|
this.c = 0;
|
|
if (this.d != null) {
|
|
while (!this.d.b()) {
|
|
diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
|
index 862ffc9543..2b55cc68b5 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
|
@@ -39,8 +39,10 @@ public class EntityDragonFireball extends EntityFireball {
|
|
}
|
|
}
|
|
|
|
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list, (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper
|
|
this.world.triggerEffect(2006, new BlockPosition(this.locX, this.locY, this.locZ), 0);
|
|
this.world.addEntity(entityareaeffectcloud);
|
|
+ } else entityareaeffectcloud.die(); // Paper
|
|
this.die();
|
|
}
|
|
|
|
--
|
|
2.18.0
|
|
|