it builds?

This commit is contained in:
SD 2022-01-14 14:24:26 +05:30
parent 30c3875848
commit a0d5f46737

View file

@ -132,35 +132,34 @@ public class TemplateUtils {
NbtCompound newTag = new NbtCompound(); NbtCompound newTag = new NbtCompound();
EntranceRiftBlockEntity rift = new EntranceRiftBlockEntity(pos, Schematic.getBlockSample(schematic).getBlockState(pos)); EntranceRiftBlockEntity rift = new EntranceRiftBlockEntity(pos, Schematic.getBlockSample(schematic).getBlockState(pos));
switch (blockEntityTag.getString("placeholder")) { switch (blockEntityTag.getString("placeholder")) {
case "deeper_depth_door": case "deeper_depth_door" -> {
rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES); rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES);
rift.setDestination(DefaultDungeonDestinations.getDeeperDungeonDestination()); rift.setDestination(DefaultDungeonDestinations.getDeeperDungeonDestination());
newTag = rift.writeNbt(newTag); rift.writeNbt(newTag);
break; }
case "less_deep_depth_door": case "less_deep_depth_door" -> {
rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES); rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES);
rift.setDestination(DefaultDungeonDestinations.getShallowerDungeonDestination()); rift.setDestination(DefaultDungeonDestinations.getShallowerDungeonDestination());
newTag = rift.writeNbt(newTag); rift.writeNbt(newTag);
break; }
case "overworld_door": case "overworld_door" -> {
rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES); rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES);
rift.setDestination(DefaultDungeonDestinations.getOverworldDestination()); rift.setDestination(DefaultDungeonDestinations.getOverworldDestination());
newTag = rift.writeNbt(newTag); rift.writeNbt(newTag);
break; }
case "entrance_door": case "entrance_door" -> {
rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES); rift.setProperties(DefaultDungeonDestinations.POCKET_LINK_PROPERTIES);
rift.setDestination(DefaultDungeonDestinations.getTwoWayPocketEntrance()); rift.setDestination(DefaultDungeonDestinations.getTwoWayPocketEntrance());
newTag = rift.writeNbt(newTag); rift.writeNbt(newTag);
break; }
case "gateway_portal": case "gateway_portal" -> {
rift.setProperties(DefaultDungeonDestinations.OVERWORLD_LINK_PROPERTIES); rift.setProperties(DefaultDungeonDestinations.OVERWORLD_LINK_PROPERTIES);
rift.setDestination(DefaultDungeonDestinations.getGateway()); rift.setDestination(DefaultDungeonDestinations.getGateway());
newTag = rift.writeNbt(newTag); rift.writeNbt(newTag);
break; }
default: default -> throw new RuntimeException("Unknown block entity placeholder: " + blockEntityTag.getString("placeholder"));
throw new RuntimeException("Unknown block entity placeholder: " + blockEntityTag.getString("placeholder")); }
}
rift.setWorld(world.toServerWorld()); rift.setWorld(world.toServerWorld());
blockEntities.add(newTag); blockEntities.add(newTag);
} else { } else {