Add library ruins

- Adds two variants of library ruins: surface (generates in forested biomes) and underground (generates everywhere)
- Adds loot table support to bookshelves
- Adds antique atlas markers for library ruins
- Adds bookshelves and lecterns to the wood type template processor
- Makes bookshelves and lecterns rotate correctly in structure templates
- Generalises most of the methods in WorldGenSurfaceStructure to a new superclass WorldGenWizardryStructure
This commit is contained in:
Electroblob77
2020-07-13 16:51:01 +01:00
parent 05d33ec58e
commit fa0875e63b
27 changed files with 937 additions and 370 deletions
@@ -29,6 +29,7 @@ public class WizardryAntiqueAtlasIntegration {
private static final ResourceLocation TOWER_MARKER = new ResourceLocation(Wizardry.MODID, "wizard_tower");
private static final ResourceLocation SHRINE_MARKER = new ResourceLocation(Wizardry.MODID, "shrine");
private static final ResourceLocation OBELISK_MARKER = new ResourceLocation(Wizardry.MODID, "obelisk");
private static final ResourceLocation LIBRARY_MARKER = new ResourceLocation(Wizardry.MODID, "library_ruins");
private static boolean antiqueAtlasLoaded;
@@ -65,6 +66,14 @@ public class WizardryAntiqueAtlasIntegration {
}
}
/** Places a global library ruins marker in all antique atlases at the given coordinates in the given world if
* {@link electroblob.wizardry.Settings#autoLibraryMarkers} is enabled. Server side only! */
public static void markLibrary(World world, int x, int z){
if(enabled() && Wizardry.settings.autoLibraryMarkers){ // TODO: More granular settings for above/below ground
AtlasAPI.getMarkerAPI().putGlobalMarker(world, false, LIBRARY_MARKER.toString(), "integration.antiqueatlas.marker." + LIBRARY_MARKER.toString().replace(':', '.'), x, z);
}
}
/** Registers the marker icons with Antique Atlas. Client side only! */
public static void registerMarkers(){
@@ -73,6 +82,7 @@ public class WizardryAntiqueAtlasIntegration {
AtlasAPI.getMarkerAPI().registerMarker(new MarkerType(TOWER_MARKER, new ResourceLocation(Wizardry.MODID, "textures/integration/antiqueatlas/wizard_tower.png")));
AtlasAPI.getMarkerAPI().registerMarker(new MarkerType(SHRINE_MARKER, new ResourceLocation(Wizardry.MODID, "textures/integration/antiqueatlas/shrine.png")));
AtlasAPI.getMarkerAPI().registerMarker(new MarkerType(OBELISK_MARKER, new ResourceLocation(Wizardry.MODID, "textures/integration/antiqueatlas/obelisk.png")));
AtlasAPI.getMarkerAPI().registerMarker(new MarkerType(LIBRARY_MARKER, new ResourceLocation(Wizardry.MODID, "textures/integration/antiqueatlas/library_ruins.png")));
}
@SubscribeEvent