Fixed bed not always usable in space & hyperspace

This commit is contained in:
Unknown 2019-08-24 15:43:47 +02:00 committed by unknown
parent 0a95fefe39
commit 610bc4ddff

View file

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