mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-28 03:19:21 +00:00
Apply default item pickup delay in throwing item for non-villager entity
With Minecraft updates, allay and pligin also have throw item behavior, calling this method. Needs to keep item pickup delay since they are not villager entity, and also be consistent with vanilla
This commit is contained in:
@@ -18,10 +18,10 @@ Helps 1.8 Farms let hoppers pick it up before Villager
|
||||
due to our hopper changes
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
index 2664d72c3b6906d0505df2e63c0e5075eba9461b..e7f74b4f54069ffdf74f029639cbf0756f2db095 100644
|
||||
index 2664d72c3b6906d0505df2e63c0e5075eba9461b..cc8f0586fca7b12a95afadb08d51077c74713ce3 100644
|
||||
--- a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
@@ -87,7 +87,17 @@ public class BehaviorUtils {
|
||||
@@ -87,7 +87,19 @@ public class BehaviorUtils {
|
||||
Vec3 vec3 = offset.subtract(entity.position());
|
||||
vec3 = vec3.normalize().multiply(speedMultiplier.x, speedMultiplier.y, speedMultiplier.z);
|
||||
itemEntity.setDeltaMovement(vec3);
|
||||
@@ -35,6 +35,8 @@ index 2664d72c3b6906d0505df2e63c0e5075eba9461b..e7f74b4f54069ffdf74f029639cbf075
|
||||
+ } else {
|
||||
+ itemEntity.pickupDelay = repickupDelay;
|
||||
+ }
|
||||
+ } else {
|
||||
+ itemEntity.setDefaultPickUpDelay();
|
||||
+ }
|
||||
+ // Gale end - EMC - reduce villager item re-pickup
|
||||
// CraftBukkit start
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove stream in BehaviorUtils
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
index e7f74b4f54069ffdf74f029639cbf0756f2db095..b5257eefa04e930b45ffd9d46f28e53026ad728f 100644
|
||||
index cc8f0586fca7b12a95afadb08d51077c74713ce3..ceddfed85cedbe2ddaea9ef6530688b69f087874 100644
|
||||
--- a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
||||
@@ -110,10 +110,33 @@ public class BehaviorUtils {
|
||||
@@ -112,10 +112,33 @@ public class BehaviorUtils {
|
||||
|
||||
public static SectionPos findSectionClosestToVillage(ServerLevel serverLevel, SectionPos sectionPos, int radius) {
|
||||
int i = serverLevel.sectionsToVillage(sectionPos);
|
||||
|
||||
Reference in New Issue
Block a user