Revert "Close #441 Add Underground Biomes Constructs integration"

This reverts commit b3b1a6a415.

Conflicts:
	lang
	src/main/java/forestry/Forestry.java
	src/main/java/forestry/plugins/PluginManager.java
This commit is contained in:
mezz committed 2015-03-29 23:44:48 -07:00
1 parent 4bfb2a3662
commit 1ca041a29f
10 files changed
+2 -137

No files matched your search

@@ -1,11 +0,0 @@
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;
}
@@ -1,65 +0,0 @@
package exterminatorJeff.undergroundBiomes.api;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import net.minecraft.block.Block;
import net.minecraft.world.World;
/**
* Striped down version, get the full API from here: https://github.com/Zeno410/UndergroundBiomes1.7API
* This is an interface for the class that can create Underground Biomes versions of arbitary ores
* 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 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 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;
}
@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";
}
}
}
+1 -2
View File
@@ -60,8 +60,7 @@ import forestry.core.utils.StringUtil;
+ "after:Buildcraft|Core@[6.1.7,);"
+ "after:ExtrabiomesXL;"
+ "after:BiomesOPlenty;"
+ "after:IC2@[2.0.140,);"
+ "before:UndergroundBiomes")
+ "after:IC2@[2.0.140,);")
//, certificateFingerprint = Version.FINGERPRINT)
public class Forestry {
-1
View File
@@ -95,7 +95,6 @@ public class PluginManager {
MAGICALCROPS(new PluginMagicalCrops()),
NATURA(new PluginNatura()),
PLANTMEGAPACK(new PluginPlantMegaPack()),
UNDERGROUND_BIOMES(new PluginUndergroundBiomes()),
WITCHERY(new PluginWitchery());
private final ForestryPlugin instance;
@@ -1,52 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.plugins;
import cpw.mods.fml.common.Optional;
import forestry.core.config.Defaults;
import forestry.core.config.ForestryBlock;
import forestry.core.proxy.Proxies;
import exterminatorJeff.undergroundBiomes.api.UBAPIHook;
import exterminatorJeff.undergroundBiomes.api.UBOreTexturizer;
@Plugin(pluginID = "UndergroundBiomes", name = "UndergroundBiomes", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.undergroundBiomes.description")
public class PluginUndergroundBiomes extends ForestryPlugin {
public boolean isAvailable() {
return Proxies.common.isModLoaded("UndergroundBiomes");
}
public String getFailMessage() {
return "UndergroundBiomes is not found.";
}
@Optional.Method(modid = "UndergroundBiomes")
@Override
protected void preInit() {
registerBlock(0, "apatite");
registerBlock(1, "copper");
registerBlock(2, "tin");
}
@Optional.Method(modid = "UndergroundBiomes")
private void registerBlock(int meta, String textureName) {
try {
String blockName = ForestryBlock.resources.getItemStack(1, meta).getUnlocalizedName();
UBAPIHook.ubAPIHook.ubOreTexturizer.requestUBOreSetup(ForestryBlock.resources.block(), meta, "forestry:ores/" + textureName + "_overlay", blockName);
} catch (UBOreTexturizer.BlocksAreAlreadySet exception) {
Proxies.log.severe(exception.toString());
} catch (Throwable throwable) {
Proxies.log.severe("Underground Biomes crashed.");
}
}
}