mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Renumber patches, fix conflicts, update for 1.12
This commit is contained in:
parent
d6358a6ac1
commit
cb887bb4f4
8 changed files with 35 additions and 35 deletions
|
@ -1,11 +1,11 @@
|
|||
From e704dc9588b52864b7a812d19cb31db68e34a155 Mon Sep 17 00:00:00 2001
|
||||
From 8e5a65fb5168e3a6f655fb0e99b3ca98b7e73860 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 5 May 2017 03:57:08 -0500
|
||||
Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
|
||||
index 90260b7e..7163f8b0 100644
|
||||
index 90260b7e..2e98e4f9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Item.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Item.java
|
||||
@@ -34,4 +34,20 @@ public interface Item extends Entity {
|
||||
|
@ -30,5 +30,5 @@ index 90260b7e..7163f8b0 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
From 1c5d13ab2ee4ed3b4014df257470cf39889789e5 Mon Sep 17 00:00:00 2001
|
||||
From 447ed7747e09f6b38ea1119083b95c47c55e1bab Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 7 May 2017 06:26:01 -0500
|
||||
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
|
||||
index dfba8163..fd97ea21 100644
|
||||
index dfba8163..83ee01f7 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
|
||||
@@ -11,6 +11,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
@ -16,7 +16,7 @@ index dfba8163..fd97ea21 100644
|
|||
private boolean cancel = false;
|
||||
private final int remaining;
|
||||
|
||||
@@ -38,12 +39,35 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
@@ -38,12 +39,34 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
return remaining;
|
||||
}
|
||||
|
||||
|
@ -52,5 +52,5 @@ index dfba8163..fd97ea21 100644
|
|||
|
||||
@Override
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From a631841be7233f73e601e109bbfdcc5a57e8ae6b Mon Sep 17 00:00:00 2001
|
||||
From 22f105de2d79c874e1c620563073bbda1a78c97a Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 11 Jun 2017 16:30:37 -0500
|
||||
Subject: [PATCH] PlayerAttemptPickupItemEvent
|
||||
|
@ -47,5 +47,5 @@ index 00000000..2f5fdb13
|
|||
+ }
|
||||
+}
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From a22f01307daf61a282adc1665cffc08e47871490 Mon Sep 17 00:00:00 2001
|
||||
From 92a2a2f1b72749139bbbb785746b546a3741474f Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 5 May 2017 01:16:10 -0500
|
||||
Subject: [PATCH] EntityPickupItemEvent
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] EntityPickupItemEvent
|
|||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java b/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..f485f313
|
||||
index 00000000..3d40b515
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java
|
||||
@@ -0,0 +1,46 @@
|
||||
@@ -0,0 +1,48 @@
|
||||
+package org.bukkit.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.Item;
|
||||
|
@ -59,5 +59,5 @@ index 00000000..f485f313
|
|||
+ }
|
||||
+}
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
From 57a1a544e630803a6471f7ce122d23edf24c6f43 Mon Sep 17 00:00:00 2001
|
||||
From c45dc0443356a24ad649ca27d03854f287b916c2 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 5 May 2017 03:57:17 -0500
|
||||
Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 1d26555d..3179e627 100644
|
||||
index b594602ab..a7bee79b8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -508,6 +508,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -512,6 +512,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
while (iterator.hasNext()) {
|
||||
EntityItem entityitem = (EntityItem) iterator.next();
|
||||
|
||||
|
@ -22,7 +22,7 @@ index 1d26555d..3179e627 100644
|
|||
this.a(entityitem);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index 95ca1b8e..207b6f0b 100644
|
||||
index 1927e8e25..083155998 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -19,6 +19,7 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
|
@ -34,7 +34,7 @@ index 95ca1b8e..207b6f0b 100644
|
|||
private String g;
|
||||
private String h;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
index a17a537d..6bacf204 100644
|
||||
index a17a537d6..1df17f09b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
@@ -37,6 +37,16 @@ public class CraftItem extends CraftEntity implements Item {
|
||||
|
@ -55,5 +55,5 @@ index a17a537d..6bacf204 100644
|
|||
public String toString() {
|
||||
return "CraftItem";
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
From b8cff2eed487001ad1dfca2d176a6840ef524edc Mon Sep 17 00:00:00 2001
|
||||
From f1170c4c07786c7874951f21ad991cb404d9ccbc Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 7 May 2017 06:26:09 -0500
|
||||
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index 95ca1b8e..2dd27d1c 100644
|
||||
index 083155998..6ed3d7906 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -328,6 +328,7 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
@@ -329,6 +329,7 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||
int canHold = entityhuman.inventory.canHold(itemstack);
|
||||
int remaining = i - canHold;
|
||||
|
@ -16,7 +16,7 @@ index 95ca1b8e..2dd27d1c 100644
|
|||
|
||||
if (this.pickupDelay <= 0 && canHold > 0) {
|
||||
itemstack.setCount(canHold);
|
||||
@@ -335,8 +336,14 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
@@ -336,8 +337,14 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
// event.setCancelled(!entityhuman.canPickUpLoot); TODO
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
itemstack.setCount(canHold + remaining);
|
||||
|
@ -31,10 +31,10 @@ index 95ca1b8e..2dd27d1c 100644
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -374,7 +381,11 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
}
|
||||
}
|
||||
@@ -347,7 +354,11 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
// CraftBukkit end
|
||||
|
||||
if (this.pickupDelay == 0 && (this.h == null || 6000 - this.age <= 200 || this.h.equals(entityhuman.getName())) && entityhuman.inventory.pickup(itemstack)) {
|
||||
- entityhuman.receive(this, i);
|
||||
+ // Paper Start
|
||||
+ if (flyAtPlayer) {
|
||||
|
@ -45,5 +45,5 @@ index 95ca1b8e..2dd27d1c 100644
|
|||
this.die();
|
||||
itemstack.setCount(i);
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
From 63577ff15d7e0f32eec140953d7dd818b0022c54 Mon Sep 17 00:00:00 2001
|
||||
From 60df54b7313c848e4144b3023ee60ce26b980b25 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 11 Jun 2017 16:30:30 -0500
|
||||
Subject: [PATCH] PlayerAttemptPickupItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index 95ca1b8e..8820dd32 100644
|
||||
index 6ed3d7906..21a7a3a12 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
|
@ -16,7 +16,7 @@ index 95ca1b8e..8820dd32 100644
|
|||
import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit
|
||||
import com.destroystokyo.paper.HopperPusher; // Paper
|
||||
|
||||
@@ -325,6 +326,12 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
@@ -326,6 +327,12 @@ public class EntityItem extends Entity implements HopperPusher {
|
||||
Item item = itemstack.getItem();
|
||||
int i = itemstack.getCount();
|
||||
|
||||
|
@ -30,5 +30,5 @@ index 95ca1b8e..8820dd32 100644
|
|||
int canHold = entityhuman.inventory.canHold(itemstack);
|
||||
int remaining = i - canHold;
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
From 8dc26cb4650fa9a4825cc14552845ed6f010ecb3 Mon Sep 17 00:00:00 2001
|
||||
From db4dea8fc1d501d4fb9b876675a56788fe29f05e Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 5 May 2017 01:16:22 -0500
|
||||
Subject: [PATCH] EntityPickupItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 1d26555d..8cc55734 100644
|
||||
index a7bee79b8..a93c00014 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -10,8 +10,11 @@ import java.util.UUID;
|
||||
|
@ -20,7 +20,7 @@ index 1d26555d..8cc55734 100644
|
|||
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.EntityUnleashEvent;
|
||||
@@ -558,6 +561,18 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -568,6 +571,16 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
if (flag && this.c(itemstack)) {
|
||||
|
@ -38,5 +38,5 @@ index 1d26555d..8cc55734 100644
|
|||
|
||||
switch (enumitemslot.a()) {
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
Loading…
Reference in a new issue