From 610bc4ddff3ca609ad1ef91c6b37db74fa787afa Mon Sep 17 00:00:00 2001 From: Unknown <lemadec.fr@gmail.com> Date: Sat, 24 Aug 2019 15:43:47 +0200 Subject: [PATCH] Fixed bed not always usable in space & hyperspace --- .../cr0s/warpdrive/world/AbstractWorldProvider.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/cr0s/warpdrive/world/AbstractWorldProvider.java b/src/main/java/cr0s/warpdrive/world/AbstractWorldProvider.java index 82775163..aaf18c0d 100644 --- a/src/main/java/cr0s/warpdrive/world/AbstractWorldProvider.java +++ b/src/main/java/cr0s/warpdrive/world/AbstractWorldProvider.java @@ -9,6 +9,7 @@ import cr0s.warpdrive.render.RenderSpaceSky; import javax.annotation.Nonnull; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; @@ -48,6 +49,17 @@ public abstract class AbstractWorldProvider extends WorldProvider { return celestialObjectDimension.id; } + @Override + public boolean isDaytime() { + return true; + } + + @Nonnull + @Override + public WorldSleepResult canSleepAt(final EntityPlayer player, @Nonnull final BlockPos blockPos) { + return WorldSleepResult.ALLOW; + } + @Override public boolean canCoordinateBeSpawn(final int x, final int z) { final BlockPos blockPos = world.getTopSolidOrLiquidBlock(new BlockPos(x, 0, z));