mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
registering items in ore dictionary if they aren't already there that aren't in it by default (hi gregtech), fixes #67
This commit is contained in:
parent
4cefeb24b5
commit
8594a3e2c7
@ -2,7 +2,8 @@ package li.cil.oc
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry
|
||||
import li.cil.oc.common.item
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.item.{Item, ItemStack}
|
||||
import net.minecraftforge.oredict.OreDictionary
|
||||
|
||||
object Items {
|
||||
@ -113,6 +114,8 @@ object Items {
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
registerExclusive("craftingPiston", new ItemStack(Block.pistonBase), new ItemStack(Block.pistonStickyBase))
|
||||
registerExclusive("nuggetGold", new ItemStack(Item.goldNugget))
|
||||
registerExclusive("nuggetIron", ironNugget.createItemStack())
|
||||
register("oc:craftingCircuitBoardRaw", rawCircuitBoard.createItemStack())
|
||||
register("oc:craftingCircuitBoard", circuitBoard.createItemStack())
|
||||
@ -150,9 +153,11 @@ object Items {
|
||||
}
|
||||
}
|
||||
|
||||
def registerExclusive(name: String, item: ItemStack) {
|
||||
def registerExclusive(name: String, items: ItemStack*) {
|
||||
if (OreDictionary.getOres(name).isEmpty) {
|
||||
for (item <- items) {
|
||||
OreDictionary.registerOre(name, item)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user