This repository has been archived by the owner on Mar 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solid fuels (Nether Coal, Nether Coal Block) AE Integration Mekanism Integration Cleaned up a bit of stuff. Added pack.mcmeta to get it to stop complaining about it. Still need more integration points, only works with UE builds right now :P Works with vanilla as well, surround charcoal with nether rack.
- Loading branch information
Showing
18 changed files
with
279 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#Wed, 10 Jul 2013 19:02:52 -0700 | ||
#Mon, 16 Sep 2013 17:10:08 -0700 | ||
release.minecraft.version=1.6.2 | ||
release.number=14 | ||
release.number=17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,41 @@ | ||
package burptech.block; | ||
|
||
import cpw.mods.fml.common.registry.GameRegistry; | ||
import burptech.BurpTechConfig; | ||
import burptech.BurpTechCore; | ||
import burptech.lib.Constants; | ||
import net.minecraft.block.Block; | ||
import net.minecraftforge.common.*; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
|
||
/* | ||
* Block definitions for BurpTech | ||
*/ | ||
public class Blocks | ||
{ | ||
Configuration configuration; | ||
public Block blockIlluminatedCocoaOn; | ||
public Block blockIlluminatedCocoaOff; | ||
public Block blockNetherCoal; | ||
|
||
public Block illuminatedCocoaOn; | ||
public Block illuminatedCocoaOff; | ||
|
||
public Property enableIlluminatedCocoa; | ||
|
||
/* | ||
* Default constructor | ||
*/ | ||
public Blocks(Configuration configuration) | ||
{ | ||
this.configuration = configuration; | ||
} | ||
|
||
public void create() | ||
public void create(BurpTechConfig configuration) | ||
{ | ||
enableIlluminatedCocoa = configuration.get(Constants.CONFIG_CATEGORY_TWEAKS, "IlluminatedCocoaPlants", true); | ||
enableIlluminatedCocoa.comment = "When enabled, allows you to right click a grown cocoa plant with glowstone to turn it into a lamp"; | ||
addIlluminatedCocoa(configuration); | ||
|
||
if (enableIlluminatedCocoa.getBoolean(true)) | ||
{ | ||
BurpTechCore.log.info("Adding Illuminated Cocoa Plants"); | ||
AddIlluminatedCocoa(Constants.BLOCK_START + 0); | ||
} | ||
blockNetherCoal = (new Block(configuration.blockNetherCoal.getInt(), Material.rock)).setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("blockNetherCoal").setCreativeTab(CreativeTabs.tabMaterials).setTextureName(Constants.MOD_ID + ":" + "nether_coal_block"); | ||
GameRegistry.registerBlock(blockNetherCoal, "blockNetherCoal"); | ||
} | ||
|
||
private void AddIlluminatedCocoa(int defaultBlockID) | ||
private void addIlluminatedCocoa(BurpTechConfig configuration) | ||
{ | ||
Property illuminatedCocoaOnBlockId = configuration.getBlock("IlluminatedCocoa", defaultBlockID, "The ID for the Illuminated Cocoa Plants. (Replaces default BlockCocoa)"); | ||
if (!configuration.enableIlluminatedCocoa.getBoolean(true)) | ||
return; | ||
|
||
int illuminatedCocoaPlantID = configuration.blockIlluminatedCocoa.getInt(); | ||
|
||
int illuminatedCocoaPlantID = illuminatedCocoaOnBlockId.getInt(); | ||
if (illuminatedCocoaPlantID != 0) | ||
{ | ||
illuminatedCocoaOn = new BlockIlluminatedCocoa(illuminatedCocoaPlantID, true).setHardness(0.2F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("cocoa").setTextureName("cocoa"); | ||
int cocoaPlantID = Block.cocoaPlant.blockID; | ||
Block.blocksList[cocoaPlantID] = null; | ||
illuminatedCocoaOff = new BlockIlluminatedCocoa(cocoaPlantID, false).setHardness(0.2F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("cocoa").setTextureName("cocoa"); | ||
} | ||
BurpTechCore.log.info("Enabling Illuminated Cocoa Blocks"); | ||
blockIlluminatedCocoaOn = new BlockIlluminatedCocoa(illuminatedCocoaPlantID, true).setHardness(0.2F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("cocoa").setTextureName("cocoa"); | ||
int cocoaPlantID = Block.cocoaPlant.blockID; | ||
Block.blocksList[cocoaPlantID] = null; | ||
blockIlluminatedCocoaOff = new BlockIlluminatedCocoa(cocoaPlantID, false).setHardness(0.2F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("cocoa").setTextureName("cocoa"); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/common/burptech/integration/AppliedEnergisticsIntegration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package burptech.integration; | ||
|
||
import cpw.mods.fml.common.Loader; | ||
import cpw.mods.fml.common.event.FMLInterModComms; | ||
import net.minecraft.item.*; | ||
|
||
public class AppliedEnergisticsIntegration | ||
{ | ||
public static boolean addGrinderRecipe(ItemStack input, ItemStack output) | ||
{ | ||
if (Loader.isModLoaded("AppliedEnergistics")) | ||
{ | ||
// this is a fire and forget, need to verify that it actually works somehow | ||
return FMLInterModComms.sendMessage("AppliedEnergistics", "add-grindable", input.itemID + "," + input.getItemDamage() + "," + output.itemID + "," + output.getItemDamage() + ",8"); | ||
} | ||
|
||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package burptech.integration; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public class GregTechIntegration | ||
{ | ||
public static boolean addGrinderRecipe(ItemStack input, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4) | ||
{ | ||
return false; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/common/burptech/integration/IndustrialcraftIntegration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package burptech.integration; | ||
|
||
import net.minecraft.item.*; | ||
|
||
public class IndustrialcraftIntegration | ||
{ | ||
public static boolean addMaceratorRecipe(ItemStack input, ItemStack output) | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package burptech.integration; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public class Integration | ||
{ | ||
/* | ||
* Adds a basic crushable item to mods that we integrate with. Returns true if any of them worked | ||
*/ | ||
public static boolean addCrushableItem(ItemStack input, ItemStack output) | ||
{ | ||
boolean isAddedToMod = false; | ||
|
||
isAddedToMod = isAddedToMod | AppliedEnergisticsIntegration.addGrinderRecipe(input, output); | ||
isAddedToMod = isAddedToMod | GregTechIntegration.addGrinderRecipe(input, output, null, null, null); | ||
isAddedToMod = isAddedToMod | IndustrialcraftIntegration.addMaceratorRecipe(input, output); | ||
isAddedToMod = isAddedToMod | MekanismIntegration.addCrusherRecipe(input, output); | ||
isAddedToMod = isAddedToMod | RailcraftIntegration.addRockCrusherRecipe(input, output, null, 0); | ||
isAddedToMod = isAddedToMod | ThermalExpansionIntegration.addPulverizerRecipe(input, output, null, 0); | ||
|
||
return isAddedToMod; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package burptech.integration; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
import burptech.BurpTechCore; | ||
import cpw.mods.fml.common.Loader; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class MekanismIntegration | ||
{ | ||
public static boolean addCrusherRecipe(ItemStack input, ItemStack output) | ||
{ | ||
if (!Loader.isModLoaded("Mekanism")) | ||
return false; | ||
|
||
try { | ||
Class<?> recipeClass = Class.forName("mekanism.common.RecipeHandler"); | ||
Method m = recipeClass.getMethod("addCrusherRecipe", ItemStack.class, ItemStack.class); | ||
m.invoke(null, input, output); | ||
|
||
return true; | ||
} catch(Exception e) { | ||
BurpTechCore.log.info("Error while adding Crusher Recipe to Mekanism: " + e.getMessage()); | ||
} | ||
|
||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package burptech.integration; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public class RailcraftIntegration | ||
{ | ||
public static boolean addRockCrusherRecipe(ItemStack input, ItemStack output, ItemStack bonus, float bonusChance) | ||
{ | ||
return false; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/common/burptech/integration/ThermalExpansionIntegration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package burptech.integration; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public class ThermalExpansionIntegration | ||
{ | ||
public static boolean addPulverizerRecipe(ItemStack input, ItemStack output, ItemStack bonus, float bonusChance) | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,42 @@ | ||
package burptech.item; | ||
|
||
import burptech.lib.Constants; | ||
import burptech.*; | ||
import burptech.lib.*; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemFood; | ||
import net.minecraftforge.common.*; | ||
|
||
import net.minecraft.item.*; | ||
import net.minecraftforge.oredict.OreDictionary; | ||
|
||
/* | ||
* Item definitions for BurpTech | ||
*/ | ||
public class Items | ||
{ | ||
Configuration configuration; | ||
|
||
public Item portableWorkbench; | ||
public Item rucksack; | ||
public Item enderRucksack; | ||
|
||
public Item cookedEgg; | ||
|
||
/* | ||
* Default constructor | ||
*/ | ||
public Items(Configuration configuration) | ||
{ | ||
this.configuration = configuration; | ||
} | ||
|
||
public Item netherDust; | ||
public Item netherCoal; | ||
|
||
/* | ||
* Creates all of the item instances | ||
*/ | ||
public void create() | ||
public void create(BurpTechConfig configuration) | ||
{ | ||
enderRucksack = new ItemRucksack(configuration.getItem("EnderRucksack", burptech.lib.Constants.ITEM_START + 0).getInt(), true).setUnlocalizedName("enderRucksack").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabTools); | ||
rucksack = new ItemRucksack(configuration.getItem("Rucksack", burptech.lib.Constants.ITEM_START + 1).getInt(), false).setUnlocalizedName("rucksack").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabTools); | ||
portableWorkbench = new ItemPortableWorkbench(configuration.getItem("PortableWorkbench", burptech.lib.Constants.ITEM_START + 2).getInt()).setUnlocalizedName("portableWorkbench").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabTools);; | ||
enderRucksack = new ItemRucksack(configuration.itemEnderRucksack.getInt(), true).setUnlocalizedName("enderRucksack").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabTools); | ||
rucksack = new ItemRucksack(configuration.itemRucksack.getInt(), false).setUnlocalizedName("rucksack").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabTools); | ||
portableWorkbench = new ItemPortableWorkbench(configuration.itemPortableWorkbench.getInt()).setUnlocalizedName("portableWorkbench").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabTools);; | ||
|
||
cookedEgg = new ItemFood(configuration.itemCookedEgg.getInt(), 2, .1F, false).setUnlocalizedName("cookedEgg").setTextureName(Constants.MOD_ID + ":" + "egg_cooked").setMaxStackSize(16); | ||
|
||
netherDust = new Item(configuration.itemNetherDust.getInt()).setUnlocalizedName("netherDust").setCreativeTab(CreativeTabs.tabMaterials).setTextureName(Constants.MOD_ID + ":" + "nether_dust"); | ||
// ore dictionary (pulled from: http://minecraftmodcustomstuff.wikia.com/wiki/Ore_Dictionary - more here: http://www.minecraftforge.net/wiki/Common_Oredict_names) | ||
OreDictionary.registerOre("dustNetherrack", netherDust); | ||
OreDictionary.registerOre("itemDustNetherrack", netherDust); | ||
|
||
cookedEgg = new ItemFood(configuration.getItem("CookedEgg", burptech.lib.Constants.ITEM_START + 3).getInt(), 2, .1F, false).setUnlocalizedName("cookedEgg").setTextureName(Constants.MOD_ID + ":" + "egg_cooked").setMaxStackSize(16); | ||
netherCoal = new Item(configuration.itemNetherCoal.getInt()).setUnlocalizedName("netherCoal").setCreativeTab(CreativeTabs.tabMaterials).setTextureName(Constants.MOD_ID + ":" + "nether_coal"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package burptech.item; | ||
|
||
import burptech.BurpTechCore; | ||
import net.minecraft.item.ItemStack; | ||
import cpw.mods.fml.common.IFuelHandler; | ||
|
||
/** | ||
* Solid Fuel NetherTech Fuel Handler | ||
* | ||
*/ | ||
public class NetherTechSolidFuelHandler implements IFuelHandler | ||
{ | ||
@Override | ||
public int getBurnTime(ItemStack fuel) | ||
{ | ||
if (fuel == null) | ||
return 0; | ||
|
||
if (fuel.itemID == BurpTechCore.configuration.items.netherCoal.itemID) | ||
return 1600 * 2; // coal * 2 | ||
|
||
if (fuel.itemID == BurpTechCore.configuration.blocks.blockNetherCoal.blockID) | ||
return (1600 * 2) * 9; // (coal * 2) * 9 | ||
|
||
return 0; | ||
} | ||
} |
Oops, something went wrong.