more work on gateways, plus tried to add a pack.
Gateway is generating, finally, but it has some... issues. Inquire within. Just generate a new world, and use an unstable door to warp to the first that gens.
This commit is contained in:
@@ -155,7 +155,9 @@ public class Schematic {
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
throw new InvalidSchematicException("The schematic could not be decoded.");
|
||||
|
||||
}
|
||||
|
||||
//load size of schematic to generate
|
||||
@@ -377,7 +379,10 @@ public class Schematic {
|
||||
for (dx = 0; dx < width; dx++)
|
||||
{
|
||||
//In the future, we might want to make this more efficient by building whole chunks at a time
|
||||
setBlockDirectly(world, x + dx, y + dy, z + dz, blocks[index], metadata[index]);
|
||||
if(blocks[index]!=0)
|
||||
{
|
||||
setBlockDirectly(world, x + dx, y + dy, z + dz, blocks[index], metadata[index]);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import StevenDimDoors.mod_pocketDim.schematic.InvalidSchematicException;
|
||||
import StevenDimDoors.mod_pocketDim.schematic.Schematic;
|
||||
import StevenDimDoors.mod_pocketDim.schematic.SchematicFilter;
|
||||
import StevenDimDoors.mod_pocketDim.world.PocketBuilder;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
@@ -44,6 +45,16 @@ public abstract class BaseGateway
|
||||
*/
|
||||
public boolean generate(World world, int x, int y, int z)
|
||||
{
|
||||
/**
|
||||
* We have two cases here. The gateway may or may not specify a schematic to load from. If it does, we need to line up the door in the schematic with the given rift.
|
||||
* I tried doing this by taking the difference between the selected coords for the door, and the position of the door relative to the bounds of the .schematic,
|
||||
* but it doesnt work. It seems like it should, though. Odd.
|
||||
*
|
||||
* The other issue is with the .schematic itself. It looks like we are exporting quite a few air blocks with the real blocks.
|
||||
* This may be a limitation of our export function, as it wasnt really meant for this. I added a line in the generate function to skip air blocks completely.
|
||||
* Should also speed up generation time.
|
||||
*
|
||||
*/
|
||||
Point3D doorLocation= new Point3D(0,0,0);
|
||||
int orientation = 0;
|
||||
try
|
||||
@@ -56,6 +67,12 @@ public abstract class BaseGateway
|
||||
orientation = filter.getEntranceOrientation();
|
||||
schematic.copyToWorld(world, x-doorLocation.getX(), y-doorLocation.getY(), z-doorLocation.getZ());
|
||||
|
||||
for(int c = 0; c<240; c++)
|
||||
{
|
||||
world.setBlock(x-doorLocation.getX(), y-doorLocation.getY()+c, z-doorLocation.getZ(),Block.glowStone.blockID);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user