mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 09:23:42 +01:00
62 lines
3.2 KiB
Diff
62 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Tue, 20 Jul 2021 21:25:35 -0700
|
|
Subject: [PATCH] Add a bunch of missing forceDrop toggles
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
index 68da2530db8b0fcdba957ee90c185324a010919f..4a027c802ffa80f69cf2bc68f737a842fbfb0596 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -1489,7 +1489,9 @@ public abstract class Mob extends LivingEntity {
|
|
}
|
|
|
|
if (this.tickCount > 100) {
|
|
+ this.forceDrops = true; // Paper
|
|
this.spawnAtLocation((ItemLike) Items.LEAD);
|
|
+ this.forceDrops = false; // Paper
|
|
this.leashInfoTag = null;
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
|
|
index e47f3092b6bd6b86b577de705db1a575d0952348..490212cfe4e5cea7219eaf4304e14bfac0e6472d 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
|
|
@@ -100,7 +100,9 @@ public class WorkAtComposter extends WorkAtPoi {
|
|
ItemStack itemstack = inventorysubcontainer.addItem(new ItemStack(Items.BREAD, j));
|
|
|
|
if (!itemstack.isEmpty()) {
|
|
+ entity.forceDrops = true; // Paper
|
|
entity.spawnAtLocation(itemstack, 0.5F);
|
|
+ entity.forceDrops = false; // Paper
|
|
}
|
|
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
|
index 29372c8a0c54e4bae518e09846f0e9caba263896..f9be50049325a1139d67ccf590caeeceadb2fd23 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
|
@@ -522,7 +522,9 @@ public class Panda extends Animal {
|
|
}
|
|
|
|
if (!this.level.isClientSide() && this.random.nextInt(700) == 0 && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
|
+ this.forceDrops = true; // Paper
|
|
this.spawnAtLocation((ItemLike) Items.SLIME_BALL);
|
|
+ this.forceDrops = false; // Paper
|
|
}
|
|
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
index f7c23377e41870c558a49a08552d109b7b9cbc33..8a2c2b4bd603aae37055abd058feb7ee759078ce 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
|
@@ -305,7 +305,9 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
|
@Override
|
|
protected void finishConversion(ServerLevel world) {
|
|
PiglinAi.cancelAdmiring(this);
|
|
+ this.forceDrops = true; // Paper
|
|
this.inventory.removeAllItems().forEach(this::spawnAtLocation);
|
|
+ this.forceDrops = false; // Paper
|
|
super.finishConversion(world);
|
|
}
|
|
|