Fixed bed causing explosion in space

Fixed bed spawn transfer between dimensions
Nota: some plugins may interfer with it
This commit is contained in:
LemADEC 2016-08-14 18:34:36 +02:00
parent f1a1906d4b
commit e60aa219bb
2 changed files with 3 additions and 3 deletions

View file

@ -909,14 +909,14 @@ public class JumpSequencer extends AbstractSequencer {
if (entity instanceof EntityPlayerMP) {
EntityPlayerMP player = (EntityPlayerMP) entity;
ChunkCoordinates bedLocation = player.getBedLocation(player.worldObj.provider.dimensionId);
ChunkCoordinates bedLocation = player.getBedLocation(sourceWorld.provider.dimensionId);
if (bedLocation != null
&& ship.minX <= bedLocation.posX && ship.maxX >= bedLocation.posX
&& ship.minY <= bedLocation.posY && ship.maxY >= bedLocation.posY
&& ship.minZ <= bedLocation.posZ && ship.maxZ >= bedLocation.posZ) {
bedLocation = transformation.apply(bedLocation);
player.setSpawnChunk(bedLocation, false);
player.setSpawnChunk(bedLocation, false, targetWorld.provider.dimensionId);
}
player.setPositionAndUpdate(newEntityX, newEntityY, newEntityZ);
} else {

View file

@ -28,7 +28,7 @@ public class SpaceWorldProvider extends WorldProvider {
@Override
public boolean canRespawnHere() {
return false;
return true;
}
@SideOnly(Side.CLIENT)