mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 12:17:17 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into master-MC1.7.10
Conflicts: src/main/scala/li/cil/oc/common/EventHandler.scala src/main/scala/li/cil/oc/common/block/Keyboard.scala src/main/scala/li/cil/oc/common/block/MotionSensor.scala src/main/scala/li/cil/oc/common/tileentity/ServerRack.scala src/main/scala/li/cil/oc/common/tileentity/Switch.scala src/main/scala/li/cil/oc/common/tileentity/traits/TileEntity.scala src/main/scala/li/cil/oc/common/tileentity/traits/power/BuildCraft.scala src/main/scala/li/cil/oc/common/tileentity/traits/power/IndustrialCraft2.scala src/main/scala/li/cil/oc/common/tileentity/traits/power/ThermalExpansion.scala src/main/scala/li/cil/oc/common/tileentity/traits/power/UniversalElectricity.scala src/main/scala/li/cil/oc/util/mods/Mods.scala
This commit is contained in:
commit
b05e239817
@ -78,9 +78,9 @@ end
|
||||
|
||||
local function downloadFile(url,path,force)
|
||||
if options.f or force then
|
||||
wget("-fq",url,path)
|
||||
return wget("-fq",url,path)
|
||||
else
|
||||
wget("-q",url,path)
|
||||
return wget("-q",url,path)
|
||||
end
|
||||
end
|
||||
|
||||
@ -349,7 +349,7 @@ local function installPackage(pack,path,update)
|
||||
end
|
||||
if update then
|
||||
term.write("Removing old files...")
|
||||
for i,j in pairs(tPacks[pack]) do
|
||||
for _,j in pairs(tPacks[pack]) do
|
||||
fs.remove(j)
|
||||
end
|
||||
term.write("Done.\n")
|
||||
@ -371,9 +371,18 @@ local function installPackage(pack,path,update)
|
||||
end
|
||||
nPath = fs.concat(path,j,string.gsub(i,".+(/.-)$","%1"),nil)
|
||||
end
|
||||
local success = pcall(downloadFile,"https://raw.githubusercontent.com/"..repo.."/"..i,nPath)
|
||||
if success then
|
||||
local success,response = pcall(downloadFile,"https://raw.githubusercontent.com/"..repo.."/"..i,nPath)
|
||||
if success and response then
|
||||
tPacks[pack][i] = nPath
|
||||
else
|
||||
term.write("Error while installing files for package '"..pack.."'. Reverting installation... ")
|
||||
fs.remove(nPath)
|
||||
for o,p in pairs(tPacks[pack]) do
|
||||
fs.remove(p)
|
||||
tPacks[pack][o]=nil
|
||||
end
|
||||
print("Done.\nPlease contact the package author about this problem.")
|
||||
return
|
||||
end
|
||||
end
|
||||
if info.dependencies then
|
||||
@ -386,9 +395,18 @@ local function installPackage(pack,path,update)
|
||||
nPath = fs.concat(path,j,string.gsub(i,".+(/.-)$","%1"),nil)
|
||||
end
|
||||
if string.lower(string.sub(i,1,4))=="http" then
|
||||
local success = pcall(downloadFile,i,nPath)
|
||||
if success then
|
||||
local success,response = pcall(downloadFile,i,nPath)
|
||||
if success and response then
|
||||
tPacks[pack][i] = nPath
|
||||
else
|
||||
term.write("Error while installing dependency package '"..i.."'. Reverting installation... ")
|
||||
fs.remove(nPath)
|
||||
for o,p in pairs(tPacks[pack]) do
|
||||
fs.remove(p)
|
||||
tPacks[pack][o]=nil
|
||||
end
|
||||
print("Done.\nPlease contact the package author about this problem.")
|
||||
return
|
||||
end
|
||||
else
|
||||
local depInfo = getInformation(string.lower(i))
|
||||
|
@ -1,5 +1,52 @@
|
||||
local component = require("component")
|
||||
local shell = require("shell")
|
||||
local text = require("text")
|
||||
|
||||
for address, name in component.list() do
|
||||
io.write(name .. "\t" .. address .. "\n")
|
||||
end
|
||||
local args, options = shell.parse(...)
|
||||
local count = tonumber(options.limit) or math.huge
|
||||
|
||||
local components = {}
|
||||
local padTo = 1
|
||||
|
||||
if #args == 0 then -- get all components if no filters given.
|
||||
args[1] = ""
|
||||
end
|
||||
for _, filter in ipairs(args) do
|
||||
for address, name in component.list(filter) do
|
||||
if name:len() > padTo then
|
||||
padTo = name:len() + 2
|
||||
end
|
||||
components[address] = name
|
||||
end
|
||||
end
|
||||
|
||||
padTo = padTo + 8 - padTo % 8
|
||||
for address, name in pairs(components) do
|
||||
io.write(text.padRight(name, padTo) .. address .. '\n')
|
||||
|
||||
if options.l then
|
||||
local proxy = component.proxy(address)
|
||||
local padTo = 1
|
||||
local methods = {}
|
||||
for name, member in pairs(proxy) do
|
||||
if type(member) == "table" or type(member) == "function" then
|
||||
if name:len() > padTo then
|
||||
padTo = name:len() + 2
|
||||
end
|
||||
table.insert(methods, name)
|
||||
end
|
||||
end
|
||||
table.sort(methods)
|
||||
padTo = padTo + 8 - padTo % 8
|
||||
|
||||
for _, name in ipairs(methods) do
|
||||
local doc = tostring(proxy[name])
|
||||
io.write(" " .. text.padRight(name, padTo) .. doc .. '\n')
|
||||
end
|
||||
end
|
||||
|
||||
count = count - 1
|
||||
if count <= 0 then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
@ -13,9 +13,9 @@ do
|
||||
function rom.open(file) return rom.invoke("open", file) end
|
||||
function rom.read(handle) return rom.invoke("read", handle, math.huge) end
|
||||
function rom.close(handle) return rom.invoke("close", handle) end
|
||||
function rom.inits(file) return ipairs(rom.invoke("list", "boot")) end
|
||||
function rom.inits() return ipairs(rom.invoke("list", "boot")) end
|
||||
function rom.isDirectory(path) return rom.invoke("isDirectory", path) end
|
||||
|
||||
|
||||
local screen = component.list('screen')()
|
||||
for address in component.list('screen') do
|
||||
if #component.invoke(address, 'getKeyboards') > 0 then
|
||||
|
@ -533,23 +533,23 @@ local libcomputer = {
|
||||
maxEnergy = computer.maxEnergy,
|
||||
|
||||
getBootAddress = computer.getBootAddress,
|
||||
setBootAddress = function(address)
|
||||
return spcall(computer.setBootAddress, address)
|
||||
setBootAddress = function(...)
|
||||
return spcall(computer.setBootAddress, ...)
|
||||
end,
|
||||
|
||||
users = computer.users,
|
||||
addUser = function(name)
|
||||
return spcall(computer.addUser, name)
|
||||
addUser = function(...)
|
||||
return spcall(computer.addUser, ...)
|
||||
end,
|
||||
removeUser = function(name)
|
||||
return spcall(computer.removeUser, name)
|
||||
removeUser = function(...)
|
||||
return spcall(computer.removeUser, ...)
|
||||
end,
|
||||
|
||||
shutdown = function(reboot)
|
||||
coroutine.yield(reboot ~= nil and reboot ~= false)
|
||||
end,
|
||||
pushSignal = function(name, ...)
|
||||
return spcall(computer.pushSignal, name, ...)
|
||||
pushSignal = function(...)
|
||||
return spcall(computer.pushSignal, ...)
|
||||
end,
|
||||
pullSignal = function(timeout)
|
||||
local deadline = computer.uptime() +
|
||||
|
@ -34,14 +34,14 @@ object EventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
@Optional.Method(modid = Mods.IDs.ForgeMultipart)
|
||||
def schedule(tileEntity: () => TileEntity) {
|
||||
if (SideTracker.isServer) pending.synchronized {
|
||||
pending += (() => Network.joinOrCreateNetwork(tileEntity()))
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "IC2")
|
||||
@Optional.Method(modid = Mods.IDs.IndustrialCraft2)
|
||||
def scheduleIC2Add(tileEntity: power.IndustrialCraft2) {
|
||||
if (SideTracker.isServer) pending.synchronized {
|
||||
pending += (() => if (!tileEntity.addedToPowerGrid && !tileEntity.isInvalid) {
|
||||
@ -51,7 +51,7 @@ object EventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "IC2")
|
||||
@Optional.Method(modid = Mods.IDs.IndustrialCraft2)
|
||||
def scheduleIC2Remove(tileEntity: power.IndustrialCraft2) {
|
||||
if (SideTracker.isServer) pending.synchronized {
|
||||
pending += (() => if (tileEntity.addedToPowerGrid) {
|
||||
@ -90,7 +90,7 @@ object EventHandler {
|
||||
if (!LuaStateFactory.isAvailable) {
|
||||
player.addChatMessage(Localization.Chat.WarningLuaFallback)
|
||||
}
|
||||
if (Mods.ProjectRed.isAvailable && !mods.ProjectRed.isAPIAvailable) {
|
||||
if (Mods.ProjectRedTransmission.isAvailable && !mods.ProjectRed.isAPIAvailable) {
|
||||
player.addChatMessage(Localization.Chat.WarningProjectRed)
|
||||
}
|
||||
if (!Settings.get.pureIgnorePower && Settings.get.ignorePower) {
|
||||
|
@ -4,6 +4,7 @@ import java.util
|
||||
|
||||
import cpw.mods.fml.common.Optional
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import li.cil.oc.{Localization, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
import net.minecraft.item.ItemStack
|
||||
@ -20,7 +21,7 @@ class AccessPoint(parent: SimpleDelegator) extends Switch(parent) {
|
||||
Some("SwitchSide")
|
||||
)
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val nbt = accessor.getNBTData
|
||||
val node = nbt.getTagList(Settings.namespace + "componentNodes", NBT.TAG_COMPOUND).getCompoundTagAt(accessor.getSide.ordinal)
|
||||
|
@ -4,6 +4,7 @@ import java.util
|
||||
|
||||
import cpw.mods.fml.common.Optional
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import li.cil.oc.{Localization, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
import net.minecraft.block.Block
|
||||
@ -20,7 +21,7 @@ class Capacitor(val parent: SimpleDelegator) extends SimpleDelegate {
|
||||
Some("CapacitorSide")
|
||||
)
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val node = accessor.getNBTData.getCompoundTag(Settings.namespace + "node")
|
||||
if (node.hasKey("buffer")) {
|
||||
|
@ -5,7 +5,7 @@ import java.util
|
||||
import cpw.mods.fml.common.Optional
|
||||
import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||
import li.cil.oc.common.{GuiType, tileentity}
|
||||
import li.cil.oc.util.mods.BuildCraft
|
||||
import li.cil.oc.util.mods.{BuildCraft, Mods}
|
||||
import li.cil.oc.util.{Color, Tooltip}
|
||||
import li.cil.oc.{Localization, OpenComputers, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
@ -43,7 +43,7 @@ class Case(val parent: SimpleDelegator, val tier: Int) extends RedstoneAware wit
|
||||
tooltip.addAll(Tooltip.get("Case", slots))
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val nbt = accessor.getNBTData
|
||||
val node = nbt.getCompoundTag(Settings.namespace + "computer").getCompoundTag("node")
|
||||
|
@ -6,7 +6,7 @@ import cpw.mods.fml.common.Optional
|
||||
import li.cil.oc.client.Textures
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.server.PacketSender
|
||||
import li.cil.oc.util.mods.BuildCraft
|
||||
import li.cil.oc.util.mods.{BuildCraft, Mods}
|
||||
import li.cil.oc.{Localization, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
import net.minecraft.block.Block
|
||||
@ -25,7 +25,7 @@ class Charger(val parent: SimpleDelegator) extends RedstoneAware with SimpleDele
|
||||
Some("ChargerSide")
|
||||
)
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
accessor.getTileEntity match {
|
||||
case charger: tileentity.Charger =>
|
||||
|
@ -7,6 +7,7 @@ import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||
import li.cil.oc.Settings
|
||||
import li.cil.oc.common.tileentity.traits.{Colored, Inventory}
|
||||
import li.cil.oc.util.Tooltip
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
@ -117,7 +118,7 @@ trait Delegate {
|
||||
tooltip.addAll(Tooltip.get(unlocalizedName))
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ class SpecialDelegator extends Delegator[SpecialDelegate] {
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.IConnectableRedNet", modid = "MineFactoryReloaded")
|
||||
@Optional.Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.IConnectableRedNet", modid = Mods.IDs.MineFactoryReloaded)
|
||||
trait RedstoneDelegator[Child <: Delegate] extends Delegator[Child] with IConnectableRedNet {
|
||||
override def getConnectionType(world: World, x: Int, y: Int, z: Int, side: ForgeDirection) = RedNetConnectionType.CableAll
|
||||
|
||||
|
@ -31,7 +31,7 @@ class DiskDrive(val parent: SimpleDelegator) extends SimpleDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val items = accessor.getNBTData.getTagList(Settings.namespace + "items", NBT.TAG_COMPOUND)
|
||||
if (items.tagCount > 0) {
|
||||
|
@ -5,6 +5,7 @@ import java.util
|
||||
import cpw.mods.fml.common.Optional
|
||||
import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import li.cil.oc.{Localization, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
import net.minecraft.item.{EnumRarity, ItemStack}
|
||||
@ -26,7 +27,7 @@ class Hologram(val parent: SpecialDelegator, val tier: Int) extends SpecialDeleg
|
||||
|
||||
override def rarity = Array(EnumRarity.uncommon, EnumRarity.rare).apply(tier)
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val node = accessor.getNBTData.getCompoundTag(Settings.namespace + "node")
|
||||
if (node.hasKey("address")) {
|
||||
|
@ -5,6 +5,7 @@ import java.util
|
||||
import cpw.mods.fml.common.Optional
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.util.Tooltip
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import li.cil.oc.{Settings, api}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
import net.minecraft.block.Block
|
||||
@ -29,7 +30,7 @@ class KeyboardDeprecated(val parent: SpecialDelegator) extends SpecialDelegate {
|
||||
tooltip.addAll(Tooltip.get(unlocalizedName))
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val node = accessor.getNBTData.getCompoundTag(Settings.namespace + "keyboard").getCompoundTag("node")
|
||||
if (node.hasKey("address")) {
|
||||
|
@ -8,6 +8,7 @@ import li.cil.oc.client.KeyBindings
|
||||
import li.cil.oc.common.{GuiType, tileentity}
|
||||
import li.cil.oc.server.PacketSender
|
||||
import li.cil.oc.server.component.robot
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import li.cil.oc.util.{ItemUtils, Tooltip}
|
||||
import li.cil.oc.{Blocks, OpenComputers, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
@ -44,7 +45,7 @@ class RobotProxy(val parent: SpecialDelegator) extends RedstoneAware with Specia
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
addLines(stack, tooltip)
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import java.util
|
||||
import cpw.mods.fml.common.Optional
|
||||
import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||
import li.cil.oc.common.{GuiType, tileentity}
|
||||
import li.cil.oc.util.mods.BuildCraft
|
||||
import li.cil.oc.util.mods.{BuildCraft, Mods}
|
||||
import li.cil.oc.util.{Color, PackedColor, Tooltip}
|
||||
import li.cil.oc.{Localization, OpenComputers, Settings}
|
||||
import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor}
|
||||
@ -31,7 +31,7 @@ class Screen(val parent: SimpleDelegator, val tier: Int) extends RedstoneAware w
|
||||
tooltip.addAll(Tooltip.get(super.unlocalizedName, w, h, depth))
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
override def wailaBody(stack: ItemStack, tooltip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) {
|
||||
val node = accessor.getNBTData.getCompoundTag("node")
|
||||
if (node.hasKey("address")) {
|
||||
|
@ -16,7 +16,7 @@ class RedstoneCard(val parent: Delegator, val tier: Int) extends Delegate {
|
||||
override def tooltipLines(stack: ItemStack, player: EntityPlayer, tooltip: util.List[String], advanced: Boolean) {
|
||||
tooltip.addAll(Tooltip.get(super.unlocalizedName))
|
||||
if (tier == Tier.Two) {
|
||||
if (Mods.ProjectRed.isAvailable) {
|
||||
if (Mods.ProjectRedTransmission.isAvailable) {
|
||||
tooltip.addAll(Tooltip.get(super.unlocalizedName + ".ProjectRed"))
|
||||
}
|
||||
if (Mods.RedLogic.isAvailable) {
|
||||
|
@ -4,6 +4,7 @@ import cpw.mods.fml.common.Optional
|
||||
import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||
import li.cil.oc.api
|
||||
import li.cil.oc.api.network._
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import mods.immibis.redlogic.api.wiring.IWire
|
||||
import net.minecraft.entity.Entity
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
@ -152,22 +153,22 @@ class RobotProxy(val robot: Robot) extends traits.Computer with traits.PowerInfo
|
||||
|
||||
override def checkRedstoneInputChanged() = robot.checkRedstoneInputChanged()
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def connects(wire: IWire, blockFace: Int, fromDirection: Int) = robot.connects(wire, blockFace, fromDirection)
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def connectsAroundCorner(wire: IWire, blockFace: Int, fromDirection: Int) = robot.connectsAroundCorner(wire, blockFace, fromDirection)
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def getBundledCableStrength(blockFace: Int, toDirection: Int) = robot.getBundledCableStrength(blockFace, toDirection)
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def getEmittedSignalStrength(blockFace: Int, toDirection: Int) = robot.getEmittedSignalStrength(blockFace, toDirection)
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def onBundledInputChanged() = robot.onBundledInputChanged()
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def onRedstoneInputChanged() = robot.onRedstoneInputChanged()
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -24,7 +24,7 @@ import stargatetech2.api.bus.IBusDevice
|
||||
import scala.collection.mutable
|
||||
|
||||
// See AbstractBusAware as to why we have to define the IBusDevice here.
|
||||
@Optional.Interface(iface = "stargatetech2.api.bus.IBusDevice", modid = "StargateTech2")
|
||||
@Optional.Interface(iface = "stargatetech2.api.bus.IBusDevice", modid = Mods.IDs.StargateTech2)
|
||||
class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerBalancer with traits.Inventory with traits.Rotatable with traits.BundledRedstoneAware with traits.AbstractBusAware with Analyzable with IBusDevice {
|
||||
val servers = Array.fill(getSizeInventory)(None: Option[component.Server])
|
||||
|
||||
@ -54,7 +54,7 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
|
||||
|
||||
override def canConnect(side: ForgeDirection) = side != facing
|
||||
|
||||
@Method(modid = "StargateTech2")
|
||||
@Method(modid = Mods.IDs.StargateTech2)
|
||||
override def getInterfaces(side: Int) = if (side != facing.ordinal) {
|
||||
super.getInterfaces(side)
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import net.minecraftforge.common.util.ForgeDirection
|
||||
|
||||
import scala.collection.mutable
|
||||
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft")
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = Mods.IDs.ComputerCraft)
|
||||
class Switch extends traits.Hub with traits.NotAnalyzable with IPeripheral with traits.ComponentInventory {
|
||||
var lastMessage = 0L
|
||||
|
||||
@ -28,25 +28,25 @@ class Switch extends traits.Hub with traits.NotAnalyzable with IPeripheral with
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@Optional.Method(modid = Mods.IDs.ComputerCraft)
|
||||
override def getType = "oc_adapter"
|
||||
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@Optional.Method(modid = Mods.IDs.ComputerCraft)
|
||||
override def attach(computer: IComputerAccess) {
|
||||
computers += computer
|
||||
openPorts += computer -> mutable.Set.empty
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@Optional.Method(modid = Mods.IDs.ComputerCraft)
|
||||
override def detach(computer: IComputerAccess) {
|
||||
computers -= computer
|
||||
openPorts -= computer
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@Optional.Method(modid = Mods.IDs.ComputerCraft)
|
||||
override def getMethodNames = Array("open", "isOpen", "close", "closeAll", "maxPacketSize", "transmit", "isWireless")
|
||||
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@Optional.Method(modid = Mods.IDs.ComputerCraft)
|
||||
override def callMethod(computer: IComputerAccess, context: ILuaContext, method: Int, arguments: Array[AnyRef]) = getMethodNames()(method) match {
|
||||
case "open" =>
|
||||
val port = checkPort(arguments, 0)
|
||||
@ -74,7 +74,7 @@ class Switch extends traits.Hub with traits.NotAnalyzable with IPeripheral with
|
||||
case _ => null
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@Optional.Method(modid = Mods.IDs.ComputerCraft)
|
||||
override def equals(other: IPeripheral) = other == this
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -26,7 +26,7 @@ trait AbstractBusAware extends TileEntity with network.Environment {
|
||||
|
||||
def installedComponents: Iterable[ManagedEnvironment]
|
||||
|
||||
@Optional.Method(modid = "StargateTech2")
|
||||
@Optional.Method(modid = Mods.IDs.StargateTech2)
|
||||
def getInterfaces(side: Int): Array[IBusInterface] =
|
||||
if (isAbstractBusAvailable) {
|
||||
if (isServer) {
|
||||
|
@ -12,9 +12,9 @@ import net.minecraftforge.common.util.ForgeDirection
|
||||
import powercrystals.minefactoryreloaded.api.rednet.IRedNetNetworkContainer
|
||||
|
||||
@Optional.InterfaceList(Array(
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IBundledEmitter", modid = "RedLogic"),
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IBundledUpdatable", modid = "RedLogic"),
|
||||
new Optional.Interface(iface = "mrtjp.projectred.api.IBundledTile", modid = "ProjRed|Transmission")
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IBundledEmitter", modid = Mods.IDs.RedLogic),
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IBundledUpdatable", modid = Mods.IDs.RedLogic),
|
||||
new Optional.Interface(iface = "mrtjp.projectred.api.IBundledTile", modid = Mods.IDs.ProjectRedTransmission)
|
||||
))
|
||||
trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBundledUpdatable with IBundledTile {
|
||||
|
||||
@ -147,7 +147,7 @@ trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBund
|
||||
case _ => null
|
||||
}
|
||||
} else null
|
||||
val projectRed = if (Mods.ProjectRed.isAvailable && ProjectRed.isAPIAvailable) {
|
||||
val projectRed = if (Mods.ProjectRedTransmission.isAvailable && ProjectRed.isAPIAvailable) {
|
||||
Option(ProjectRedAPI.transmissionAPI.getBundledInput(world, x, y, z, side.ordinal)).fold(null: Array[Int])(_.map(_ & 0xFF))
|
||||
} else null
|
||||
(redLogic, projectRed) match {
|
||||
@ -175,17 +175,17 @@ trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBund
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
def getBundledCableStrength(blockFace: Int, toDirection: Int): Array[Byte] = bundledOutput(ForgeDirection.getOrientation(toDirection)).map(value => math.min(math.max(value, 0), 255).toByte)
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
def onBundledInputChanged() = checkRedstoneInputChanged()
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "ProjRed|Transmission")
|
||||
@Optional.Method(modid = Mods.IDs.ProjectRedTransmission)
|
||||
def canConnectBundled(side: Int) = isOutputEnabled
|
||||
|
||||
@Optional.Method(modid = "ProjRed|Transmission")
|
||||
@Optional.Method(modid = Mods.IDs.ProjectRedTransmission)
|
||||
def getBundledSignal(side: Int) = bundledOutput(ForgeDirection.getOrientation(side)).map(value => math.min(math.max(value, 0), 255).toByte)
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import stargatetech2.api.bus.IBusDevice
|
||||
import scala.collection.mutable
|
||||
|
||||
// See AbstractBusAware as to why we have to define the IBusDevice here.
|
||||
@Optional.Interface(iface = "stargatetech2.api.bus.IBusDevice", modid = "StargateTech2")
|
||||
@Optional.Interface(iface = "stargatetech2.api.bus.IBusDevice", modid = Mods.IDs.StargateTech2)
|
||||
trait Computer extends Environment with ComponentInventory with Rotatable with BundledRedstoneAware with AbstractBusAware with IBusDevice with Analyzable with Owner {
|
||||
private lazy val _computer = if (isServer) Machine.create(this) else null
|
||||
|
||||
|
@ -11,9 +11,9 @@ import net.minecraft.nbt.NBTTagCompound
|
||||
import net.minecraftforge.common.util.ForgeDirection
|
||||
|
||||
@Optional.InterfaceList(Array(
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IConnectable", modid = "RedLogic"),
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IRedstoneEmitter", modid = "RedLogic"),
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IRedstoneUpdatable", modid = "RedLogic")
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IConnectable", modid = Mods.IDs.RedLogic),
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IRedstoneEmitter", modid = Mods.IDs.RedLogic),
|
||||
new Optional.Interface(iface = "mods.immibis.redlogic.api.wiring.IRedstoneUpdatable", modid = Mods.IDs.RedLogic)
|
||||
))
|
||||
trait RedstoneAware extends RotationAware with IConnectable with IRedstoneEmitter with IRedstoneUpdatable {
|
||||
protected[tileentity] val _input = Array.fill(6)(-1)
|
||||
@ -152,15 +152,15 @@ trait RedstoneAware extends RotationAware with IConnectable with IRedstoneEmitte
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def connects(wire: IWire, blockFace: Int, fromDirection: Int) = isOutputEnabled
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def connectsAroundCorner(wire: IWire, blockFace: Int, fromDirection: Int) = false
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def getEmittedSignalStrength(blockFace: Int, toDirection: Int): Short = _output(toLocal(ForgeDirection.getOrientation(toDirection)).ordinal()).toShort
|
||||
|
||||
@Optional.Method(modid = "RedLogic")
|
||||
@Optional.Method(modid = Mods.IDs.RedLogic)
|
||||
override def onRedstoneInputChanged() = checkRedstoneInputChanged()
|
||||
}
|
||||
|
@ -1,15 +1,16 @@
|
||||
package li.cil.oc.common.tileentity.traits.power
|
||||
|
||||
import buildcraft.api.power.{IPowerReceptor, PowerHandler}
|
||||
import cpw.mods.fml.common.{ModAPIManager, Optional}
|
||||
import cpw.mods.fml.common.Optional
|
||||
import li.cil.oc.Settings
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import net.minecraftforge.common.util.ForgeDirection
|
||||
|
||||
@Optional.Interface(iface = "buildcraft.api.power.IPowerReceptor", modid = "BuildCraftAPI|power")
|
||||
@Optional.Interface(iface = "buildcraft.api.power.IPowerReceptor", modid = Mods.IDs.BuildCraftPower)
|
||||
trait BuildCraft extends Common with IPowerReceptor {
|
||||
private var powerHandler: Option[AnyRef] = None
|
||||
|
||||
private lazy val useBuildCraftPower = isServer && !Settings.get.ignorePower && ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|power")
|
||||
private lazy val useBuildCraftPower = isServer && !Settings.get.ignorePower && Mods.BuildCraftPower.isAvailable
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@ -28,7 +29,7 @@ trait BuildCraft extends Common with IPowerReceptor {
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "BuildCraftAPI|power")
|
||||
@Optional.Method(modid = Mods.IDs.BuildCraftPower)
|
||||
def getPowerProvider = {
|
||||
if (powerHandler.isEmpty) {
|
||||
val handler = new PowerHandler(this, PowerHandler.Type.MACHINE)
|
||||
@ -43,7 +44,7 @@ trait BuildCraft extends Common with IPowerReceptor {
|
||||
else null
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "BuildCraftAPI|power")
|
||||
@Optional.Method(modid = Mods.IDs.BuildCraftPower)
|
||||
def getPowerReceiver(side: ForgeDirection) =
|
||||
if (canConnectPower(side))
|
||||
getPowerProvider.getPowerReceiver
|
||||
@ -52,6 +53,6 @@ trait BuildCraft extends Common with IPowerReceptor {
|
||||
// Don't strip, also defined by AbstractBusAware trait.
|
||||
def getWorld = getWorldObj
|
||||
|
||||
@Optional.Method(modid = "BuildCraftAPI|power")
|
||||
@Optional.Method(modid = Mods.IDs.BuildCraftPower)
|
||||
def doWork(workProvider: PowerHandler) {}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import li.cil.oc.common.EventHandler
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import net.minecraftforge.common.util.ForgeDirection
|
||||
|
||||
@Optional.Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2")
|
||||
@Optional.Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = Mods.IDs.IndustrialCraft2)
|
||||
trait IndustrialCraft2 extends Common with IEnergySink {
|
||||
var addedToPowerGrid = false
|
||||
|
||||
@ -34,10 +34,10 @@ trait IndustrialCraft2 extends Common with IEnergySink {
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "IC2")
|
||||
@Optional.Method(modid = Mods.IDs.IndustrialCraft2)
|
||||
def acceptsEnergyFrom(emitter: net.minecraft.tileentity.TileEntity, direction: ForgeDirection) = canConnectPower(direction)
|
||||
|
||||
@Optional.Method(modid = "IC2")
|
||||
@Optional.Method(modid = Mods.IDs.IndustrialCraft2)
|
||||
override def injectEnergy(directionFrom: ForgeDirection, amount: Double, voltage: Double): Double = {
|
||||
lastInjectedAmount = amount
|
||||
var energy = amount * Settings.ratioIC2
|
||||
@ -51,10 +51,10 @@ trait IndustrialCraft2 extends Common with IEnergySink {
|
||||
else amount - tryChangeBuffer(directionFrom, energy) / Settings.ratioIC2
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "IC2")
|
||||
@Optional.Method(modid = Mods.IDs.IndustrialCraft2)
|
||||
override def getSinkTier = Int.MaxValue
|
||||
|
||||
@Optional.Method(modid = "IC2")
|
||||
@Optional.Method(modid = Mods.IDs.IndustrialCraft2)
|
||||
override def getDemandedEnergy = {
|
||||
if (Settings.get.ignorePower || isClient) 0
|
||||
else {
|
||||
|
@ -7,11 +7,12 @@ import li.cil.oc.api.network._
|
||||
import li.cil.oc.common.EventHandler
|
||||
import li.cil.oc.common.tileentity.traits.RedstoneAware
|
||||
import li.cil.oc.util.mods
|
||||
import li.cil.oc.util.mods.Mods
|
||||
import net.minecraft.nbt.NBTTagCompound
|
||||
|
||||
@Optional.InterfaceList(Array(
|
||||
new Optional.Interface(iface = "codechicken.wirelessredstone.core.WirelessReceivingDevice", modid = "WR-CBE|Core"),
|
||||
new Optional.Interface(iface = "codechicken.wirelessredstone.core.WirelessTransmittingDevice", modid = "WR-CBE|Core")
|
||||
new Optional.Interface(iface = "codechicken.wirelessredstone.core.WirelessReceivingDevice", modid = Mods.IDs.WirelessRedstoneCBE),
|
||||
new Optional.Interface(iface = "codechicken.wirelessredstone.core.WirelessTransmittingDevice", modid = Mods.IDs.WirelessRedstoneCBE)
|
||||
))
|
||||
trait RedstoneWireless extends Redstone[RedstoneAware] with WirelessReceivingDevice with WirelessTransmittingDevice {
|
||||
var wirelessFrequency = 0
|
||||
@ -65,7 +66,7 @@ trait RedstoneWireless extends Redstone[RedstoneAware] with WirelessReceivingDev
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Optional.Method(modid = "WR-CBE|Core")
|
||||
@Optional.Method(modid = Mods.IDs.WirelessRedstoneCBE)
|
||||
override def updateDevice(frequency: Int, on: Boolean) {
|
||||
if (frequency == wirelessFrequency && on != wirelessInput) {
|
||||
wirelessInput = on
|
||||
@ -73,16 +74,16 @@ trait RedstoneWireless extends Redstone[RedstoneAware] with WirelessReceivingDev
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "WR-CBE|Core")
|
||||
@Optional.Method(modid = Mods.IDs.WirelessRedstoneCBE)
|
||||
override def getPosition = Vector3.fromTileEntityCenter(owner)
|
||||
|
||||
@Optional.Method(modid = "WR-CBE|Core")
|
||||
@Optional.Method(modid = Mods.IDs.WirelessRedstoneCBE)
|
||||
override def getDimension = owner.world.provider.dimensionId
|
||||
|
||||
@Optional.Method(modid = "WR-CBE|Core")
|
||||
@Optional.Method(modid = Mods.IDs.WirelessRedstoneCBE)
|
||||
override def getFreq = wirelessFrequency
|
||||
|
||||
@Optional.Method(modid = "WR-CBE|Core")
|
||||
@Optional.Method(modid = Mods.IDs.WirelessRedstoneCBE)
|
||||
override def getAttachedEntity = null
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -3,5 +3,5 @@ package li.cil.oc.util.mods
|
||||
object BundledRedstone {
|
||||
def isAvailable = Mods.RedLogic.isAvailable ||
|
||||
Mods.MineFactoryReloaded.isAvailable ||
|
||||
(Mods.ProjectRed.isAvailable && ProjectRed.isAPIAvailable)
|
||||
(Mods.ProjectRedTransmission.isAvailable && ProjectRed.isAPIAvailable)
|
||||
}
|
||||
|
@ -4,29 +4,51 @@ import cpw.mods.fml.common.versioning.VersionParser
|
||||
import cpw.mods.fml.common.{Loader, ModAPIManager}
|
||||
|
||||
object Mods {
|
||||
val BattleGear2 = new SimpleMod("battlegear2")
|
||||
val BuildCraftPower = new SimpleMod("BuildCraftAPI|power")
|
||||
|
||||
object IDs {
|
||||
final val BattleGear2 = "battlegear2"
|
||||
final val BuildCraftPower = "BuildCraftAPI|power"
|
||||
final val ComputerCraft = "ComputerCraft"
|
||||
final val ForgeMultipart = "ForgeMultipart"
|
||||
final val GregTech = "gregtech"
|
||||
final val IndustrialCraft2 = "IC2API"
|
||||
final val MineFactoryReloaded = "MineFactoryReloaded"
|
||||
final val NotEnoughItems = "NotEnoughItems"
|
||||
final val PortalGun = "PortalGun"
|
||||
final val ProjectRedTransmission = "ProjRed|Transmission"
|
||||
final val RedLogic = "RedLogic"
|
||||
final val StargateTech2 = "StargateTech2"
|
||||
final val ThermalExpansion = "ThermalExpansion"
|
||||
final val TinkersConstruct = "TConstruct"
|
||||
final val UniversalElectricity = "UniversalElectricity"
|
||||
final val Waila = "Waila"
|
||||
final val WirelessRedstoneCBE = "WR-CBE|Core"
|
||||
final val WirelessRedstoneSV = "WirelessRedstoneCore"
|
||||
}
|
||||
|
||||
val BattleGear2 = new SimpleMod(IDs.BattleGear2)
|
||||
val BuildCraftPower = new SimpleMod(IDs.BuildCraftPower)
|
||||
val ComputerCraft = new SimpleMod("ComputerCraft")
|
||||
val ForgeMultipart = new SimpleMod("ForgeMultipart")
|
||||
val GregTech = new SimpleMod("gregtech")
|
||||
val IndustrialCraft2 = new SimpleMod("IC2")
|
||||
val MineFactoryReloaded = new SimpleMod("MineFactoryReloaded")
|
||||
val NotEnoughItems = new SimpleMod("NotEnoughItems")
|
||||
val PortalGun = new SimpleMod("PortalGun")
|
||||
val ProjectRed = new SimpleMod("ProjRed|Transmission")
|
||||
val RedLogic = new SimpleMod("RedLogic")
|
||||
val ForgeMultipart = new SimpleMod(IDs.ForgeMultipart)
|
||||
val GregTech = new SimpleMod(IDs.GregTech)
|
||||
val IndustrialCraft2 = new SimpleMod(IDs.IndustrialCraft2)
|
||||
val MineFactoryReloaded = new SimpleMod(IDs.MineFactoryReloaded)
|
||||
val NotEnoughItems = new SimpleMod(IDs.NotEnoughItems)
|
||||
val PortalGun = new SimpleMod(IDs.PortalGun)
|
||||
val ProjectRedTransmission = new SimpleMod(IDs.ProjectRedTransmission)
|
||||
val RedLogic = new SimpleMod(IDs.RedLogic)
|
||||
val StargateTech2 = new Mod {
|
||||
val isAvailable = Loader.isModLoaded("StargateTech2") && {
|
||||
val mod = Loader.instance.getIndexedModList.get("StargateTech2")
|
||||
val isAvailable = Loader.isModLoaded(IDs.StargateTech2) && {
|
||||
val mod = Loader.instance.getIndexedModList.get(IDs.StargateTech2)
|
||||
mod.getVersion.startsWith("0.7.")
|
||||
}
|
||||
}
|
||||
val ThermalExpansion = new SimpleMod("ThermalExpansion")
|
||||
val TinkersConstruct = new SimpleMod("TConstruct")
|
||||
val UniversalElectricity = new SimpleMod("UniversalElectricity@[3.1,)")
|
||||
val Waila = new SimpleMod("Waila")
|
||||
val WirelessRedstoneCBE = new SimpleMod("WR-CBE|Core")
|
||||
val WirelessRedstoneSV = new SimpleMod("WirelessRedstoneCore")
|
||||
val ThermalExpansion = new SimpleMod(IDs.ThermalExpansion)
|
||||
val TinkersConstruct = new SimpleMod(IDs.TinkersConstruct)
|
||||
val UniversalElectricity = new SimpleMod(IDs.UniversalElectricity + "@[3.1,)")
|
||||
val Waila = new SimpleMod(IDs.Waila)
|
||||
val WirelessRedstoneCBE = new SimpleMod(IDs.WirelessRedstoneCBE)
|
||||
val WirelessRedstoneSV = new SimpleMod(IDs.WirelessRedstoneSV)
|
||||
|
||||
trait Mod {
|
||||
def isAvailable: Boolean
|
||||
|
@ -10,7 +10,7 @@ import mcp.mobius.waila.api.{IWailaConfigHandler, IWailaDataAccessor, IWailaData
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
object Waila {
|
||||
@Optional.Method(modid = "Waila")
|
||||
@Optional.Method(modid = Mods.IDs.Waila)
|
||||
def init(registrar: IWailaRegistrar) {
|
||||
registrar.registerBodyProvider(BlockDataProvider, classOf[Delegator[_]])
|
||||
registrar.registerSyncedNBTKey(Settings.namespace + "node", classOf[tileentity.Capacitor])
|
||||
|
Loading…
x
Reference in New Issue
Block a user