Fixed bed causing explosion in space
Fixed bed spawn transfer between dimensions Nota: some plugins may interfer with it
This commit is contained in:
parent
f1a1906d4b
commit
e60aa219bb
2 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class SpaceWorldProvider extends WorldProvider {
|
|||
|
||||
@Override
|
||||
public boolean canRespawnHere() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
Loading…
Reference in a new issue