mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Add sun related API
== AT == public net.minecraft.world.entity.Mob isSunBurnTick()Z
This commit is contained in:
parent
5a43ef8127
commit
a75d433b3e
2 changed files with 14 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue