NOT FINISHED! 1.13 pre-7
I need more creative commit messages.
This commit is contained in:
@@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
|
||||
Plugins can skip selection of certain arrows and control which is used.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java
|
||||
index 327d31e19..44e7be58e 100644
|
||||
index c8fc18045..de0d80361 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemBow.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemBow.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -18,23 +18,23 @@ index 327d31e19..44e7be58e 100644
|
||||
|
||||
public class ItemBow extends Item {
|
||||
@@ -0,0 +0,0 @@ public class ItemBow extends Item {
|
||||
});
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
- private ItemStack a(EntityHuman entityhuman) {
|
||||
- if (this.d(entityhuman.b(EnumHand.OFF_HAND))) {
|
||||
- if (this.e_(entityhuman.b(EnumHand.OFF_HAND))) {
|
||||
+ private ItemStack a(EntityHuman entityhuman, ItemStack bow) { // Paper
|
||||
+ if (this.d(entityhuman, bow, entityhuman.b(EnumHand.OFF_HAND))) { // Paper
|
||||
+ if (this.e_(entityhuman, bow, entityhuman.b(EnumHand.OFF_HAND))) { // Paper
|
||||
return entityhuman.b(EnumHand.OFF_HAND);
|
||||
- } else if (this.d(entityhuman.b(EnumHand.MAIN_HAND))) {
|
||||
+ } else if (this.d(entityhuman, bow, entityhuman.b(EnumHand.MAIN_HAND))) { // Paper
|
||||
- } else if (this.e_(entityhuman.b(EnumHand.MAIN_HAND))) {
|
||||
+ } else if (this.e_(entityhuman, bow, entityhuman.b(EnumHand.MAIN_HAND))) {
|
||||
return entityhuman.b(EnumHand.MAIN_HAND);
|
||||
} else {
|
||||
for (int i = 0; i < entityhuman.inventory.getSize(); ++i) {
|
||||
ItemStack itemstack = entityhuman.inventory.getItem(i);
|
||||
|
||||
- if (this.d(itemstack)) {
|
||||
+ if (this.d(entityhuman, bow, itemstack)) { // Paper
|
||||
- if (this.e_(itemstack)) {
|
||||
+ if (this.e_(entityhuman, bow, itemstack)) {
|
||||
return itemstack;
|
||||
}
|
||||
}
|
||||
@@ -42,10 +42,10 @@ index 327d31e19..44e7be58e 100644
|
||||
}
|
||||
}
|
||||
|
||||
- protected boolean d(ItemStack itemstack) {
|
||||
- protected boolean e_(ItemStack itemstack) {
|
||||
- return itemstack.getItem() instanceof ItemArrow;
|
||||
+ // Paper start
|
||||
+ protected boolean d(EntityHuman player, ItemStack bow, ItemStack itemstack) {
|
||||
+ protected boolean e_(EntityHuman player, ItemStack bow, ItemStack itemstack) {
|
||||
+ return itemstack.getItem() instanceof ItemArrow && (
|
||||
+ !(player instanceof EntityPlayer) ||
|
||||
+ new com.destroystokyo.paper.event.player.PlayerReadyArrowEvent(
|
||||
|
||||
Reference in New Issue
Block a user