Fixed electrical part registry registering too late
This commit is contained in:
parent
1e38614b9f
commit
9fd2b3eac0
4 changed files with 244 additions and 245 deletions
|
@ -13,6 +13,7 @@ import resonant.lib.wrapper.WrapList._
|
|||
import resonantinduction.core.{Reference, ResonantTab}
|
||||
|
||||
import scala.collection.JavaConversions._
|
||||
|
||||
object ItemImprint
|
||||
{
|
||||
/**
|
||||
|
@ -66,6 +67,7 @@ object ItemImprint
|
|||
val var4: NBTTagCompound = tagList.getCompoundTagAt(i)
|
||||
filterStacks.add(ItemStack.loadItemStackFromNBT(var4))
|
||||
}
|
||||
|
||||
return filterStacks
|
||||
}
|
||||
|
||||
|
@ -88,11 +90,11 @@ object ItemImprint
|
|||
class ItemImprint extends Item
|
||||
{
|
||||
//Constructor
|
||||
this.setUnlocalizedName(Reference.prefix + "imprint")
|
||||
this.setTextureName(Reference.prefix + "imprint")
|
||||
this.setCreativeTab(ResonantTab.tab)
|
||||
this.setHasSubtypes(true)
|
||||
this.setMaxStackSize(1)
|
||||
setUnlocalizedName(Reference.prefix + "imprint")
|
||||
setTextureName(Reference.prefix + "imprint")
|
||||
setCreativeTab(ResonantTab.tab)
|
||||
setHasSubtypes(true)
|
||||
setMaxStackSize(1)
|
||||
|
||||
override def onLeftClickEntity(stack: ItemStack, player: EntityPlayer, entity: Entity): Boolean =
|
||||
{
|
||||
|
@ -117,6 +119,7 @@ class ItemImprint extends Item
|
|||
{
|
||||
for (filterItem <- filterItems)
|
||||
{
|
||||
if(filterItem != null)
|
||||
list.add(filterItem.getDisplayName)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,8 +76,7 @@ final object ResonantInduction
|
|||
}
|
||||
|
||||
ResonantPartFactory.init()
|
||||
ResonantEngine.resourceFactory.generateAll();
|
||||
|
||||
ResonantEngine.resourceFactory.generateAll()
|
||||
loadables.init()
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ object ElectricalContent extends ContentHolder
|
|||
{
|
||||
val particleTextures = new ResourceLocation("textures/particle/particles.png")
|
||||
|
||||
|
||||
var itemWire: Item = null
|
||||
var itemMultimeter: Item = null
|
||||
var itemTransformer: Item = null
|
||||
|
@ -63,7 +62,6 @@ object ElectricalContent extends ContentHolder
|
|||
var tierTwoBattery: ItemStack = null
|
||||
var tierThreeBattery: ItemStack = null
|
||||
|
||||
|
||||
var guideBook: ItemStack = createGuide
|
||||
|
||||
override def preInit()
|
||||
|
@ -92,6 +90,12 @@ object ElectricalContent extends ContentHolder
|
|||
tierTwoBattery = ItemBlockBattery.setTier(new ItemStack(ElectricalContent.blockBattery, 1, 0), 1.asInstanceOf[Byte])
|
||||
tierThreeBattery = ItemBlockBattery.setTier(new ItemStack(ElectricalContent.blockBattery, 1, 0), 2.asInstanceOf[Byte])
|
||||
|
||||
/** Register all parts */
|
||||
ResonantPartFactory.register(classOf[PartFramedWire])
|
||||
ResonantPartFactory.register(classOf[PartFlatWire])
|
||||
ResonantPartFactory.register(classOf[PartMultimeter])
|
||||
ResonantPartFactory.register(classOf[PartElectricTransformer])
|
||||
ResonantPartFactory.register(classOf[PartQuantumGlyph])
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this)
|
||||
}
|
||||
|
@ -107,13 +111,6 @@ object ElectricalContent extends ContentHolder
|
|||
GameRegistry.registerTileEntity(classOf[TileMirror], "EMLaserMirror");
|
||||
GameRegistry.registerTileEntity(classOf[TileFocusCrystal], "EMFocusCrystal");
|
||||
|
||||
/** Register all parts */
|
||||
ResonantPartFactory.register(classOf[PartFramedWire])
|
||||
ResonantPartFactory.register(classOf[PartFlatWire])
|
||||
ResonantPartFactory.register(classOf[PartMultimeter])
|
||||
ResonantPartFactory.register(classOf[PartElectricTransformer])
|
||||
ResonantPartFactory.register(classOf[PartQuantumGlyph])
|
||||
|
||||
OreDictionary.registerOre("wire", ElectricalContent.itemWire)
|
||||
OreDictionary.registerOre("motor", ElectricalContent.blockMotor)
|
||||
OreDictionary.registerOre("battery", ItemBlockBattery.setTier(new ItemStack(ElectricalContent.blockBattery, 1, 0), 0.asInstanceOf[Byte]))
|
||||
|
|
Loading…
Reference in a new issue