diff options
| author | Lance5057 <Lance5057@gmail.com> | 2016-08-06 21:47:17 -0500 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2016-08-06 21:47:17 -0500 |
| commit | d10fd21692bad49e75a7d665005df940c91942f8 (patch) | |
| tree | fdc1be156df395c88a934f6f97487e78b36a8138 /src/api/java/exterminatorJeff | |
| parent | ff41fd97eb377dd1ebd78b4b56e81c59ca786667 (diff) | |
Launch update
Only a week behind...
Diffstat (limited to 'src/api/java/exterminatorJeff')
| -rw-r--r-- | src/api/java/exterminatorJeff/undergroundBiomes/api/UBAPIHook.java | 9 | ||||
| -rw-r--r-- | src/api/java/exterminatorJeff/undergroundBiomes/api/UBOreTexturizer.java | 110 |
2 files changed, 67 insertions, 52 deletions
diff --git a/src/api/java/exterminatorJeff/undergroundBiomes/api/UBAPIHook.java b/src/api/java/exterminatorJeff/undergroundBiomes/api/UBAPIHook.java index 13279ef..b917269 100644 --- a/src/api/java/exterminatorJeff/undergroundBiomes/api/UBAPIHook.java +++ b/src/api/java/exterminatorJeff/undergroundBiomes/api/UBAPIHook.java @@ -4,8 +4,9 @@ package exterminatorJeff.undergroundBiomes.api; * Striped down version, get the full API from here: https://github.com/Zeno410/UndergroundBiomes1.7API * @author Zeno410 */ -public class UBAPIHook { - public static final UBAPIHook ubAPIHook = new UBAPIHook(); - //public UBDimensionalStrataColumnProvider dimensionalStrataColumnProvider; // set in the main Underground Biomes - public UBOreTexturizer ubOreTexturizer; +public class UBAPIHook +{ + public static final UBAPIHook ubAPIHook = new UBAPIHook(); + //public UBDimensionalStrataColumnProvider dimensionalStrataColumnProvider; // set in the main Underground Biomes + public UBOreTexturizer ubOreTexturizer; } diff --git a/src/api/java/exterminatorJeff/undergroundBiomes/api/UBOreTexturizer.java b/src/api/java/exterminatorJeff/undergroundBiomes/api/UBOreTexturizer.java index 947b156..2b9b6de 100644 --- a/src/api/java/exterminatorJeff/undergroundBiomes/api/UBOreTexturizer.java +++ b/src/api/java/exterminatorJeff/undergroundBiomes/api/UBOreTexturizer.java @@ -5,9 +5,9 @@ package exterminatorJeff.undergroundBiomes.api; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; import net.minecraft.block.Block; import net.minecraft.world.World; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; /** * Striped down version, get the full API from here: https://github.com/Zeno410/UndergroundBiomes1.7API @@ -15,56 +15,70 @@ import net.minecraft.world.World; * It creates three new blocks for each texturized ore. * @author Zeno410 */ -public interface UBOreTexturizer { - // usage: Block is the ore block. - // Overlay name is the fully qualified name, e.g. modname:overlayName - // that static vars are fully qualified names for all the textures in the UB pack, just pass as is - // the event isn't needed per se, but if this is called anytime else, the blocks will not "stick" - public void setupUBOre(Block oreBlock, String overlayName, FMLPreInitializationEvent event); - public void setupUBOre(Block oreBlock, int metadata, String overlayName, FMLPreInitializationEvent event); - public void setupUBOre(Block oreBlock, int metadata, String overlayName, String blockName, FMLPreInitializationEvent event); +public interface UBOreTexturizer +{ + // usage: Block is the ore block. + // Overlay name is the fully qualified name, e.g. modname:overlayName + // that static vars are fully qualified names for all the textures in the UB pack, just pass as is + // the event isn't needed per se, but if this is called anytime else, the blocks will not "stick" + public void setupUBOre(Block oreBlock, String overlayName, FMLPreInitializationEvent event); + + public void setupUBOre(Block oreBlock, int metadata, String overlayName, FMLPreInitializationEvent event); + + public void setupUBOre(Block oreBlock, int metadata, String overlayName, String blockName, FMLPreInitializationEvent event); + + public void requestUBOreSetup(Block oreBlock, String overlayName) throws BlocksAreAlreadySet; + + public void requestUBOreSetup(Block oreBlock, int metadata, String overlayName) throws BlocksAreAlreadySet; + + public void requestUBOreSetup(Block oreBlock, int metadata, String overlayName, String blockName) throws BlocksAreAlreadySet; + + public void redoOres(int xInBlockCoordinates, int zInBlockCoordinates, World serverSideWorld); - public void requestUBOreSetup(Block oreBlock, String overlayName) throws BlocksAreAlreadySet; - public void requestUBOreSetup(Block oreBlock, int metadata, String overlayName) throws BlocksAreAlreadySet; - public void requestUBOreSetup(Block oreBlock, int metadata, String overlayName, String blockName) throws BlocksAreAlreadySet; - public void redoOres(int xInBlockCoordinates, int zInBlockCoordinates, World serverSideWorld) ; + public static String amber_overlay = "undergroundbiomes:amber_overlay"; + public static String cinnabar_overlay = "undergroundbiomes:cinnabar_overlay"; + public static String coal_overlay = "undergroundbiomes:coal_overlay"; + public static String copper_overlay = "undergroundbiomes:copper_overlay"; + public static String diamond_overlay = "undergroundbiomes:diamond_overlay"; + public static String emerald_overlay = "undergroundbiomes:emerald_overlay"; + public static String gold_overlay = "undergroundbiomes:gold_overlay"; + public static String iron_overlay = "undergroundbiomes:iron_overlay"; + public static String lapis_overlay = "undergroundbiomes:lapis_overlay"; + public static String lead_overlay = "undergroundbiomes:lead_overlay"; + public static String olivine_peridot_overlay = "undergroundbiomes:olivine-peridot_overlay"; + public static String redstone_overlay = "undergroundbiomes:redstone_overlay"; + public static String ruby_overlay = "undergroundbiomes:ruby_overlay"; + public static String sapphire_overlay = "undergroundbiomes:sapphire_overlay"; + public static String tin_overlay = "undergroundbiomes:tin_overlay"; + public static String uranium_overlay = "undergroundbiomes:uranium_overlay"; - public static String amber_overlay = "undergroundbiomes:amber_overlay"; - public static String cinnabar_overlay = "undergroundbiomes:cinnabar_overlay"; - public static String coal_overlay = "undergroundbiomes:coal_overlay"; - public static String copper_overlay = "undergroundbiomes:copper_overlay"; - public static String diamond_overlay = "undergroundbiomes:diamond_overlay"; - public static String emerald_overlay = "undergroundbiomes:emerald_overlay"; - public static String gold_overlay = "undergroundbiomes:gold_overlay"; - public static String iron_overlay = "undergroundbiomes:iron_overlay"; - public static String lapis_overlay = "undergroundbiomes:lapis_overlay"; - public static String lead_overlay = "undergroundbiomes:lead_overlay"; - public static String olivine_peridot_overlay = "undergroundbiomes:olivine-peridot_overlay"; - public static String redstone_overlay = "undergroundbiomes:redstone_overlay"; - public static String ruby_overlay = "undergroundbiomes:ruby_overlay"; - public static String sapphire_overlay = "undergroundbiomes:sapphire_overlay"; - public static String tin_overlay = "undergroundbiomes:tin_overlay"; - public static String uranium_overlay = "undergroundbiomes:uranium_overlay"; + public class BlocksAreAlreadySet extends RuntimeException + { + // this is thrown if UB has already run its pre-initialization step and can no longer register blocks + public final Block oreBlock; + public final String overlayName; - public class BlocksAreAlreadySet extends RuntimeException { - // this is thrown if UB has already run its pre-initialization step and can no longer register blocks - public final Block oreBlock; - public final String overlayName; - - public BlocksAreAlreadySet(Block oreBlock, String overlayName) { - this.oreBlock = oreBlock; - this.overlayName = overlayName; - } + public BlocksAreAlreadySet(Block oreBlock, String overlayName) + { + this.oreBlock = oreBlock; + this.overlayName = overlayName; + } - @Override - public String toString() { - String blockDescription = "undefined block"; - String overlayDescription = "undefined overlay"; - if (oreBlock != null) blockDescription = oreBlock.getUnlocalizedName(); - if (overlayName != null) overlayDescription = overlayName; - return "Attempt to create Underground Biomes ore for "+blockDescription+" with "+overlayDescription + - " after blocks have already been defined"; - } + @Override + public String toString() + { + String blockDescription = "undefined block"; + String overlayDescription = "undefined overlay"; + if(oreBlock != null) + { + blockDescription = oreBlock.getUnlocalizedName(); + } + if(overlayName != null) + { + overlayDescription = overlayName; + } + return "Attempt to create Underground Biomes ore for " + blockDescription + " with " + overlayDescription + " after blocks have already been defined"; + } - } + } } |
