mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Nesaak <52047222+Nesaak@users.noreply.github.com>
|
|
Date: Sat, 23 May 2020 10:31:11 -0400
|
|
Subject: [PATCH] Improve Arrow API
|
|
|
|
Add method to get the arrow's itemstack and a method
|
|
to set the arrow's "noclip" status
|
|
|
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
|
index 376885c8148da619a3b203145d315ebaf44994fb..15abd085eeb0a31a925c1a8d6de903c9d4625a29 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
|
@@ -102,6 +102,23 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow {
|
|
this.getHandle().pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.byOrdinal(status.ordinal());
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() {
|
|
+ return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem());
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setNoPhysics(boolean noPhysics) {
|
|
+ this.getHandle().setNoPhysics(noPhysics);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean hasNoPhysics() {
|
|
+ return this.getHandle().isNoPhysics();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public void setTicksLived(int value) {
|
|
super.setTicksLived(value);
|