mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
37 lines
1.9 KiB
Diff
37 lines
1.9 KiB
Diff
From 485cde64ee6e886850bbd26abf9f0605cc8b4061 Mon Sep 17 00:00:00 2001
|
|
From: drXor <mcyoungsota@gmail.com>
|
|
Date: Tue, 25 Feb 2014 15:15:26 -0400
|
|
Subject: [PATCH] Cancellable WitherSkull potion effect
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityWitherSkull.java b/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
|
index b797f8a..144ed17 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
|
@@ -35,15 +35,19 @@ public class EntityWitherSkull extends EntityFireball {
|
|
protected void a(MovingObjectPosition movingobjectposition) {
|
|
if (!this.world.isStatic) {
|
|
if (movingobjectposition.entity != null) {
|
|
+ // Spigot start
|
|
+ boolean didDamage = false;
|
|
if (this.shooter != null) {
|
|
- if (movingobjectposition.entity.damageEntity(DamageSource.mobAttack(this.shooter), 8.0F) && !movingobjectposition.entity.isAlive()) {
|
|
+ didDamage = movingobjectposition.entity.damageEntity(DamageSource.mobAttack(this.shooter), 8.0F);
|
|
+ if (didDamage && !movingobjectposition.entity.isAlive()) {
|
|
this.shooter.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit
|
|
}
|
|
} else {
|
|
- movingobjectposition.entity.damageEntity(DamageSource.MAGIC, 5.0F);
|
|
+ didDamage = movingobjectposition.entity.damageEntity(DamageSource.MAGIC, 5.0F);
|
|
}
|
|
|
|
- if (movingobjectposition.entity instanceof EntityLiving) {
|
|
+ if (didDamage && movingobjectposition.entity instanceof EntityLiving) {
|
|
+ // Spigot end
|
|
byte b0 = 0;
|
|
|
|
if (this.world.difficulty == EnumDifficulty.NORMAL) {
|
|
--
|
|
1.9.1
|
|
|