parent
6fcca46674
commit
7401313e16
2 changed files with 22 additions and 4 deletions
|
@ -56,6 +56,20 @@ index fb4c7220c4edad54813036d62db7e3eefeda92a3..83d8a09980c4ab3c7c97b07c3dcdb3d7
|
||||||
Panda.this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
|
Panda.this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
|
||||||
int i = Panda.this.isLazy() ? Panda.this.random.nextInt(50) + 10 : Panda.this.random.nextInt(150) + 10;
|
int i = Panda.this.isLazy() ? Panda.this.random.nextInt(50) + 10 : Panda.this.random.nextInt(150) + 10;
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||||
|
index 11f4a2e15d42a029406fe8399b8d93ae136f0295..5ebf49a565af4ab3bead60a83bca2e6561e6a29c 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||||
|
@@ -468,7 +468,9 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Hol
|
||||||
|
this.playSound(SoundEvents.ARMOR_UNEQUIP_WOLF);
|
||||||
|
itemstack1 = this.getBodyArmorItem();
|
||||||
|
this.setBodyArmorItem(ItemStack.EMPTY);
|
||||||
|
+ this.forceDrops = true; // Paper - add missing forceDrops toggles
|
||||||
|
this.spawnAtLocation(itemstack1);
|
||||||
|
+ this.forceDrops = false; // Paper - add missing forceDrops toggles
|
||||||
|
return InteractionResult.SUCCESS;
|
||||||
|
} else if (((Ingredient) ((ArmorMaterial) ArmorMaterials.ARMADILLO.value()).repairIngredient().get()).test(itemstack) && this.isInSittingPose() && this.hasArmor() && this.isOwnedBy(player) && this.getBodyArmorItem().isDamaged()) {
|
||||||
|
itemstack.shrink(1);
|
||||||
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
|
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 e1f2425ae6d3737302f6a7e010b172a62b41a018..20d9690127aed9c8ae2632bcf497ba0e473b7bea 100644
|
index e1f2425ae6d3737302f6a7e010b172a62b41a018..20d9690127aed9c8ae2632bcf497ba0e473b7bea 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
|
|
|
@ -233,22 +233,26 @@ index 2de1a2f666da9db1832907e1651dbff948e37252..5c2ed3c39c8eb850f3be1e2ea5b5a7ea
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Bogged.java b/src/main/java/net/minecraft/world/entity/monster/Bogged.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Bogged.java b/src/main/java/net/minecraft/world/entity/monster/Bogged.java
|
||||||
index 9c0bfddd479eef688d2509ad700371c3c860ff1a..754eb747179d9318bc5a3883e5622cc400c4e06c 100644
|
index 9c0bfddd479eef688d2509ad700371c3c860ff1a..e9f9b041ae7195e9d23bd446454b1d8c47a1ace1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Bogged.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Bogged.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Bogged.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Bogged.java
|
||||||
@@ -135,6 +135,11 @@ public class Bogged extends AbstractSkeleton implements Shearable {
|
@@ -135,6 +135,15 @@ public class Bogged extends AbstractSkeleton implements Shearable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void spawnShearedMushrooms() {
|
private void spawnShearedMushrooms() {
|
||||||
+ // Paper start - shear drops API
|
+ // Paper start - shear drops API
|
||||||
+ this.generateShearedMushrooms(this::spawnAtLocation);
|
+ this.generateShearedMushrooms(stack -> {
|
||||||
|
+ this.forceDrops = true;
|
||||||
|
+ this.spawnAtLocation(stack);
|
||||||
|
+ this.forceDrops = false;
|
||||||
|
+ });
|
||||||
+ }
|
+ }
|
||||||
+ private void generateShearedMushrooms(java.util.function.Consumer<ItemStack> stackConsumer) {
|
+ private void generateShearedMushrooms(java.util.function.Consumer<ItemStack> stackConsumer) {
|
||||||
+ // Paper end - shear drops API
|
+ // Paper end - shear drops API
|
||||||
if (this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
if (this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(BuiltInLootTables.BOGGED_SHEAR);
|
LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(BuiltInLootTables.BOGGED_SHEAR);
|
||||||
LootParams lootParams = new LootParams.Builder(serverLevel)
|
LootParams lootParams = new LootParams.Builder(serverLevel)
|
||||||
@@ -143,11 +148,20 @@ public class Bogged extends AbstractSkeleton implements Shearable {
|
@@ -143,11 +152,20 @@ public class Bogged extends AbstractSkeleton implements Shearable {
|
||||||
.create(LootContextParamSets.SHEARING);
|
.create(LootContextParamSets.SHEARING);
|
||||||
|
|
||||||
for (ItemStack itemStack : lootTable.getRandomItems(lootParams)) {
|
for (ItemStack itemStack : lootTable.getRandomItems(lootParams)) {
|
||||||
|
|
Loading…
Reference in a new issue