Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 11:30:06 +01:00
7ce690f49e
Upstream has released updates that appears 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: e16de3bb SPIGOT-5906: Huge Fungi tree generation CraftBukkit Changes:a13b8cfc7
SPIGOT-5907: Item Frame NBT data disappears5a6c52983
SPIGOT-5906: Huge Fungi tree generation
53 Zeilen
2.2 KiB
Diff
53 Zeilen
2.2 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
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
index 8a79302b9cc178bfe4e0909293e3a87c01d344ca..e0ecdb8f87ec82b97a056c8f6d91d6a86f37bd34 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
@@ -1504,6 +1504,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
|
|
}
|
|
|
|
+ public boolean isInDaylight() { return this.eH(); } // Paper - OBFHELPER
|
|
protected boolean eH() {
|
|
if (this.world.isDay() && !this.world.isClientSide) {
|
|
float f = this.aO();
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 2cc284b81d8ee17e19342a6cd849ff018c031a92..f5660806b8162cd8c3a1072601f6d3a99d526cc4 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -872,6 +872,13 @@ public class CraftWorld implements World {
|
|
}
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean isDayTime() {
|
|
+ return getHandle().isDay();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public boolean createExplosion(double x, double y, double z, float power) {
|
|
return createExplosion(x, y, z, power, false, true);
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
index c89bc7024b650c3b6d2c551f0e4e156975570cca..eaad222fd38a4db4074db04c931bcff7a9ca5e24 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
@@ -78,4 +78,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
|
public long getSeed() {
|
|
return getHandle().lootTableSeed;
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean isInDaylight() {
|
|
+ return getHandle().isInDaylight();
|
|
+ }
|
|
+ // Paper end
|
|
}
|