readd debugstick check
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/ExperienceBottleItem.java
|
||||
+++ b/net/minecraft/world/item/ExperienceBottleItem.java
|
||||
@@ -21,22 +_,38 @@
|
||||
@@ -21,22 +_,36 @@
|
||||
@Override
|
||||
public InteractionResult use(Level level, Player player, InteractionHand hand) {
|
||||
ItemStack itemInHand = player.getItemInHand(hand);
|
||||
@@ -23,8 +23,8 @@
|
||||
+ if (event.callEvent() && thrownExperienceBottle.attemptSpawn()) {
|
||||
+ if (event.shouldConsume()) {
|
||||
+ itemInHand.consume(1, player);
|
||||
+ } else if (player instanceof net.minecraft.server.level.ServerPlayer) {
|
||||
+ ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity().updateInventory();
|
||||
+ } else {
|
||||
+ player.containerMenu.sendAllDataToRemote();
|
||||
+ }
|
||||
+
|
||||
+ level.playSound(
|
||||
@@ -38,9 +38,7 @@
|
||||
+ 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)
|
||||
+ );
|
||||
+ } else {
|
||||
+ if (player instanceof net.minecraft.server.level.ServerPlayer) {
|
||||
+ ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity().updateInventory();
|
||||
+ }
|
||||
+ player.containerMenu.sendAllDataToRemote();
|
||||
+ return InteractionResult.FAIL;
|
||||
+ }
|
||||
+ // Paper end - PlayerLaunchProjectileEvent
|
||||
|
||||
Reference in New Issue
Block a user