Made respawning in limbo much less nice.
Takes entrance coords and THEN adds the spawnFuzz. Its much closer to how it used to be.
This commit is contained in:
parent
491dc3b615
commit
ca07a38eff
3 changed files with 9 additions and 10 deletions
|
@ -79,7 +79,7 @@ public class EventHookContainer
|
|||
player.inventory.clearInventory(-1, -1);
|
||||
}
|
||||
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(player.worldObj.rand);
|
||||
Point4D destination = new Point4D(coords.posX, coords.posY, coords.posZ, mod_pocketDim.properties.LimboDimensionID);
|
||||
Point4D destination = new Point4D((int) (coords.posX+entity.posX), coords.posY, (int) (coords.posZ+entity.posZ ), mod_pocketDim.properties.LimboDimensionID);
|
||||
DDTeleporter.teleportEntity(player, destination, false);
|
||||
player.setEntityHealth(player.getMaxHealth());
|
||||
event.setCanceled(true);
|
||||
|
|
|
@ -9,10 +9,12 @@ import net.minecraft.entity.monster.IMob;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import StevenDimDoors.mod_pocketDim.DDProperties;
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
import StevenDimDoors.mod_pocketDim.core.DDTeleporter;
|
||||
import StevenDimDoors.mod_pocketDim.util.Point4D;
|
||||
import StevenDimDoors.mod_pocketDim.world.LimboProvider;
|
||||
|
@ -145,14 +147,11 @@ public class MobMonolith extends EntityFlying implements IMob
|
|||
}
|
||||
else if (!this.worldObj.isRemote && !entityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
Point4D destination = new Point4D(
|
||||
(int) this.posX + MathHelper.getRandomIntegerInRange(rand, -250, 250),
|
||||
(int) this.posY + 500,
|
||||
(int) this.posZ + MathHelper.getRandomIntegerInRange(rand, -250, 250),
|
||||
properties.LimboDimensionID);
|
||||
DDTeleporter.teleportEntity(entityPlayer, destination, false);
|
||||
this.aggro = 0;
|
||||
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(entityPlayer.worldObj.rand);
|
||||
Point4D destination = new Point4D((int) (coords.posX+entityPlayer.posX), coords.posY, (int) (coords.posZ+entityPlayer.posZ ), mod_pocketDim.properties.LimboDimensionID);
|
||||
DDTeleporter.teleportEntity(entityPlayer, destination, false);
|
||||
|
||||
this.aggro = 0;
|
||||
entityPlayer.worldObj.playSoundAtEntity(entityPlayer,"mods.DimDoors.sfx.crack",13, 1);
|
||||
}
|
||||
if (!(this.worldObj.provider instanceof LimboProvider || this.worldObj.getClosestPlayerToEntity(this, 5) != null) || this.aggro > 300)
|
||||
|
|
|
@ -170,7 +170,7 @@ public class LimboProvider extends WorldProvider
|
|||
ChunkCoordinates var5 = new ChunkCoordinates(0,0,0);
|
||||
|
||||
|
||||
int spawnFuzz = 10000;
|
||||
int spawnFuzz = 1000;
|
||||
int spawnFuzzHalf = spawnFuzz / 2;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue