mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 02:12:42 -04:00
unbroke my test world (item creation order, will sort later); formatting
This commit is contained in:
parent
08ed375c55
commit
b4335ad995
@ -10,27 +10,23 @@ object Items {
|
|||||||
var disk: item.Disk = null
|
var disk: item.Disk = null
|
||||||
var gpu1, gpu2, gpu3: item.GraphicsCard = null
|
var gpu1, gpu2, gpu3: item.GraphicsCard = null
|
||||||
var hdd1, hdd2, hdd3: item.HardDiskDrive = null
|
var hdd1, hdd2, hdd3: item.HardDiskDrive = null
|
||||||
var card :item.Card = null
|
|
||||||
var lan: item.NetworkCard = null
|
var lan: item.NetworkCard = null
|
||||||
var psu: item.PowerSupply = null
|
var psu: item.PowerSupply = null
|
||||||
var ram1, ram2, ram3: item.Memory = null
|
var ram1, ram2, ram3: item.Memory = null
|
||||||
var rs: item.RedstoneCard = null
|
var rs: item.RedstoneCard = null
|
||||||
var wlan: item.WirelessNetworkCard = null
|
var wlan: item.WirelessNetworkCard = null
|
||||||
var ironCutter :item.IronCutter = null
|
|
||||||
var platineBody:item.PlatineBody = null
|
|
||||||
var platine : item.Platine = null
|
|
||||||
|
|
||||||
|
var card: item.Card = null
|
||||||
|
var circuitBoardBody: item.PlatineBody = null
|
||||||
|
var circuitBoard: item.Platine = null
|
||||||
|
var ironCutter: item.IronCutter = null
|
||||||
|
|
||||||
def init() {
|
def init() {
|
||||||
multi = new item.Delegator(Config.itemId)
|
multi = new item.Delegator(Config.itemId)
|
||||||
GameRegistry.registerItem(multi, Config.namespace + "item")
|
GameRegistry.registerItem(multi, Config.namespace + "item")
|
||||||
|
|
||||||
analyzer = new item.Analyzer(multi)
|
analyzer = new item.Analyzer(multi)
|
||||||
card = new item.Card(multi)
|
|
||||||
disk = new item.Disk(multi)
|
disk = new item.Disk(multi)
|
||||||
ironCutter = new item.IronCutter(multi)
|
|
||||||
platineBody = new item.PlatineBody(multi)
|
|
||||||
platine = new item.Platine(multi)
|
|
||||||
gpu1 = new item.GraphicsCard(multi, 0)
|
gpu1 = new item.GraphicsCard(multi, 0)
|
||||||
gpu2 = new item.GraphicsCard(multi, 1)
|
gpu2 = new item.GraphicsCard(multi, 1)
|
||||||
gpu3 = new item.GraphicsCard(multi, 2)
|
gpu3 = new item.GraphicsCard(multi, 2)
|
||||||
@ -44,5 +40,10 @@ object Items {
|
|||||||
ram3 = new item.Memory(multi, 2)
|
ram3 = new item.Memory(multi, 2)
|
||||||
rs = new item.RedstoneCard(multi)
|
rs = new item.RedstoneCard(multi)
|
||||||
wlan = new item.WirelessNetworkCard(multi)
|
wlan = new item.WirelessNetworkCard(multi)
|
||||||
|
|
||||||
|
card = new item.Card(multi)
|
||||||
|
circuitBoardBody = new item.PlatineBody(multi)
|
||||||
|
circuitBoard = new item.Platine(multi)
|
||||||
|
ironCutter = new item.IronCutter(multi)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,53 +1,156 @@
|
|||||||
package li.cil.oc
|
package li.cil.oc
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry
|
import cpw.mods.fml.common.registry.GameRegistry
|
||||||
import net.minecraft.item.{Item, ItemStack}
|
|
||||||
import li.cil.oc.common.{block,item}
|
|
||||||
import net.minecraft.block.Block
|
import net.minecraft.block.Block
|
||||||
import net.minecraft.potion.Potion
|
import net.minecraft.item.{Item, ItemStack}
|
||||||
|
|
||||||
object Recipes {
|
object Recipes {
|
||||||
def init() {
|
def init() {
|
||||||
val ironStack = new ItemStack(Item.ingotIron)
|
val ironStack = new ItemStack(Item.ingotIron)
|
||||||
val dirt = new ItemStack(Block.dirt)
|
val dirt = new ItemStack(Block.dirt)
|
||||||
|
|
||||||
GameRegistry.addRecipe(Blocks.adapter.itemStack,"x "," ","xxx",'x':Character,dirt)
|
GameRegistry.addRecipe(Blocks.adapter.createItemStack(),
|
||||||
GameRegistry.addRecipe(Blocks.capacitor.itemStack,"x "," ","xxx",'x':Character,dirt)
|
"x ",
|
||||||
GameRegistry.addRecipe(Blocks.diskDrive.itemStack,"x "," ","xxx",'x':Character,dirt)
|
" ",
|
||||||
GameRegistry.addRecipe(Blocks.powerDistributor.itemStack,"x "," ","xxx",'x':Character,dirt)
|
"xxx", 'x': Character, dirt)
|
||||||
GameRegistry.addRecipe(Blocks.powerSupply.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.screen1.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.screen2.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.screen3.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.router.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.computerCase.itemStack,"xxx","x x","xxx",'x':Character,ironStack)
|
|
||||||
GameRegistry.addRecipe(Blocks.cable.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.keyboard.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Blocks.robotProxy.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.analyzer.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.card.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.disk.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.gpu1.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.gpu2.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.gpu3.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.hdd1.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.hdd2.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.hdd3.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.lan.itemStack,Items.card.itemStack,Blocks.cable.itemStack)
|
|
||||||
GameRegistry.addRecipe(Items.ram1.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.ram2.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addRecipe(Items.ram3.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.rs.itemStack,Items.card.itemStack,new ItemStack(Item.redstone,1))
|
|
||||||
GameRegistry.addRecipe(Items.wlan.itemStack,"x "," ","xxx",'x':Character,dirt)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.ironCutter.itemStack(16),new ItemStack(Item.shears),new ItemStack(Item.ingotIron))
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platineBody.itemStack,Items.ironCutter.itemStack,new ItemStack(Item.clay))
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platine.itemStack,new ItemStack(Item.potion,1,8196),Item.goldNugget,Items.platineBody.itemStack)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platine.itemStack,new ItemStack(Item.potion,1,8228),Item.goldNugget,Items.platineBody.itemStack)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platine.itemStack,new ItemStack(Item.potion,1,8260),Item.goldNugget,Items.platineBody.itemStack)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platine.itemStack,new ItemStack(Item.potion,1,16388),Item.goldNugget,Items.platineBody.itemStack)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platine.itemStack,new ItemStack(Item.potion,1,16420),Item.goldNugget,Items.platineBody.itemStack)
|
|
||||||
GameRegistry.addShapelessRecipe(Items.platine.itemStack,new ItemStack(Item.potion,1,16452),Item.goldNugget,Items.platineBody.itemStack)
|
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.capacitor.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.diskDrive.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.powerDistributor.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.powerSupply.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.screen1.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.screen2.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.screen3.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.router.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.computerCase.createItemStack(),
|
||||||
|
"xxx",
|
||||||
|
"x x",
|
||||||
|
"xxx", 'x': Character, ironStack)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.cable.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.keyboard.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Blocks.robotProxy.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.analyzer.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.card.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.disk.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.gpu1.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.gpu2.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.gpu3.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.hdd1.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.hdd2.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.hdd3.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addShapelessRecipe(Items.lan.createItemStack(), Items.card.createItemStack(), Blocks.cable.createItemStack())
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.ram1.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.ram2.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.ram3.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addShapelessRecipe(Items.rs.createItemStack(), Items.card.createItemStack(), new ItemStack(Item.redstone, 1))
|
||||||
|
|
||||||
|
GameRegistry.addRecipe(Items.wlan.createItemStack(),
|
||||||
|
"x ",
|
||||||
|
" ",
|
||||||
|
"xxx", 'x': Character, dirt)
|
||||||
|
|
||||||
|
GameRegistry.addShapelessRecipe(Items.ironCutter.createItemStack(16), new ItemStack(Item.shears), new ItemStack(Item.ingotIron))
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoardBody.createItemStack(), Items.ironCutter.createItemStack(), new ItemStack(Item.clay))
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoard.createItemStack(), new ItemStack(Item.potion, 1, 8196), Item.goldNugget, Items.circuitBoardBody.createItemStack())
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoard.createItemStack(), new ItemStack(Item.potion, 1, 8228), Item.goldNugget, Items.circuitBoardBody.createItemStack())
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoard.createItemStack(), new ItemStack(Item.potion, 1, 8260), Item.goldNugget, Items.circuitBoardBody.createItemStack())
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoard.createItemStack(), new ItemStack(Item.potion, 1, 16388), Item.goldNugget, Items.circuitBoardBody.createItemStack())
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoard.createItemStack(), new ItemStack(Item.potion, 1, 16420), Item.goldNugget, Items.circuitBoardBody.createItemStack())
|
||||||
|
GameRegistry.addShapelessRecipe(Items.circuitBoard.createItemStack(), new ItemStack(Item.potion, 1, 16452), Item.goldNugget, Items.circuitBoardBody.createItemStack())
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ trait Delegate {
|
|||||||
world.setBlock(x, y, z, parent.blockID, blockId, flags)
|
world.setBlock(x, y, z, parent.blockID, blockId, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
def itemStack = new ItemStack(parent, 1, damageDropped)
|
def createItemStack(amount: Int = 1) = new ItemStack(parent, amount, damageDropped)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------- //
|
// ----------------------------------------------------------------------- //
|
||||||
// Block
|
// Block
|
||||||
|
@ -15,8 +15,7 @@ trait Delegate {
|
|||||||
|
|
||||||
private var _icon: Option[Icon] = None
|
private var _icon: Option[Icon] = None
|
||||||
|
|
||||||
def itemStack = new ItemStack(parent, 1, itemId)
|
def createItemStack(amount: Int = 1) = new ItemStack(parent, amount, itemId)
|
||||||
def itemStack(amount:Int) = new ItemStack(parent,amount,itemId)
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------- //
|
// ----------------------------------------------------------------------- //
|
||||||
// Item
|
// Item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user