mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
Use CraftBukkit's damage API fix instead of our own
... here's hoping theirs works
This commit is contained in:
parent
847d309a9b
commit
2352f9cadd
2
Bukkit
2
Bukkit
@ -1 +1 @@
|
||||
Subproject commit 07794f4defd6dc688836cd5988d551ba8bac2fe6
|
||||
Subproject commit f2854540c2e535fb3e2d89460ee87f0cfa4daca7
|
@ -1 +1 @@
|
||||
Subproject commit c3553415a159ea22c795e79ea71d7b859455a00f
|
||||
Subproject commit dc0b6f5e82a2bfa521574bfa07cc8b00c486c42e
|
@ -1,4 +1,4 @@
|
||||
From b72b08303cfcc8424fdf55f54ac41f1978341802 Mon Sep 17 00:00:00 2001
|
||||
From d26e74b1e0318675002c6e2b62ead78a2c388949 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <Zbob750@live.com>
|
||||
Date: Tue, 8 Jul 2014 22:39:41 -0500
|
||||
Subject: [PATCH] Better EULA handling
|
@ -1,55 +0,0 @@
|
||||
From d4704f5db1d3d651344b8c385b211722c54eae02 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <Zbob750@live.com>
|
||||
Date: Tue, 8 Jul 2014 21:49:42 -0500
|
||||
Subject: [PATCH] Revert Bukkit Damage API Behavior
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 67484dc..760cec5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -967,6 +967,16 @@ public abstract class EntityLiving extends Entity {
|
||||
// CraftBukkit start
|
||||
protected boolean d(DamageSource damagesource, float f) { // void -> boolean
|
||||
if (!this.isInvulnerable()) {
|
||||
+ // PaperSpigot start - moved up from below to bring back old behavior
|
||||
+ EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, f, 0, 0, 0, 0, 0, 0);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ f = (float) event.getDamage();
|
||||
+ // PaperSpigot end
|
||||
+
|
||||
boolean human = this instanceof EntityHuman;
|
||||
float originalDamage = f;
|
||||
float preDamage = f;
|
||||
@@ -1006,13 +1016,19 @@ public abstract class EntityLiving extends Entity {
|
||||
f = Math.max(f - this.getAbsorptionHearts(), 0.0F);
|
||||
float absorptionModifier = Math.max(f1 - f, 0.0F);
|
||||
|
||||
- EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, -hardHatModifier, -blockingModifier, -armorModifier, -resistanceModifier, -magicModifier, -absorptionModifier);
|
||||
-
|
||||
- if (event.isCancelled()) {
|
||||
- return false;
|
||||
+ // PaperSpigot start - Moved event call up
|
||||
+ event.setDamage(DamageModifier.ARMOR, -armorModifier);
|
||||
+ if (damagesource == DamageSource.FALLING_BLOCK || damagesource == DamageSource.ANVIL) {
|
||||
+ event.setDamage(DamageModifier.HARD_HAT, -hardHatModifier);
|
||||
}
|
||||
|
||||
- f = (float) event.getFinalDamage();
|
||||
+ if (human) {
|
||||
+ event.setDamage(DamageModifier.BLOCKING, -blockingModifier);
|
||||
+ }
|
||||
+ event.setDamage(DamageModifier.RESISTANCE, -resistanceModifier);
|
||||
+ event.setDamage(DamageModifier.MAGIC, -magicModifier);
|
||||
+ event.setDamage(DamageModifier.ABSORPTION, -absorptionModifier);
|
||||
+ // PaperSpigot end
|
||||
|
||||
// Apply damage to helmet
|
||||
if ((damagesource == DamageSource.ANVIL || damagesource == DamageSource.FALLING_BLOCK) && this.getEquipment(4) != null) {
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 18801c8a166e2218b454c809a2e7f6570ba5f0c6 Mon Sep 17 00:00:00 2001
|
||||
From 755651ac280d460be4b612e7bd9203166193c5e8 Mon Sep 17 00:00:00 2001
|
||||
From: Iceee <andrew@opticgaming.tv>
|
||||
Date: Tue, 8 Jul 2014 22:51:47 -0500
|
||||
Subject: [PATCH] Don't tick chests
|
@ -1,4 +1,4 @@
|
||||
From 135f73c937672e6d5ee4055d1c0274a84b1f27ed Mon Sep 17 00:00:00 2001
|
||||
From 0b29096d2b5508950db82e05b7c85dc797c9fa5b Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <Zbob750@live.com>
|
||||
Date: Wed, 9 Jul 2014 17:38:48 -0500
|
||||
Subject: [PATCH] Configurable nerf for TNT cannons
|
Loading…
Reference in New Issue
Block a user