geforkt von Mirrors/Paper
4af62f6d1d
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: 2d009e64 Update SnakeYAML javadoc link b4fd213c Switch Player#updateInventory deprecation for internal API annotation CraftBukkit Changes: f3b2b2210 SPIGOT-7376: Exception with getBlockData when hasBlockData is false 725545630 SPIGOT-7375: Fix crash breeding certain entities b9873b0d4 Update Brigadier version with fix 68b320562 SPIGOT-7266: Found typo in CraftBukkit package 98b4d2ff8 SPIGOT-7372, SPIGOT-7373: Signs can't be edited, issues with SignChangeEvent 5f7bd4d78 SPIGOT-7371: Sign does not open edit text on placement b4cf99d24 SPIGOT-7371: Fix editing signs with API a2b6c2744 PR-1200: Implement open sign by side a345bb940 SPIGOT-7368: Downgrade SpecialSource version Spigot Changes: 723951c3 Rebuild patches b655c57d Drop old collision API deprecated since 1.9.4 55b0fed4 Rebuild patches
43 Zeilen
1.6 KiB
Diff
43 Zeilen
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
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 c5209c25602d32003b0681d55f9b2a428e1a8e2e..81a2f407673eba0943bd7c514561d452197ec85f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -687,6 +687,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
}
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean isDayTime() {
|
|
+ return getHandle().isDay();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public long getGameTime() {
|
|
return 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 f36713771598ac5afdae5d94db10a5790949611d..c92f7f31c3bf96f22fb1d2e783b14b80512448a0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
@@ -93,4 +93,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
|
|
}
|