diff options
author | Jason Penilla <[email protected]> | 2024-04-27 13:27:01 -0700 |
---|---|---|
committer | Jason Penilla <[email protected]> | 2024-04-27 13:27:01 -0700 |
commit | e2552eea2481871c9d8445a3c5653a2329112648 (patch) | |
tree | 727c90f395576b66200f8d9e59f38859f3850562 /patches/server/0259-Add-sun-related-API.patch | |
parent | 0b1b1fe067444c5e879313e017da0ffd5d6b826d (diff) | |
download | Paper-e2552eea2481871c9d8445a3c5653a2329112648.tar.gz Paper-e2552eea2481871c9d8445a3c5653a2329112648.zip |
Start cleaning up plugin remapping patches
Diffstat (limited to 'patches/server/0259-Add-sun-related-API.patch')
-rw-r--r-- | patches/server/0259-Add-sun-related-API.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/server/0259-Add-sun-related-API.patch b/patches/server/0259-Add-sun-related-API.patch new file mode 100644 index 0000000000..6ae32c9602 --- /dev/null +++ b/patches/server/0259-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 932e71656f587678c02766fc8cfb685034368016..cbb7ffab637e640eb2cedfac63c13392147f7e12 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -731,6 +731,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 d597eea5d5c2f223e87bff06f292619657596f1f..2a8596e4f9d7be966c18e867c2c7b5bfbea9742c 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +@@ -90,4 +90,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 + } |