Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
275173e538
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: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
40 Zeilen
1.8 KiB
Diff
40 Zeilen
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Sun, 24 Oct 2021 20:58:43 -0700
|
|
Subject: [PATCH] Entity powdered snow API
|
|
|
|
== AT ==
|
|
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
index 5fad5dbc0815ec3ee86a3fb34fe0c68bb4c33bcc..fbc18be64e71be2215059c34afd8129138dc4dff 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -1370,5 +1370,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
this.entity.setRot(location.getYaw(), location.getPitch());
|
|
return !this.entity.valid && this.entity.level().addFreshEntity(this.entity, reason);
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean isInPowderedSnow() {
|
|
+ return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
|
|
+ }
|
|
// Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
index 90f34d75f99f31f5c98c499df209979a03e23191..1737857424c5da885c46f39502cafd2a670d3be7 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
@@ -51,4 +51,11 @@ public class CraftSkeleton extends CraftAbstractSkeleton implements Skeleton {
|
|
public SkeletonType getSkeletonType() {
|
|
return SkeletonType.NORMAL;
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int inPowderedSnowTime() {
|
|
+ return getHandle().inPowderSnowTime;
|
|
+ }
|
|
+ // Paper end
|
|
}
|