Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
SPIGOT-2218: Drop horse chest on death
Dieser Commit ist enthalten in:
Ursprung
22dcde52c9
Commit
4377b86b29
@ -44,32 +44,21 @@
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -652,11 +655,24 @@
|
||||
@@ -651,11 +654,11 @@
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
super.die(damagesource);
|
||||
+ /* CraftBukkit start - Handle chest dropping in dropDeathLoot below
|
||||
- super.die(damagesource);
|
||||
+ // super.die(damagesource); // Moved down
|
||||
if (!this.world.isClientSide) {
|
||||
this.dropChest();
|
||||
}
|
||||
+ // CraftBukkit end */
|
||||
+ }
|
||||
+
|
||||
+ // CraftBukkit start - Add method
|
||||
+ @Override
|
||||
+ protected void dropDeathLoot(boolean flag, int i) {
|
||||
+ super.dropDeathLoot(flag, i);
|
||||
|
||||
+ // Moved from die method above
|
||||
+ if (!this.world.isClientSide) {
|
||||
+ this.dropChest();
|
||||
+ }
|
||||
-
|
||||
+ super.die(damagesource); // CraftBukkit
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
public void n() {
|
||||
if (this.random.nextInt(200) == 0) {
|
||||
@@ -666,7 +682,7 @@
|
||||
@@ -666,7 +669,7 @@
|
||||
super.n();
|
||||
if (!this.world.isClientSide) {
|
||||
if (this.random.nextInt(900) == 0 && this.deathTicks == 0) {
|
||||
@ -78,7 +67,7 @@
|
||||
}
|
||||
|
||||
if (!this.dm() && !this.isVehicle() && this.random.nextInt(300) == 0 && this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ))).getBlock() == Blocks.GRASS) {
|
||||
@@ -919,6 +935,7 @@
|
||||
@@ -919,6 +922,7 @@
|
||||
if (this.getOwnerUUID() != null) {
|
||||
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID().toString());
|
||||
}
|
||||
@ -86,7 +75,7 @@
|
||||
|
||||
if (this.hasChest()) {
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
@@ -974,6 +991,12 @@
|
||||
@@ -974,6 +978,12 @@
|
||||
this.setOwnerUUID(UUID.fromString(s));
|
||||
}
|
||||
|
||||
@ -99,7 +88,7 @@
|
||||
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
|
||||
|
||||
if (attributeinstance != null) {
|
||||
@@ -1145,6 +1168,18 @@
|
||||
@@ -1145,6 +1155,18 @@
|
||||
}
|
||||
|
||||
public void b(int i) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren