Fixed limbo return, schematic crash
This commit is contained in:
parent
cb9c996861
commit
a2eb4cf524
4 changed files with 27 additions and 17 deletions
|
@ -73,19 +73,19 @@ public class SchematicLoader
|
|||
public void init(LinkData link)
|
||||
{
|
||||
//adding default pocket
|
||||
String filePath="";
|
||||
if(!dimHelper.dimList.containsKey(link.destDimID))
|
||||
String filePath=DungeonHelper.defaultBreak.schematicPath;
|
||||
if(dimHelper.dimList.containsKey(link.destDimID))
|
||||
{
|
||||
|
||||
}
|
||||
else if(dimHelper.dimList.get(link.destDimID).dungeonGenerator==null)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
if(dimHelper.dimList.get(link.destDimID).dungeonGenerator!=null)
|
||||
{
|
||||
filePath = dimHelper.dimList.get(link.destDimID).dungeonGenerator.schematicPath;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.schematic=filePath;
|
||||
|
|
|
@ -2,6 +2,8 @@ package StevenDimDoors.mod_pocketDim.blocks;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.DDProperties;
|
||||
import StevenDimDoors.mod_pocketDim.LinkData;
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
|
@ -13,7 +15,10 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.management.ServerConfigurationManager;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
||||
public class BlockDimWallPerm extends Block
|
||||
{
|
||||
|
@ -62,7 +67,7 @@ public class BlockDimWallPerm extends Block
|
|||
}
|
||||
|
||||
|
||||
if(dimHelper.getWorld(0)!=null&&par5Entity instanceof EntityPlayer)
|
||||
if(dimHelper.getWorld(0)!=null&&par5Entity instanceof EntityPlayerMP)
|
||||
{
|
||||
|
||||
|
||||
|
@ -75,9 +80,12 @@ public class BlockDimWallPerm extends Block
|
|||
|
||||
int y = yCoordHelper.getFirstUncovered(0, x, 63, z);
|
||||
|
||||
EntityPlayer.class.cast(par5Entity).setPositionAndUpdate( x, y, z );
|
||||
//this complicated chunk teleports the player back to the overworld at some random location. Looks funky becaue it has to load the chunk
|
||||
dimHelper.instance.teleportToPocket(par1World, new LinkData(par1World.provider.dimensionId,0,x,y,z,link.locXCoord,link.locYCoord,link.locZCoord,link.isLocPocket,0),
|
||||
EntityPlayer.class.cast(par5Entity));
|
||||
|
||||
FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().transferPlayerToDimension((EntityPlayerMP) par5Entity, 0);
|
||||
//dimHelper.instance.teleportToPocket(par1World, new LinkData(par1World.provider.dimensionId,0,x,y,z,link.locXCoord,link.locYCoord,link.locZCoord,link.isLocPocket,0),
|
||||
// EntityPlayer.class.cast(par5Entity));
|
||||
|
||||
|
||||
EntityPlayer.class.cast(par5Entity).setPositionAndUpdate( x, y, z );
|
||||
|
@ -123,6 +131,8 @@ public class BlockDimWallPerm extends Block
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,8 +83,8 @@ public class DungeonHelper
|
|||
|
||||
public ArrayList metadataNextList = new ArrayList();
|
||||
|
||||
public DungeonGenerator defaultUp = new DungeonGenerator(0, "/schematic/simpleStairsUp.schematic", true);
|
||||
|
||||
public static DungeonGenerator defaultUp = new DungeonGenerator(0, "/schematic/simpleStairsUp.schematic", true);
|
||||
public static DungeonGenerator defaultBreak = new DungeonGenerator(0, "/schematic/somethingBroke.schematic", true);
|
||||
public void registerCustomDungeon(File schematicFile)
|
||||
{
|
||||
try
|
||||
|
|
BIN
schematics/somethingBroke.schematic
Normal file
BIN
schematics/somethingBroke.schematic
Normal file
Binary file not shown.
Loading…
Reference in a new issue