geforkt von Mirrors/Paper
f6969b6374
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: 09b1c123 PR-916: Add more lightning API c085f3de PR-859: Add Entity#getTrackedBy CraftBukkit Changes: 1bf30a4e9 SPIGOT-7495: Spawning bee entity in asynchronous BlockPopulator causes IllegalStateException - Accessing LegacyRandomSource from multiple threads 476c5bccd PR-1267: Add more lightning API 40d5e6c02 PR-1190: Add Entity#getTrackedBy 40d41acc1 SPIGOT-7491: Downgrade bundled SQLite to be updated next release 44b31da38 PR-1264: Load Bukkit class before creating Registry item dc45a6738 SPIGOT-7496: Failure to load datapacks with multiple identical predicates f508657d6 Fix decompile error affecting javac ef7a4743d PR-1265: Ensure UTF-8 used in new test resource Spigot Changes: 224dad51 Rebuild patches
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 3d9ee3a7305b0575387e719ac4062c4a355d63e8..853561c0b3507808c70f4274812407d1ffb37504 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -1397,5 +1397,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 956ddd955e6f9b2f02ef05b0e95150c9c90c3107..16e6325a944c1eb21dd5a3835aa8a00d238e7b5d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
@@ -45,4 +45,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
|
|
}
|