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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
ex.printStackTrace();
|
||||||
throw new InvalidSchematicException("The schematic could not be decoded.");
|
throw new InvalidSchematicException("The schematic could not be decoded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//load size of schematic to generate
|
//load size of schematic to generate
|
||||||
@@ -377,7 +379,10 @@ public class Schematic {
|
|||||||
for (dx = 0; dx < width; dx++)
|
for (dx = 0; dx < width; dx++)
|
||||||
{
|
{
|
||||||
//In the future, we might want to make this more efficient by building whole chunks at a time
|
//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++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import StevenDimDoors.mod_pocketDim.schematic.InvalidSchematicException;
|
|||||||
import StevenDimDoors.mod_pocketDim.schematic.Schematic;
|
import StevenDimDoors.mod_pocketDim.schematic.Schematic;
|
||||||
import StevenDimDoors.mod_pocketDim.schematic.SchematicFilter;
|
import StevenDimDoors.mod_pocketDim.schematic.SchematicFilter;
|
||||||
import StevenDimDoors.mod_pocketDim.world.PocketBuilder;
|
import StevenDimDoors.mod_pocketDim.world.PocketBuilder;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
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)
|
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);
|
Point3D doorLocation= new Point3D(0,0,0);
|
||||||
int orientation = 0;
|
int orientation = 0;
|
||||||
try
|
try
|
||||||
@@ -56,6 +67,12 @@ public abstract class BaseGateway
|
|||||||
orientation = filter.getEntranceOrientation();
|
orientation = filter.getEntranceOrientation();
|
||||||
schematic.copyToWorld(world, x-doorLocation.getX(), y-doorLocation.getY(), z-doorLocation.getZ());
|
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)
|
catch (Exception e)
|
||||||
|
|||||||
6
src/main/resources/schematics/balgor.txt
Normal file
6
src/main/resources/schematics/balgor.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/schematics/balgor/ComplexHall_GardenBalgor1_open_39.schematic
|
||||||
|
/schematics/balgor/ComplexHall_OpenHallBalgor1_Closed_68.schematic
|
||||||
|
/schematics/balgor/ComplexHall_SilverEggHallBalgor1_closed_25.schematic
|
||||||
|
/schematics/balgor/Maze_OmniMazeBalgor1_open_30.schematic
|
||||||
|
/schematics/balgor/Trap_ArrowTrapBalgor1_closed_20.schematic
|
||||||
|
/schematics/balgor/Trap_ZombieHallBalgor1_closed_25.schematic
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
23
src/main/resources/schematics/balgor/rules.txt
Normal file
23
src/main/resources/schematics/balgor/rules.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Version 1
|
||||||
|
Types:
|
||||||
|
Trap
|
||||||
|
ComplexHall
|
||||||
|
Maze
|
||||||
|
|
||||||
|
Settings:
|
||||||
|
AllowDuplicatesInChain = false
|
||||||
|
AllowPackChangeOut = false
|
||||||
|
DistortDoorCoordinates = true
|
||||||
|
|
||||||
|
## Prevent this pack from being selected for transitioning in once we've transitioned out
|
||||||
|
AllowPackChangeIn = true
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
? ? ? ->
|
||||||
|
|
||||||
|
? ? -> Maze#20 ComplexHall#40 Trap#40
|
||||||
|
|
||||||
|
? -> ComplexHall#40 Trap#60
|
||||||
|
|
||||||
|
->ComplexHall#100
|
||||||
Binary file not shown.
@@ -79,3 +79,7 @@
|
|||||||
/schematics/ruins/Trap_SK-TrappedStairsUp_Closed_50.schematic
|
/schematics/ruins/Trap_SK-TrappedStairsUp_Closed_50.schematic
|
||||||
/schematics/ruins/Trap_SK-UTrapRight_Open_50.schematic
|
/schematics/ruins/Trap_SK-UTrapRight_Open_50.schematic
|
||||||
/schematics/ruins/trap_wallFallcomboPistonHall_closed_200.schematic
|
/schematics/ruins/trap_wallFallcomboPistonHall_closed_200.schematic
|
||||||
|
/schematics/ruins/DeadEnd_Floating-Altar_Open_100.schematic
|
||||||
|
|
||||||
|
|
||||||
|
DeadEnd_Floating-Altar_Open
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user