Move CraftBukkit per-file patches
By: Initial <noreply+automated@papermc.io>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
--- a/net/minecraft/world/item/ItemTrident.java
|
||||
+++ b/net/minecraft/world/item/ItemTrident.java
|
||||
@@ -86,9 +86,19 @@
|
||||
if (world instanceof WorldServer) {
|
||||
WorldServer worldserver = (WorldServer) world;
|
||||
|
||||
- itemstack.hurtWithoutBreaking(1, entityhuman);
|
||||
+ // itemstack.hurtWithoutBreaking(1, entityhuman); // CraftBukkit - moved down
|
||||
if (f == 0.0F) {
|
||||
EntityThrownTrident entitythrowntrident = (EntityThrownTrident) IProjectile.spawnProjectileFromRotation(EntityThrownTrident::new, worldserver, itemstack, entityhuman, 0.0F, 2.5F, 1.0F);
|
||||
+ // CraftBukkit start
|
||||
+ if (entitythrowntrident.isRemoved()) {
|
||||
+ if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
|
||||
+ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+ itemstack.hurtWithoutBreaking(1, entityhuman);
|
||||
+ entitythrowntrident.pickupItemStack = itemstack.copy(); // SPIGOT-4511 update since damage call moved
|
||||
+ // CraftBukkit end
|
||||
|
||||
if (entityhuman.hasInfiniteMaterials()) {
|
||||
entitythrowntrident.pickup = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||
@@ -98,6 +108,10 @@
|
||||
|
||||
world.playSound((EntityHuman) null, (Entity) entitythrowntrident, (SoundEffect) holder.value(), SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||
return true;
|
||||
+ // CraftBukkit start - SPIGOT-5458 also need in this branch :(
|
||||
+ } else {
|
||||
+ itemstack.hurtWithoutBreaking(1, entityhuman);
|
||||
+ // CraftBukkkit end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +126,7 @@
|
||||
f3 *= f / f6;
|
||||
f4 *= f / f6;
|
||||
f5 *= f / f6;
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerRiptideEvent(entityhuman, itemstack, f3, f4, f5); // CraftBukkit
|
||||
entityhuman.push((double) f3, (double) f4, (double) f5);
|
||||
entityhuman.startAutoSpinAttack(20, 8.0F, itemstack);
|
||||
if (entityhuman.onGround()) {
|
||||
Reference in New Issue
Block a user