RemovedRecipeLoaderFromBlocks
This commit is contained in:
parent
bc18a27763
commit
04ba24f07a
9 changed files with 17 additions and 56 deletions
|
@ -8,6 +8,8 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
import dark.api.ProcessorRecipes;
|
||||
import dark.api.ProcessorRecipes.ProcessorType;
|
||||
import dark.core.common.blocks.BlockBasalt;
|
||||
import dark.core.common.blocks.BlockOre;
|
||||
import dark.core.common.blocks.BlockOre.OreData;
|
||||
import dark.core.common.items.EnumMaterial;
|
||||
import dark.core.common.items.EnumOrePart;
|
||||
import dark.core.common.items.ItemOreDirv;
|
||||
|
@ -143,6 +145,18 @@ public class CoreRecipeLoader extends RecipeLoader
|
|||
}
|
||||
}
|
||||
|
||||
if(blockOre instanceof BlockOre)
|
||||
{
|
||||
for (OreData data : OreData.values())
|
||||
{
|
||||
if (CoreRecipeLoader.itemMetals instanceof ItemOreDirv)
|
||||
{
|
||||
FurnaceRecipes.smelting().addSmelting(blockOre.blockID, data.ordinal(), EnumMaterial.getStack(data.mat, EnumOrePart.INGOTS, 1), 0.6f);
|
||||
ProcessorRecipes.createRecipe(ProcessorType.CRUSHER, new ItemStack(blockOre.blockID, 1, data.ordinal()), EnumMaterial.getStack(data.mat, EnumOrePart.RUBBLE, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void loadStainGlass()
|
||||
|
|
|
@ -73,20 +73,6 @@ public class BlockOre extends Block implements IExtraObjectInfo
|
|||
return Block.stone.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
for (OreData data : OreData.values())
|
||||
{
|
||||
if (CoreRecipeLoader.itemMetals instanceof ItemOreDirv)
|
||||
{
|
||||
ItemStack oreStack = new ItemStack(this.blockID, 1, data.ordinal());
|
||||
FurnaceRecipes.smelting().addSmelting(this.blockID, data.ordinal(), EnumMaterial.getStack(data.mat, EnumOrePart.INGOTS, 1), 0.6f);
|
||||
ProcessorRecipes.createRecipe(ProcessorType.CRUSHER, oreStack, EnumMaterial.getStack(data.mat, EnumOrePart.RUBBLE, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTileEntities(int blockID, Set<Pair<String, Class<? extends TileEntity>>> list)
|
||||
{
|
||||
|
|
|
@ -129,13 +129,6 @@ public class BlockDebug extends BlockMachine implements IExtraObjectInfo
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadOreNames()
|
||||
{
|
||||
|
|
|
@ -106,13 +106,6 @@ public class BlockBasicMachine extends BlockMachine implements IExtraObjectInfo
|
|||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadOreNames()
|
||||
{
|
||||
|
|
|
@ -72,13 +72,6 @@ public class BlockSolarPanel extends BlockMachine implements IExtraObjectInfo
|
|||
wattStorm = (float) (config.get("settings", "WattStorm", 6).getDouble(6) / 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadOreNames()
|
||||
{
|
||||
|
|
|
@ -224,13 +224,6 @@ public class BlockWire extends BlockMachine implements IExtraObjectInfo
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTileEntities(int blockID, Set<Pair<String, Class<? extends TileEntity>>> list)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import dark.core.prefab.helpers.Pair;
|
|||
|
||||
/** Used to handle info about the block that would normally be handled by the mod main class. Use the
|
||||
* BlockRegistry in order for these methods to be called on load of the mod.
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IExtraObjectInfo
|
||||
{
|
||||
|
@ -25,9 +25,6 @@ public interface IExtraObjectInfo
|
|||
* graphics, or crafting cost */
|
||||
public void loadExtraConfigs(Configuration config);
|
||||
|
||||
/** Optional way to handle recipes based out of the block/item class */
|
||||
public void loadRecipes();
|
||||
|
||||
/** Loads the names used to reference this item in a recipe */
|
||||
public void loadOreNames();
|
||||
|
||||
|
|
|
@ -160,13 +160,6 @@ public class BlockMulti extends BlockContainer implements IExtraObjectInfo
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRecipes()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadOreNames()
|
||||
{
|
||||
|
|
|
@ -62,8 +62,8 @@ public class ModObjectRegistry
|
|||
}
|
||||
if (block != null)
|
||||
{
|
||||
ModObjectRegistry.finishCreation(block, null);
|
||||
ModObjectRegistry.registerBlock(block, itemClass, name, modID);
|
||||
ModObjectRegistry.finishCreation(block, null);
|
||||
}
|
||||
}
|
||||
return block;
|
||||
|
@ -109,8 +109,8 @@ public class ModObjectRegistry
|
|||
}
|
||||
|
||||
}
|
||||
ModObjectRegistry.finishCreation(block, buildData);
|
||||
ModObjectRegistry.registerBlock(block, buildData.itemBlock, buildData.blockName, modID);
|
||||
ModObjectRegistry.finishCreation(block, buildData);
|
||||
}
|
||||
}
|
||||
catch (Exception x)
|
||||
|
@ -207,7 +207,6 @@ public class ModObjectRegistry
|
|||
extraBlockConfig.save();
|
||||
}
|
||||
((IExtraObjectInfo) block).loadOreNames();
|
||||
((IExtraObjectInfo) block).loadRecipes();
|
||||
Set<Pair<String, Class<? extends TileEntity>>> tileListNew = new HashSet<Pair<String, Class<? extends TileEntity>>>();
|
||||
((IExtraObjectInfo) block).getTileEntities(block.blockID, tileListNew);
|
||||
for (Pair<String, Class<? extends TileEntity>> par : tileListNew)
|
||||
|
|
Loading…
Reference in a new issue