Fixed creative tab icon

This commit is contained in:
Calclavia 2014-12-11 08:53:31 +08:00
parent ede327dc01
commit f70e6e757c
10 changed files with 15 additions and 26 deletions

View file

@ -47,6 +47,7 @@ object ArchaicContent extends ContentHolder
{ {
OreDictionary.registerOre("cobblestone", Blocks.cobblestone) OreDictionary.registerOre("cobblestone", Blocks.cobblestone)
} }
if (OreDictionary.getOres("stickWood") == null) if (OreDictionary.getOres("stickWood") == null)
{ {
OreDictionary.registerOre("stickWood", Items.stick) OreDictionary.registerOre("stickWood", Items.stick)

View file

@ -92,7 +92,7 @@ class ItemImprint extends Item
//Constructor //Constructor
setUnlocalizedName(Reference.prefix + "imprint") setUnlocalizedName(Reference.prefix + "imprint")
setTextureName(Reference.prefix + "imprint") setTextureName(Reference.prefix + "imprint")
setCreativeTab(RICreativeTab.tab) setCreativeTab(RICreativeTab)
setHasSubtypes(true) setHasSubtypes(true)
setMaxStackSize(1) setMaxStackSize(1)

View file

@ -135,7 +135,7 @@ object AtomicContent extends ContentHolder
PacketAnnotationManager.INSTANCE.register(classOf[TileAccelerator]) PacketAnnotationManager.INSTANCE.register(classOf[TileAccelerator])
//Buckets //Buckets
itemBucketToxic = manager.newItem("bucketToxicWaste", new ItemBucket(AtomicContent.blockPlasma)).setCreativeTab(RICreativeTab.tab).setContainerItem(Items.bucket).setTextureName(Reference.prefix + "bucketToxicWaste") itemBucketToxic = manager.newItem("bucketToxicWaste", new ItemBucket(AtomicContent.blockPlasma)).setCreativeTab(RICreativeTab).setContainerItem(Items.bucket).setTextureName(Reference.prefix + "bucketToxicWaste")
//Schematics //Schematics
SchematicRegistry.register("resonantInduction.atomic.accelerator", new SchematicAccelerator) SchematicRegistry.register("resonantInduction.atomic.accelerator", new SchematicAccelerator)
@ -191,27 +191,29 @@ object AtomicContent extends ContentHolder
} }
}) })
Settings.config.save Settings.config.save
RICreativeTab.itemStack(new ItemStack(AtomicContent.blockReactorCell))
} }
override def postInit() override def postInit()
{ {
super.postInit() super.postInit()
if (Loader.isModLoaded("IC2") && Settings.allowAlternateRecipes) if (Loader.isModLoaded("IC2") && Settings.allowAlternateRecipes)
{ {
OreDictionary.registerOre("cellEmpty", IC2Items.getItem("cell")) OreDictionary.registerOre("cellEmpty", IC2Items.getItem("cell"))
val cellEmptyName: String = OreDictionary.getOreName(OreDictionary.getOreID("cellEmpty")) val cellEmptyName: String = OreDictionary.getOreName(OreDictionary.getOreID("cellEmpty"))
if (cellEmptyName eq "Unknown") if (cellEmptyName == "Unknown")
{ {
} }
GameRegistry.addRecipe(new ShapelessOreRecipe(AtomicContent.itemYellowCake, IC2Items.getItem("reactorUraniumSimple"))) GameRegistry.addRecipe(new ShapelessOreRecipe(AtomicContent.itemYellowCake, IC2Items.getItem("reactorUraniumSimple")))
GameRegistry.addRecipe(new ShapelessOreRecipe(IC2Items.getItem("cell"), AtomicContent.itemCell)) GameRegistry.addRecipe(new ShapelessOreRecipe(IC2Items.getItem("cell"), AtomicContent.itemCell))
GameRegistry.addRecipe(new ShapelessOreRecipe(AtomicContent.itemCell, "cellEmpty")) GameRegistry.addRecipe(new ShapelessOreRecipe(AtomicContent.itemCell, "cellEmpty"))
} }
EntityRegistry.registerGlobalEntityID(classOf[EntityParticle], "ASParticle", EntityRegistry.findGlobalUniqueEntityId) EntityRegistry.registerGlobalEntityID(classOf[EntityParticle], "ASParticle", EntityRegistry.findGlobalUniqueEntityId)
EntityRegistry.registerModEntity(classOf[EntityParticle], "ASParticle", ENTITY_ID_PREFIX, ResonantInduction, 80, 3, true) EntityRegistry.registerModEntity(classOf[EntityParticle], "ASParticle", ENTITY_ID_PREFIX, ResonantInduction, 80, 3, true)
Settings.config.load Settings.config.load()
for (oreName <- OreDictionary.getOreNames) for (oreName <- OreDictionary.getOreNames)
{ {
if (oreName.startsWith("ingot")) if (oreName.startsWith("ingot"))
@ -225,7 +227,8 @@ object AtomicContent extends ContentHolder
} }
} }
} }
Settings.config.save
Settings.config.save()
recipes += shapeless(new ItemStack(itemAntimatter, 1, 1), itemAntimatter, itemAntimatter, itemAntimatter, itemAntimatter, itemAntimatter, AtomicContent.itemAntimatter, itemAntimatter, itemAntimatter) recipes += shapeless(new ItemStack(itemAntimatter, 1, 1), itemAntimatter, itemAntimatter, itemAntimatter, itemAntimatter, itemAntimatter, AtomicContent.itemAntimatter, itemAntimatter, itemAntimatter)
recipes += shapeless(new ItemStack(itemAntimatter, 8, 0), new ItemStack(AtomicContent.itemAntimatter, 1, 1)) recipes += shapeless(new ItemStack(itemAntimatter, 8, 0), new ItemStack(AtomicContent.itemAntimatter, 1, 1))

