Add sun related API

== AT ==
public net.minecraft.world.entity.Mob isSunBurnTick()Z
This commit is contained in:
BillyGalbreath 2018-10-07 00:54:21 -05:00
parent 5a43ef8127
commit a75d433b3e
2 changed files with 14 additions and 0 deletions

View file

@ -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();

View file

@ -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
}