In order for “Astrominer” to start recognizing GT6 ore, I made the following changes:
Changes
CompatibilityManager.java
public static void checkForCompatibleMods()
{
if (Loader.isModLoaded("gregtech") || Loader.isModLoaded("GregTech_Addon") || Loader.isModLoaded("GregTech") )
{
CompatibilityManager.modGTLoaded = true;
try {
Class<?> clazz = Class.forName("gregtech.common.blocks.GT_Block_Ores"); //delete
Class<?> clazz = Class.forName("gregapi.block.prefixblock.PrefixBlock"); //add
if (clazz != null)
{
classGTOre = clazz;
}
}
catch (Exception e) { e.printStackTrace(); }
EntityAstroMiner.java - Variation 1:
ItemStack drops = gtFlag ? getGTDrops(x, y, z, b) : getPickBlock(this.worldObj, x, y, z, b); //delete
ItemStack drops = gtFlag ? getGTBlocks(x, y, z, b) : getPickBlock(this.worldObj, x, y, z, b); //add
-//- -//- -//-
// add
private ItemStack getGTBlocks(int x, int y, int z, Block b)
{
int meta = this.worldObj.getBlockMetadata(x, y, z);
if (b.hasTileEntity(meta))
return new ItemStack(b, 1, meta);
return null;
}
EntityAstroMiner.java - Variation 2:
ItemStack drops = gtFlag ? getGTDrops(x, y, z, b) : getPickBlock(this.worldObj, x, y, z, b); //delete
ItemStack drops = getPickBlock(this.worldObj, x, y, z, b); //add
These options work, but information about the ore is lost.