mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 02:12:42 -04:00
Merge branch 'master' of cil.li:oc
This commit is contained in:
commit
08ed375c55
@ -13,7 +13,7 @@ object Blocks {
|
||||
var adapter: Adapter = null
|
||||
var cable: Cable = null
|
||||
var capacitor: Capacitor = null
|
||||
var computer: Case = null
|
||||
var computerCase: Case = null
|
||||
var diskDrive: DiskDrive = null
|
||||
var keyboard: Keyboard = null
|
||||
var powerDistributor: PowerDistributor = null
|
||||
@ -52,7 +52,7 @@ object Blocks {
|
||||
adapter = new Adapter(blockSimple)
|
||||
cable = new Cable(blockSpecial)
|
||||
capacitor = new Capacitor(blockSimple)
|
||||
computer = new Case(blockSimpleWithRedstone)
|
||||
computerCase = new Case(blockSimpleWithRedstone)
|
||||
diskDrive = new DiskDrive(blockSimple)
|
||||
keyboard = new Keyboard(blockSpecial)
|
||||
powerDistributor = new PowerDistributor(blockSimple)
|
||||
|
@ -10,18 +10,27 @@ object Items {
|
||||
var disk: item.Disk = null
|
||||
var gpu1, gpu2, gpu3: item.GraphicsCard = null
|
||||
var hdd1, hdd2, hdd3: item.HardDiskDrive = null
|
||||
var card :item.Card = null
|
||||
var lan: item.NetworkCard = null
|
||||
var psu: item.PowerSupply = null
|
||||
var ram1, ram2, ram3: item.Memory = null
|
||||
var rs: item.RedstoneCard = null
|
||||
var wlan: item.WirelessNetworkCard = null
|
||||
var ironCutter :item.IronCutter = null
|
||||
var platineBody:item.PlatineBody = null
|
||||
var platine : item.Platine = null
|
||||
|
||||
|
||||
def init() {
|
||||
multi = new item.Delegator(Config.itemId)
|
||||
GameRegistry.registerItem(multi, Config.namespace + "item")
|
||||
|
||||
analyzer = new item.Analyzer(multi)
|
||||
card = new item.Card(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)
|
||||
gpu2 = new item.GraphicsCard(multi, 1)
|
||||
gpu3 = new item.GraphicsCard(multi, 2)
|
||||
|
53
li/cil/oc/Recipes.scala
Normal file
53
li/cil/oc/Recipes.scala
Normal file
@ -0,0 +1,53 @@
|
||||
package li.cil.oc
|
||||
|
||||
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.potion.Potion
|
||||
|
||||
object Recipes {
|
||||
def init(){
|
||||
val ironStack = new ItemStack(Item.ingotIron)
|
||||
val dirt = new ItemStack(Block.dirt)
|
||||
|
||||
GameRegistry.addRecipe(Blocks.adapter.itemStack,"x "," ","xxx",'x':Character,dirt)
|
||||
GameRegistry.addRecipe(Blocks.capacitor.itemStack,"x "," ","xxx",'x':Character,dirt)
|
||||
GameRegistry.addRecipe(Blocks.diskDrive.itemStack,"x "," ","xxx",'x':Character,dirt)
|
||||
GameRegistry.addRecipe(Blocks.powerDistributor.itemStack,"x "," ","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)
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -33,6 +33,8 @@ class Proxy {
|
||||
api.Driver.add(driver.item.PowerSupply)
|
||||
api.Driver.add(driver.item.RedstoneCard)
|
||||
api.Driver.add(driver.item.WirelessNetworkCard)
|
||||
|
||||
Recipes.init()
|
||||
}
|
||||
|
||||
def postInit(e: FMLPostInitializationEvent): Unit = {
|
||||
|
6
li/cil/oc/common/item/Card.scala
Normal file
6
li/cil/oc/common/item/Card.scala
Normal file
@ -0,0 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
|
||||
class Card(val parent: Delegator) extends Delegate {
|
||||
val unlocalizedName = "Card"
|
||||
}
|
@ -16,6 +16,7 @@ trait Delegate {
|
||||
private var _icon: Option[Icon] = None
|
||||
|
||||
def itemStack = new ItemStack(parent, 1, itemId)
|
||||
def itemStack(amount:Int) = new ItemStack(parent,amount,itemId)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
// Item
|
||||
|
6
li/cil/oc/common/item/IronCutter.scala
Normal file
6
li/cil/oc/common/item/IronCutter.scala
Normal file
@ -0,0 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
|
||||
class IronCutter (val parent: Delegator) extends Delegate {
|
||||
val unlocalizedName = "IronCutter"
|
||||
}
|
6
li/cil/oc/common/item/Platine.scala
Normal file
6
li/cil/oc/common/item/Platine.scala
Normal file
@ -0,0 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
|
||||
class Platine (val parent: Delegator) extends Delegate {
|
||||
val unlocalizedName = "Platine"
|
||||
}
|
6
li/cil/oc/common/item/PlatineBody.scala
Normal file
6
li/cil/oc/common/item/PlatineBody.scala
Normal file
@ -0,0 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
|
||||
class PlatineBody (val parent: Delegator) extends Delegate {
|
||||
val unlocalizedName = "PlatineBody"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user