Minor Fixes
Cleaned up obsolete code in PocketProvider and fixed the assignment of hasNoSky so that it actually applies. Also overloaded getActualHeight() so that we return 256 despite hasNoSky = true - the default MC behavior is that we would return 128 in that case. Also undid a previous change to EventHookContainer - players that die in pockets will respawn in Limbo, again.
This commit is contained in:
@@ -10,11 +10,11 @@ import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import StevenDimDoors.mod_pocketDim.core.DDTeleporter;
|
||||
import StevenDimDoors.mod_pocketDim.core.NewDimData;
|
||||
import StevenDimDoors.mod_pocketDim.core.PocketManager;
|
||||
import StevenDimDoors.mod_pocketDim.ticking.RiftRegenerator;
|
||||
import StevenDimDoors.mod_pocketDim.util.Point4D;
|
||||
import StevenDimDoors.mod_pocketDim.world.LimboProvider;
|
||||
import StevenDimDoors.mod_pocketDim.world.PocketProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -70,10 +70,8 @@ public class EventHookContainer
|
||||
{
|
||||
Entity entity = event.entity;
|
||||
|
||||
if (entity instanceof EntityPlayer && properties.LimboEnabled)
|
||||
{
|
||||
NewDimData dimension = PocketManager.getDimensionData(entity.worldObj);
|
||||
if (dimension.isDungeon())
|
||||
if (entity instanceof EntityPlayer && properties.LimboEnabled &&
|
||||
entity.worldObj.provider instanceof PocketProvider)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (!properties.LimboReturnsInventoryEnabled)
|
||||
@@ -87,7 +85,6 @@ public class EventHookContainer
|
||||
event.setCanceled(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,14 +17,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PocketProvider extends WorldProvider
|
||||
{
|
||||
public int exitXCoord;
|
||||
public int exitYCoord;
|
||||
public int exitZCoord;
|
||||
public int exitDimID;
|
||||
public boolean hasNoSky = true;
|
||||
|
||||
public boolean isSavingSchematic= false;
|
||||
public int dimToSave;
|
||||
private DDProperties properties;
|
||||
private MonolithSpawner spawner;
|
||||
|
||||
@@ -39,7 +31,6 @@ public class PocketProvider extends WorldProvider
|
||||
protected void registerWorldChunkManager()
|
||||
{
|
||||
super.worldChunkMgr = new WorldChunkManagerHell(mod_pocketDim.pocketBiome, 1, 1);
|
||||
//this.dimensionId = ConfigAtum.dimensionID;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,28 +39,18 @@ public class PocketProvider extends WorldProvider
|
||||
return (dimensionId == 0 ? null : "DimensionalDoors/pocketDimID" + dimensionId);
|
||||
}
|
||||
|
||||
public void saveAsSchematic(int id)
|
||||
{
|
||||
this.isSavingSchematic=true;
|
||||
this.dimensionId=id;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getSkyColor(Entity cameraEntity, float partialTicks)
|
||||
{
|
||||
setCloudRenderer( new CloudRenderBlank());
|
||||
return this.worldObj.getWorldVec3Pool().getVecFromPool((double)0, (double)0, (double)0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public Vec3 getFogColor(float par1, float par2)
|
||||
{
|
||||
return this.worldObj.getWorldVec3Pool().getVecFromPool((double)0, (double)0, (double)0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,6 +71,7 @@ public class PocketProvider extends WorldProvider
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockFreeze(int x, int y, int z, boolean byWater)
|
||||
{
|
||||
return false;
|
||||
@@ -104,6 +86,7 @@ public class PocketProvider extends WorldProvider
|
||||
return "PocketDim " + this.dimensionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRespawnDimension(EntityPlayerMP player)
|
||||
{
|
||||
int respawnDim;
|
||||
@@ -124,8 +107,15 @@ public class PocketProvider extends WorldProvider
|
||||
return respawnDim;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRespawnHere()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getActualHeight()
|
||||
{
|
||||
return 256;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user