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) {
|
if (entity instanceof EntityPlayerMP) {
|
||||||
EntityPlayerMP player = (EntityPlayerMP) entity;
|
EntityPlayerMP player = (EntityPlayerMP) entity;
|
||||||
|
|
||||||
ChunkCoordinates bedLocation = player.getBedLocation(player.worldObj.provider.dimensionId);
|
ChunkCoordinates bedLocation = player.getBedLocation(sourceWorld.provider.dimensionId);
|
||||||
|
|
||||||
if (bedLocation != null
|
if (bedLocation != null
|
||||||
&& ship.minX <= bedLocation.posX && ship.maxX >= bedLocation.posX
|
&& ship.minX <= bedLocation.posX && ship.maxX >= bedLocation.posX
|
||||||
&& ship.minY <= bedLocation.posY && ship.maxY >= bedLocation.posY
|
&& ship.minY <= bedLocation.posY && ship.maxY >= bedLocation.posY
|
||||||
&& ship.minZ <= bedLocation.posZ && ship.maxZ >= bedLocation.posZ) {
|
&& ship.minZ <= bedLocation.posZ && ship.maxZ >= bedLocation.posZ) {
|
||||||
bedLocation = transformation.apply(bedLocation);
|
bedLocation = transformation.apply(bedLocation);
|
||||||
player.setSpawnChunk(bedLocation, false);
|
player.setSpawnChunk(bedLocation, false, targetWorld.provider.dimensionId);
|
||||||
}
|
}
|
||||||
player.setPositionAndUpdate(newEntityX, newEntityY, newEntityZ);
|
player.setPositionAndUpdate(newEntityX, newEntityY, newEntityZ);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class SpaceWorldProvider extends WorldProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRespawnHere() {
|
public boolean canRespawnHere() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
Loading…
Add table
Reference in a new issue