Temporarily removed the dungeon stuff so that it doesn't crash.
This commit is contained in:
parent
8df391a2b7
commit
5a44ac53e0
|
@ -1,3 +1,8 @@
|
|||
------------------------------------------------------
|
||||
Version 2.0.4-58
|
||||
------------------------------------------------------
|
||||
- Temporarily removed the dungeon stuff so that it doesn't crash.
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.4-57
|
||||
------------------------------------------------------
|
||||
|
|
|
@ -12,11 +12,12 @@ import net.minecraft.util.math.RayTraceResult;
|
|||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||
import WayofTime.bloodmagic.api.iface.IAltarReader;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.entity.mob.EntityMimic;
|
||||
import WayofTime.bloodmagic.structures.DungeonTester;
|
||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.helper.NumeralHelper;
|
||||
|
|
|
@ -17,6 +17,7 @@ import WayofTime.bloodmagic.api.ritual.AreaDescriptor;
|
|||
|
||||
public class DungeonRoom
|
||||
{
|
||||
public int dungeonWeight = 1;
|
||||
public Map<String, BlockPos> structureMap = new HashMap<String, BlockPos>();
|
||||
|
||||
public Map<EnumFacing, List<BlockPos>> doorMap = new HashMap<EnumFacing, List<BlockPos>>(); //Map of doors. The EnumFacing indicates what way this door faces.
|
||||
|
|
|
@ -28,22 +28,27 @@ public class DungeonRoomLoader
|
|||
{
|
||||
for (DungeonRoom room : DungeonRoomRegistry.dungeonWeightMap.keySet())
|
||||
{
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
String json = gson.toJson(room);
|
||||
saveSingleDungeon(room);
|
||||
}
|
||||
}
|
||||
|
||||
Writer writer;
|
||||
try
|
||||
{
|
||||
File file = new File("config/BloodMagic/schematics");
|
||||
file.mkdirs();
|
||||
public static void saveSingleDungeon(DungeonRoom room)
|
||||
{
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
String json = gson.toJson(room);
|
||||
|
||||
writer = new FileWriter("config/BloodMagic/schematics/" + new Random().nextInt() + ".json");
|
||||
writer.write(json);
|
||||
writer.close();
|
||||
} catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
Writer writer;
|
||||
try
|
||||
{
|
||||
File file = new File("config/BloodMagic/schematics");
|
||||
file.mkdirs();
|
||||
|
||||
writer = new FileWriter("config/BloodMagic/schematics/" + new Random().nextInt() + ".json");
|
||||
writer.write(json);
|
||||
writer.close();
|
||||
} catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +70,7 @@ public class DungeonRoomLoader
|
|||
br = new BufferedReader(new FileReader(f));
|
||||
|
||||
DungeonRoom room = gson.fromJson(br, DungeonRoom.class);
|
||||
DungeonRoomRegistry.registerDungeonRoom(room, 1);
|
||||
DungeonRoomRegistry.registerDungeonRoom(room, Math.max(1, room.dungeonWeight));
|
||||
}
|
||||
} catch (FileNotFoundException e)
|
||||
{
|
||||
|
|
|
@ -4,25 +4,25 @@ public class ModDungeons
|
|||
{
|
||||
public static void init()
|
||||
{
|
||||
// ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "Corridor1");
|
||||
// ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "HallChest1");
|
||||
//
|
||||
// Map<String, BlockPos> structureMap = new HashMap<String, BlockPos>();
|
||||
// structureMap.put(resource.toString(), new BlockPos(0, 0, 0));
|
||||
//
|
||||
// Map<EnumFacing, List<BlockPos>> doorMap = new HashMap<EnumFacing, List<BlockPos>>();
|
||||
// List<AreaDescriptor.Rectangle> descriptorList = new ArrayList<AreaDescriptor.Rectangle>();
|
||||
// descriptorList.add(new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 5, 3, 7));
|
||||
// descriptorList.add(new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 12, 5, 9));
|
||||
//
|
||||
// DungeonUtil.addRoom(doorMap, EnumFacing.NORTH, new BlockPos(3, 0, 0));
|
||||
// DungeonUtil.addRoom(doorMap, EnumFacing.SOUTH, new BlockPos(3, 0, 6));
|
||||
// DungeonUtil.addRoom(doorMap, EnumFacing.WEST, new BlockPos(0, 0, 3));
|
||||
// DungeonUtil.addRoom(doorMap, EnumFacing.EAST, new BlockPos(11, 0, 4));
|
||||
// DungeonUtil.addRoom(doorMap, EnumFacing.WEST, new BlockPos(0, 0, 4));
|
||||
//
|
||||
// DungeonRoom room = new DungeonRoom(structureMap, doorMap, descriptorList);
|
||||
// DungeonRoomLoader.saveSingleDungeon(room);
|
||||
//
|
||||
// DungeonRoomRegistry.registerDungeonRoom(room, 1);
|
||||
//
|
||||
// DungeonRoomLoader.saveDungeons();
|
||||
|
||||
DungeonRoomLoader.loadDungeons();
|
||||
// DungeonRoomLoader.loadDungeons();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"dungeonWeight": 4,
|
||||
"structureMap": {
|
||||
"bloodmagic:Corridor1": {
|
||||
"x": 0,
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"structureMap": {
|
||||
"bloodmagic:HallChest1": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
"doorMap": {
|
||||
"west": [
|
||||
{
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 4
|
||||
}
|
||||
],
|
||||
"east": [
|
||||
{
|
||||
"x": 11,
|
||||
"y": 0,
|
||||
"z": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
"descriptorList": [
|
||||
{
|
||||
"minimumOffset": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"maximumOffset": {
|
||||
"x": 12,
|
||||
"y": 5,
|
||||
"z": 9
|
||||
},
|
||||
"blockPosCache": [],
|
||||
"cache": true
|
||||
}
|
||||
]
|
||||
}
|
BIN
src/main/resources/assets/bloodmagic/structures/HallChest1.nbt
Normal file
BIN
src/main/resources/assets/bloodmagic/structures/HallChest1.nbt
Normal file
Binary file not shown.
Loading…
Reference in a new issue