Houston, we got a patch (#2731)
* Houston, we got a patch * is this the end of the beginning or the beginning of the end
This commit is contained in:
@@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
|
||||
internal code.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
index 84c3ea9d00..f563a7b630 100644
|
||||
index 6daa400d2..38fe29f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
@@ -0,0 +0,0 @@ public class CombatTracker {
|
||||
@@ -27,7 +27,7 @@ index 84c3ea9d00..f563a7b630 100644
|
||||
int i = this.f ? 300 : 100;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7811beb807..f9b097fd6f 100644
|
||||
index 75343a438..b03316bc8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -45,9 +45,9 @@ index 7811beb807..f9b097fd6f 100644
|
||||
+ public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER
|
||||
public void b(EntityLiving entityliving) {}
|
||||
|
||||
protected void i(double d0, double d1, double d2) {
|
||||
protected void k(double d0, double d1, double d2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
index 85fc48371d..02595cfccd 100644
|
||||
index b51662ee9..e6032e3ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
||||
@@ -61,7 +61,7 @@ index 85fc48371d..02595cfccd 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
index e22e99df38..ca38ccf768 100644
|
||||
index ac8eaffb9..7495af8e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFox extends EntityAnimal {
|
||||
@@ -94,7 +94,7 @@ index e22e99df38..ca38ccf768 100644
|
||||
|
||||
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
index 2483cfd28a..2a988366cd 100644
|
||||
index 80717ad9a..53aac5bcc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract {
|
||||
@@ -119,18 +119,18 @@ index 2483cfd28a..2a988366cd 100644
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index b09712ca91..1e53af2cce 100644
|
||||
index ac85a5d23..c6bd68919 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
protected float aT;
|
||||
protected float aU;
|
||||
protected float aV;
|
||||
protected float aW;
|
||||
protected float aX;
|
||||
- protected int aY;
|
||||
+ protected int aY; protected int getKillCount() { return this.aY; } // Paper - OBFHELPER
|
||||
- protected int aW;
|
||||
+ protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER
|
||||
public float lastDamage;
|
||||
protected boolean jumping;
|
||||
public float bb;
|
||||
public float aZ;
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
public boolean collides = true;
|
||||
public boolean canPickUpLoot;
|
||||
@@ -148,11 +148,11 @@ index b09712ca91..1e53af2cce 100644
|
||||
+ //SoundEffect soundeffect = this.getSoundDeath();
|
||||
|
||||
- if (flag1 && soundeffect != null) {
|
||||
- this.a(soundeffect, this.getSoundVolume(), this.cV());
|
||||
- this.a(soundeffect, this.getSoundVolume(), this.dn());
|
||||
- }
|
||||
+ //if (flag1 && soundeffect != null) {
|
||||
+ // this.a(soundeffect, this.getSoundVolume(), this.cV());
|
||||
+ //}
|
||||
+// if (flag1 && soundeffect != null) {
|
||||
+// this.a(soundeffect, this.getSoundVolume(), this.dn());
|
||||
+// }
|
||||
+ this.silentDeath = !flag1; // mark entity as dying silently
|
||||
+ // Paper end
|
||||
|
||||
@@ -166,12 +166,12 @@ index b09712ca91..1e53af2cce 100644
|
||||
EntityLiving entityliving = this.getKillingEntity();
|
||||
|
||||
+ /* // Paper - move down to make death event cancellable
|
||||
if (this.aY >= 0 && entityliving != null) {
|
||||
entityliving.a(this, this.aY, damagesource);
|
||||
if (this.aW >= 0 && entityliving != null) {
|
||||
entityliving.a(this, this.aW, damagesource);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
if (this.isSleeping()) {
|
||||
this.dy();
|
||||
this.entityWakeup();
|
||||
}
|
||||
+ */ // Paper
|
||||
|
||||
@@ -198,15 +198,7 @@ index b09712ca91..1e53af2cce 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
boolean flag = false;
|
||||
|
||||
- if (entityliving instanceof EntityWither) {
|
||||
+ if (this.killed && entityliving instanceof EntityWither) {
|
||||
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
BlockPosition blockposition = new BlockPosition(this.locX, this.locY, this.locZ);
|
||||
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
this.f(entityliving);
|
||||
}
|
||||
|
||||
+ if (this.killed) { // Paper
|
||||
@@ -216,6 +208,19 @@ index b09712ca91..1e53af2cce 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
if (!this.world.isClientSide) {
|
||||
boolean flag = false;
|
||||
|
||||
- if (entityliving instanceof EntityWither) {
|
||||
+ if (this.killed && entityliving instanceof EntityWither) { // Paper
|
||||
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
BlockPosition blockposition = new BlockPosition(this);
|
||||
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
- protected void d(DamageSource damagesource) {
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); } // Paper - OBFHELPER
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
|
||||
@@ -225,7 +230,7 @@ index b09712ca91..1e53af2cce 100644
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||
|
||||
this.cF(); // CraftBukkit - from below // PAIL
|
||||
this.dropInventory(); // CraftBukkit - from below
|
||||
+ org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper
|
||||
if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
||||
this.a(damagesource, flag);
|
||||
@@ -242,15 +247,16 @@ index b09712ca91..1e53af2cce 100644
|
||||
+ this.postDeathDropItems(deathEvent); // Paper
|
||||
+ this.drops = new ArrayList<>(); // Paper
|
||||
|
||||
- // this.cF();// CraftBukkit - moved up
|
||||
// this.dropInventory();// CraftBukkit - moved up
|
||||
- this.dropExperience();
|
||||
+ return deathEvent; // Paper
|
||||
}
|
||||
|
||||
protected void cF() {}
|
||||
protected void dropInventory() {}
|
||||
+ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled
|
||||
|
||||
protected void dropDeathLoot(DamageSource damagesource, int i, boolean flag) {}
|
||||
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
return SoundEffects.ENTITY_GENERIC_HURT;
|
||||
}
|
||||
@@ -268,12 +274,12 @@ index b09712ca91..1e53af2cce 100644
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
+ public float getSoundPitch() { return cV();} // Paper - OBFHELPER
|
||||
protected float cV() {
|
||||
+ public float getSoundPitch() { return dn();} // Paper - OBFHELPER
|
||||
protected float dn() {
|
||||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 7e37164c0e..1b35e6c478 100644
|
||||
index bb2a0b7e6..26096afbe 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -324,7 +330,7 @@ index 7e37164c0e..1b35e6c478 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 73cb64e09d..9f317ff2e8 100644
|
||||
index 90fdf89c8..b761a41dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -0,0 +0,0 @@ public enum CraftSound {
|
||||
@@ -351,7 +357,7 @@ index 73cb64e09d..9f317ff2e8 100644
|
||||
this.minecraftKey = minecraftKey;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2c99a1e9df..e9458dc65f 100644
|
||||
index 9e0be10d7..ad70bd5ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -372,7 +378,7 @@ index 2c99a1e9df..e9458dc65f 100644
|
||||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 84c292168e..dc15703fd4 100644
|
||||
index 844781f4e..4fb1092ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -0,0 +0,0 @@ public class CraftEventFactory {
|
||||
|
||||
Reference in New Issue
Block a user