diff options
author | Nassim Jahnke <[email protected]> | 2024-12-03 17:58:41 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-03 17:58:41 +0100 |
commit | c0a3d51ab35930e410fcd9752ceaff6c3f581c24 (patch) | |
tree | f53076a8b0787d2f544f73f468df94619e5eb1a5 /patches/unapplied/server/0251-Add-sun-related-API.patch | |
parent | da7138233f6392e791d790d1c3407414c855f9c2 (diff) | |
download | Paper-c0a3d51ab35930e410fcd9752ceaff6c3f581c24.tar.gz Paper-c0a3d51ab35930e410fcd9752ceaff6c3f581c24.zip |
Start update, apply API patches
Diffstat (limited to 'patches/unapplied/server/0251-Add-sun-related-API.patch')
-rw-r--r-- | patches/unapplied/server/0251-Add-sun-related-API.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/unapplied/server/0251-Add-sun-related-API.patch b/patches/unapplied/server/0251-Add-sun-related-API.patch new file mode 100644 index 0000000000..280661a416 --- /dev/null +++ b/patches/unapplied/server/0251-Add-sun-related-API.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath <[email protected]> +Date: Sun, 7 Oct 2018 00:54:21 -0500 +Subject: [PATCH] Add sun related API + +== AT == +public net.minecraft.world.entity.Mob isSunBurnTick()Z + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index 269853764c75382e921e0846c4dc3001bac0395c..74b65238eb4fe53d361ab70447c1be385b5a3951 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -755,6 +755,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { + } + } + ++ // Paper start ++ @Override ++ public boolean isDayTime() { ++ return getHandle().isDay(); ++ } ++ // Paper end ++ + @Override + public long getGameTime() { + return this.world.levelData.getGameTime(); +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +index 26c9bc53fe50636ca1eb32144c648f382d4172ff..c67673772c876dab7c015dcdfb75b297d3c4fbad 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +@@ -91,4 +91,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { + public long getSeed() { + return this.getHandle().lootTableSeed; + } ++ ++ // Paper start ++ @Override ++ public boolean isInDaylight() { ++ return getHandle().isSunBurnTick(); ++ } ++ // Paper end + } |