@@ -1,19 +1,15 @@
|
||||
--- a/net/minecraft/world/item/ItemTrident.java
|
||||
+++ b/net/minecraft/world/item/ItemTrident.java
|
||||
@@ -68,9 +68,12 @@
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
if (k <= 0 || entityhuman.isInWaterOrRain()) {
|
||||
if (!world.isClientSide) {
|
||||
+ // CraftBukkit - moved down
|
||||
+ /*
|
||||
itemstack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.broadcastBreakEvent(entityliving.getUsedItemHand());
|
||||
});
|
||||
+ */
|
||||
- itemstack.hurtAndBreak(1, entityhuman, EntityLiving.getSlotForHand(entityliving.getUsedItemHand()));
|
||||
+ // itemstack.hurtAndBreak(1, entityhuman, EntityLiving.getSlotForHand(entityliving.getUsedItemHand())); // CraftBukkit - moved down
|
||||
if (k == 0) {
|
||||
EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack);
|
||||
|
||||
@@ -79,11 +82,30 @@
|
||||
@@ -81,11 +81,26 @@
|
||||
entitythrowntrident.pickup = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||
}
|
||||
|
||||
@@ -26,26 +22,22 @@
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ itemstack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
|
||||
+ entityhuman1.broadcastBreakEvent(entityliving.getUsedItemHand());
|
||||
+ });
|
||||
+ itemstack.hurtAndBreak(1, entityhuman, EntityLiving.getSlotForHand(entityliving.getUsedItemHand()));
|
||||
+ entitythrowntrident.pickupItemStack = itemstack.copy(); // SPIGOT-4511 update since damage call moved
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
world.playSound((EntityHuman) null, (Entity) entitythrowntrident, SoundEffects.TRIDENT_THROW, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||
if (!entityhuman.getAbilities().instabuild) {
|
||||
if (!entityhuman.hasInfiniteMaterials()) {
|
||||
entityhuman.getInventory().removeItem(itemstack);
|
||||
}
|
||||
+ // CraftBukkit start - SPIGOT-5458 also need in this branch :(
|
||||
+ } else {
|
||||
+ itemstack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
|
||||
+ entityhuman1.broadcastBreakEvent(entityliving.getUsedItemHand());
|
||||
+ });
|
||||
+ itemstack.hurtAndBreak(1, entityhuman, EntityLiving.getSlotForHand(entityliving.getUsedItemHand()));
|
||||
+ // CraftBukkkit end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +122,7 @@
|
||||
@@ -102,6 +117,7 @@
|
||||
f2 *= f6 / f5;
|
||||
f3 *= f6 / f5;
|
||||
f4 *= f6 / f5;
|
||||
|
||||
Reference in New Issue
Block a user