View file

@ -23,7 +23,7 @@ class ItemAntimatter extends ItemCell
this.setHasSubtypes(true) this.setHasSubtypes(true)
this.setUnlocalizedName(Reference.prefix + "antimatter") this.setUnlocalizedName(Reference.prefix + "antimatter")
this.setTextureName(Reference.prefix + "antimatter") this.setTextureName(Reference.prefix + "antimatter")
setCreativeTab(RICreativeTab.tab) setCreativeTab(RICreativeTab)
@SideOnly(Side.CLIENT) override def registerIcons(iconRegister: IIconRegister) @SideOnly(Side.CLIENT) override def registerIcons(iconRegister: IIconRegister)
{ {

View file

@ -17,7 +17,7 @@ class ItemCell extends ItemTooltip
if (!name.equalsIgnoreCase("cellEmpty")) this.setContainerItem(AtomicContent.itemCell) if (!name.equalsIgnoreCase("cellEmpty")) this.setContainerItem(AtomicContent.itemCell)
this.setUnlocalizedName(Reference.prefix + name) this.setUnlocalizedName(Reference.prefix + name)
this.setTextureName(Reference.prefix + name) this.setTextureName(Reference.prefix + name)
setCreativeTab(RICreativeTab.tab) setCreativeTab(RICreativeTab)
} }
override def getUnlocalizedName(itemstack: ItemStack): String = override def getUnlocalizedName(itemstack: ItemStack): String =

View file

@ -45,7 +45,7 @@ class ItemFissileFuel extends ItemRadioactive with IReactorComponent
this.setNoRepair this.setNoRepair
this.setUnlocalizedName(Reference.prefix + "rodBreederFuel") this.setUnlocalizedName(Reference.prefix + "rodBreederFuel")
this.setTextureName(Reference.prefix + "breederFuel") this.setTextureName(Reference.prefix + "breederFuel")
setCreativeTab(RICreativeTab.tab) setCreativeTab(RICreativeTab)
def onReact(itemStack: ItemStack, reactor: IReactor) def onReact(itemStack: ItemStack, reactor: IReactor)
{ {

View file

@ -24,7 +24,7 @@ class ItemHazmat(slot: Int) extends ItemArmor(ItemHazmat.hazmatArmorMaterial, Re
{ {
this(slot) this(slot)
this.setUnlocalizedName(Reference.prefix + name) this.setUnlocalizedName(Reference.prefix + name)
this.setCreativeTab(RICreativeTab.tab) this.setCreativeTab(RICreativeTab)
this.setMaxDamage(200000) this.setMaxDamage(200000)
} }

View file

@ -15,16 +15,5 @@ object RICreativeTab extends CreativeTabs(CreativeTabs.getNextID, "resonantinduc
{ {
var itemStack: ItemStack = null var itemStack: ItemStack = null
override def getTabIconItem: Item = override def getTabIconItem: Item =itemStack.getItem
{
if (itemStack != null)
return itemStack.getItem
else
return Items.iron_ingot
}
def itemStack(item: ItemStack)
{ itemStack = item }
def tab = this
} }

View file

@ -57,8 +57,6 @@ final object ResonantInduction
loadables.applyModule(AtomicContent) loadables.applyModule(AtomicContent)
loadables.preInit() loadables.preInit()
RICreativeTab.itemStack = new ItemStack(CoreContent.decoration)
} }
@EventHandler @EventHandler

View file

@ -58,8 +58,6 @@ object MechanicalContent extends ContentHolder
NodeRegistry.register(classOf[TNodeMechanical], classOf[NodeMechanical]) NodeRegistry.register(classOf[TNodeMechanical], classOf[NodeMechanical])
RICreativeTab.itemStack(new ItemStack(MechanicalContent.blockGrinderWheel))
PacketAnnotationManager.INSTANCE.register(classOf[TileWindTurbine]) PacketAnnotationManager.INSTANCE.register(classOf[TileWindTurbine])
PacketAnnotationManager.INSTANCE.register(classOf[TileWaterTurbine]) PacketAnnotationManager.INSTANCE.register(classOf[TileWaterTurbine])