compile fixes

compile fixes

compile fixes
This commit is contained in:
Jason Penilla
2024-04-24 20:40:32 -07:00
parent aa5add485f
commit 1db3411c0e
20 changed files with 73 additions and 55 deletions

View File

@@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- if (!CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand)) {
- return InteractionResult.PASS;
+ // Paper start - custom shear drops
+ List<ItemStack> drops = this.generateDefaultDrops();
+ java.util.List<ItemStack> drops = this.generateDefaultDrops();
+ org.bukkit.event.player.PlayerShearEntityEvent event = CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand, drops);
+ if (event != null) {
+ if (event.isCancelled()) {
@@ -78,8 +78,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ public List<ItemStack> generateDefaultDrops() {
+ List<ItemStack> dropEntities = new java.util.ArrayList<>(5);
+ public java.util.List<ItemStack> generateDefaultDrops() {
+ java.util.List<ItemStack> dropEntities = new java.util.ArrayList<>(5);
+ for (int i = 0; i < 5; ++i) {
+ dropEntities.add(new ItemStack(this.getVariant().getBlockState().getBlock()));
+ }
@@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ public void shear(SoundSource shearedSoundCategory, List<ItemStack> drops) { // If drops is null, need to generate drops
+ public void shear(SoundSource shearedSoundCategory, java.util.List<ItemStack> drops) { // If drops is null, need to generate drops
+ // Paper end - custom shear drops
this.level().playSound((Player) null, (Entity) this, SoundEvents.MOOSHROOM_SHEAR, shearedSoundCategory, 1.0F, 1.0F);
if (!this.level().isClientSide()) {