mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 01:10:19 -04:00
Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.8
Conflicts: build.gradle build.properties src/main/scala/li/cil/oc/client/renderer/block/Assembler.scala src/main/scala/li/cil/oc/common/block/Assembler.scala src/main/scala/li/cil/oc/common/block/Geolyzer.scala src/main/scala/li/cil/oc/common/block/Hologram.scala src/main/scala/li/cil/oc/common/block/PowerDistributor.scala src/main/scala/li/cil/oc/common/block/Screen.scala src/main/scala/li/cil/oc/integration/fmp/CablePart.scala
This commit is contained in:
commit
22fe034609
34
build.gradle
34
build.gradle
@ -119,7 +119,14 @@ repositories {
|
||||
name 'DVS1 Maven FS'
|
||||
url 'http://dvs1.progwml6.com/files/maven'
|
||||
}
|
||||
|
||||
maven {
|
||||
name 'ProjectRed'
|
||||
url 'http://files.projectredwiki.com/maven/'
|
||||
}
|
||||
maven {
|
||||
name 'ColoredLightCore'
|
||||
url "http://coloredlightscore.us.to/maven/clc/"
|
||||
}
|
||||
ivy {
|
||||
name "BuildCraft"
|
||||
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
|
||||
@ -132,19 +139,18 @@ repositories {
|
||||
name 'Mekanism'
|
||||
artifactPattern "http://ci.cil.li/job/Mekanism/${config.mekanism.build}/artifact/output/[module]-${config.minecraft.version}-[revision].${config.mekanism.build}.[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'ProjectRed'
|
||||
artifactPattern "http://projectredwiki.com/maven/mrtjp/[module]/${config.minecraft.version}-[revision]/[module]-${config.minecraft.version}-[revision]-dev.[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'immibis'
|
||||
artifactPattern "https://dl.dropboxusercontent.com/u/2944265/mods/autobuilt/files/[module]-[revision].[ext]"
|
||||
}
|
||||
|
||||
ivy {
|
||||
name 'CoFHLib'
|
||||
artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofhlib.cf}/[module]-[revision].[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'CoFHCore'
|
||||
artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofhcore.cf}/[module]-[revision].[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'MineFactoryReloaded'
|
||||
artifactPattern "http://addons-origin.cursecdn.com/files/${config.mfr.cf}/[module]-[revision].[ext]"
|
||||
@ -185,7 +191,9 @@ dependencies {
|
||||
provided "mcp.mobius.waila:Waila:${config.waila.version}:dev"
|
||||
/*
|
||||
provided "appeng:RotaryCraft:${config.rotc.version}:api"
|
||||
provided "appeng:appliedenergistics2:${config.ae2.version}:dev"
|
||||
provided ("appeng:appliedenergistics2:${config.ae2.version}:dev") {
|
||||
exclude module: 'buildcraft'
|
||||
}
|
||||
provided "codechicken:EnderStorage:${config.minecraft.version}-${config.es.version}:dev"
|
||||
provided "codechicken:ForgeMultipart:${config.minecraft.version}-${config.fmp.version}:dev"
|
||||
provided "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev"
|
||||
@ -199,15 +207,19 @@ dependencies {
|
||||
provided "notenoughkeys:NeK:${config.minecraft.version}-${config.nek.version}:deobf-dev"
|
||||
provided "qmunity:QmunityLib:${config.qmunitylib.version}:deobf"
|
||||
provided "tmech:TMechworks:${config.minecraft.version}-${config.tmech.version}:deobf"
|
||||
provided ("mrtjp:ProjectRed:${config.projred.version}:dev") {
|
||||
exclude module: 'CoFHCore'
|
||||
}
|
||||
provided "coloredlightscore:ColoredLightsCore:${config.coloredlights.version}:api"
|
||||
|
||||
provided name: "buildcraft", version: "${config.bc.version}", classifier: "dev", ext: 'jar'
|
||||
provided name: 'buildcraft', version: config.bc.version, classifier: "dev", ext: 'jar'
|
||||
provided name: 'GalacticraftCoreAll', version: config.gc.version, ext: 'jar'
|
||||
provided name: 'MekanismAll', version: config.mekanism.version, ext: 'jar'
|
||||
provided name: 'ProjectRed', version: config.projred.version, ext: 'jar'
|
||||
provided name: 'redlogic', version: config.redlogic.version, ext: 'jar'
|
||||
|
||||
provided name: 'CoFHLib', version: URLEncoder.encode(config.cofhlib.version, "UTF-8"), ext: 'jar'
|
||||
provided name: 'MineFactoryReloaded', version: URLEncoder.encode(config.mfr.version, "UTF-8"), ext: 'jar'
|
||||
provided name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
|
||||
provided name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
|
||||
provided name: 'MineFactoryReloaded', version: config.mfr.version, ext: 'jar'
|
||||
provided name: 'ComputerCraft', version: config.cc.version, ext: 'jar'
|
||||
provided name: 'EnderIO', version: config.eio.version, ext: 'jar'
|
||||
provided name: 'Railcraft', version: config.rc.version, ext: 'jar'
|
||||
|
@ -1,7 +1,7 @@
|
||||
minecraft.version=1.8
|
||||
forge.version=11.14.3.1450
|
||||
|
||||
oc.version=1.5.13
|
||||
oc.version=1.5.14
|
||||
oc.subversion=dev
|
||||
|
||||
ae2.version=rv2-beta-26
|
||||
@ -15,6 +15,7 @@ ccc.version=1.0.5.34
|
||||
ccl.version=1.1.2.115
|
||||
cofhlib.cf=2230/207
|
||||
cofhlib.version=[1.7.10]1.0.0RC7-127
|
||||
coloredlights.version=1.3.7.35
|
||||
ec.cf=2242/839
|
||||
ec.version=deobf-1.7.10-2.2.73b129
|
||||
eio.cf=2219/296
|
||||
@ -34,7 +35,7 @@ mfr.version=[1.7.10]2.8.0RC8-86
|
||||
nei.version=1.0.5.82
|
||||
nek.version=1.0.0b35dev
|
||||
poweradvantage.version=1.2.0
|
||||
projred.version=4.7.0pre2.87
|
||||
projred.version=1.7.10-4.6.2.82
|
||||
qmunitylib.version=0.1.105
|
||||
rc.cf=2219/321
|
||||
rc.version=1.7.10-9.4.0.0
|
||||
@ -44,5 +45,7 @@ tmech.version=75.0afb56c
|
||||
re.version=3.0.0.342
|
||||
waila.version=1.6.0_B1_1.8.1
|
||||
wrcbe.version=1.4.1.2
|
||||
cofhcore.cf=2246/697
|
||||
cofhcore.version=[1.7.10]3.0.3B4-302-dev
|
||||
|
||||
maven.url=file:///home/www/maven.cil.li/web
|
@ -3,6 +3,7 @@ package li.cil.oc.common.block
|
||||
import li.cil.oc.Settings
|
||||
import li.cil.oc.common.GuiType
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.integration.coloredlights.ModColoredLights
|
||||
import net.minecraft.block.state.IBlockState
|
||||
import net.minecraft.util.BlockPos
|
||||
import net.minecraft.util.EnumFacing
|
||||
@ -10,7 +11,7 @@ import net.minecraft.world.IBlockAccess
|
||||
import net.minecraft.world.World
|
||||
|
||||
class Assembler extends SimpleBlock with traits.PowerAcceptor with traits.StateAware with traits.GUI {
|
||||
setLightLevel(0.34f)
|
||||
ModColoredLights.setLightLevel(this, 0, 3, 5)
|
||||
|
||||
override def isOpaqueCube = false
|
||||
|
||||
|
@ -3,13 +3,15 @@ package li.cil.oc.common.block
|
||||
import java.util.Random
|
||||
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.integration.coloredlights.ModColoredLights
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.state.IBlockState
|
||||
import net.minecraft.util.BlockPos
|
||||
import net.minecraft.world.World
|
||||
|
||||
class Capacitor extends SimpleBlock {
|
||||
setLightLevel(0.34f)
|
||||
ModColoredLights.setLightLevel(this, 5, 5, 5)
|
||||
|
||||
setTickRandomly(true)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -1,11 +1,12 @@
|
||||
package li.cil.oc.common.block
|
||||
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.integration.coloredlights.ModColoredLights
|
||||
import net.minecraft.block.state.IBlockState
|
||||
import net.minecraft.world.World
|
||||
|
||||
class Geolyzer extends SimpleBlock {
|
||||
setLightLevel(0.14f)
|
||||
ModColoredLights.setLightLevel(this, 3, 1, 1)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
|
@ -3,6 +3,7 @@ package li.cil.oc.common.block
|
||||
import java.util
|
||||
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.integration.coloredlights.ModColoredLights
|
||||
import li.cil.oc.util.Rarity
|
||||
import li.cil.oc.util.Tooltip
|
||||
import net.minecraft.block.state.IBlockState
|
||||
@ -16,7 +17,7 @@ import net.minecraftforge.fml.relauncher.Side
|
||||
import net.minecraftforge.fml.relauncher.SideOnly
|
||||
|
||||
class Hologram(val tier: Int) extends SimpleBlock {
|
||||
setLightLevel(1)
|
||||
ModColoredLights.setLightLevel(this, 15, 15, 15)
|
||||
setBlockBounds(0, 0, 0, 1, 0.5f, 1)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -1,11 +1,12 @@
|
||||
package li.cil.oc.common.block
|
||||
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.integration.coloredlights.ModColoredLights
|
||||
import net.minecraft.block.state.IBlockState
|
||||
import net.minecraft.world.World
|
||||
|
||||
class PowerDistributor extends SimpleBlock {
|
||||
setLightLevel(0.34f)
|
||||
ModColoredLights.setLightLevel(this, 5, 5, 3)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
|
@ -8,6 +8,7 @@ import li.cil.oc.Settings
|
||||
import li.cil.oc.api
|
||||
import li.cil.oc.common.GuiType
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.integration.coloredlights.ModColoredLights
|
||||
import li.cil.oc.integration.util.Wrench
|
||||
import li.cil.oc.util.Color
|
||||
import li.cil.oc.util.PackedColor
|
||||
@ -33,7 +34,7 @@ import net.minecraftforge.fml.relauncher.SideOnly
|
||||
import scala.collection.mutable.ArrayBuffer
|
||||
|
||||
class Screen(val tier: Int) extends RedstoneAware with traits.OmniRotatable {
|
||||
setLightLevel(0.34f)
|
||||
ModColoredLights.setLightLevel(this, 5, 5, 5)
|
||||
|
||||
override def isSideSolid(world: IBlockAccess, pos: BlockPos, side: EnumFacing) = toLocal(world, pos, side) != EnumFacing.SOUTH
|
||||
|
||||
@ -89,7 +90,7 @@ class Screen(val tier: Int) extends RedstoneAware with traits.OmniRotatable {
|
||||
if (Wrench.holdsApplicableWrench(player, pos) && getValidRotations(world, pos).contains(side) && !force) false
|
||||
else if (api.Items.get(player.getHeldItem) == api.Items.get(Constants.ItemName.Analyzer)) false
|
||||
else world.getTileEntity(pos) match {
|
||||
case screen: tileentity.Screen if screen.hasKeyboard && (force || player.isSneaking == screen.invertTouchMode) =>
|
||||
case screen: tileentity.Screen if screen.hasKeyboard && (force || player.isSneaking == screen.origin.invertTouchMode) =>
|
||||
// Yep, this GUI is actually purely client side. We could skip this
|
||||
// if, but it is clearer this way (to trigger it from the server we
|
||||
// would have to give screens a "container", which we do not want).
|
||||
|
@ -13,6 +13,8 @@ import net.minecraftforge.fml.relauncher.SideOnly
|
||||
class NetSplitter extends traits.Environment with traits.RedstoneAware with api.network.SidedEnvironment {
|
||||
private final val SideCount = EnumFacing.values().length
|
||||
|
||||
_isOutputEnabled = true
|
||||
|
||||
val node = api.Network.newNode(this, Visibility.None).
|
||||
create()
|
||||
|
||||
|
@ -244,7 +244,7 @@ class Screen(var tier: Int) extends traits.TextBuffer with SidedEnvironment with
|
||||
}
|
||||
})
|
||||
}
|
||||
if (arrows.size > 0) {
|
||||
if (arrows.nonEmpty) {
|
||||
for (arrow <- arrows) {
|
||||
val hitX = arrow.posX - x
|
||||
val hitY = arrow.posY - y
|
||||
|
@ -32,6 +32,7 @@ object Mods {
|
||||
val CoFHItem = new SimpleMod(IDs.CoFHItem)
|
||||
val CoFHTileEntity = new SimpleMod(IDs.CoFHTileEntity)
|
||||
val CoFHTransport = new SimpleMod(IDs.CoFHTransport)
|
||||
val ColoredLights = new SimpleMod(IDs.ColoredLights)
|
||||
val ComputerCraft = new SimpleMod(IDs.ComputerCraft, version = "@[1.73,)")
|
||||
val CraftingCosts = new SimpleMod(IDs.CraftingCosts)
|
||||
val DeepStorageUnit = new ClassBasedMod(IDs.DeepStorageUnit, "powercrystals.minefactoryreloaded.api.IDeepStorageUnit")()
|
||||
@ -167,6 +168,7 @@ object Mods {
|
||||
final val CoFHItem = "CoFHAPI|item"
|
||||
final val CoFHTileEntity = "CoFHAPI|tileentity"
|
||||
final val CoFHTransport = "CoFHAPI|transport"
|
||||
final val ColoredLights = "easycoloredlights"
|
||||
final val ComputerCraft = "ComputerCraft"
|
||||
final val CraftingCosts = "CraftingCosts"
|
||||
final val ElectricalAge = "Eln"
|
||||
@ -176,8 +178,7 @@ object Mods {
|
||||
final val Factorization = "factorization"
|
||||
final val Forestry = "Forestry"
|
||||
final val ForgeMultipart = "ForgeMultipart"
|
||||
final val DeepStorageUnit = "MineFactoryReloaded|DeepStorageUnit"
|
||||
// Doesn't really exist.
|
||||
final val DeepStorageUnit = "MineFactoryReloaded|DeepStorageUnit" // Doesn't really exist.
|
||||
final val Galacticraft = "Galacticraft API"
|
||||
final val GregTech = "gregtech"
|
||||
final val IndustrialCraft2 = "IC2"
|
||||
|
@ -0,0 +1,29 @@
|
||||
package li.cil.oc.integration.coloredlights
|
||||
|
||||
/* TODO Colored Lights
|
||||
import coloredlightscore.src.api.CLApi
|
||||
*/
|
||||
import li.cil.oc.integration.Mods
|
||||
import net.minecraft.block.Block
|
||||
|
||||
// Doesn't need initialization, just a thin wrapper for block light value initialization.
|
||||
object ModColoredLights {
|
||||
def setLightLevel(block: Block, r: Int, g: Int, b: Int): Unit = {
|
||||
// Extra layer of indirection because I've learned to be paranoid when it comes to class loading...
|
||||
if (Mods.ColoredLights.isAvailable)
|
||||
setColoredLightLevel(block, r, g, b)
|
||||
else
|
||||
setPlainLightLevel(block, r, g, b)
|
||||
}
|
||||
|
||||
private def setColoredLightLevel(block: Block, r: Int, g: Int, b: Int): Unit = {
|
||||
/* TODO Colored Lights
|
||||
CLApi.setBlockColorRGB(block, r, g, b)
|
||||
*/
|
||||
}
|
||||
|
||||
private def setPlainLightLevel(block: Block, r: Int, g: Int, b: Int): Unit = {
|
||||
val brightness = Array(r, g, b).max
|
||||
block.setLightLevel((brightness + 0.1f) / 15f)
|
||||
}
|
||||
}
|
@ -4,6 +4,10 @@ import codechicken.lib.data.MCDataInput
|
||||
import codechicken.lib.data.MCDataOutput
|
||||
import codechicken.lib.vec.Cuboid6
|
||||
import codechicken.lib.vec.Vector3
|
||||
import codechicken.microblock.ISidedHollowConnect
|
||||
import codechicken.multipart._
|
||||
import cpw.mods.fml.relauncher.Side
|
||||
import cpw.mods.fml.relauncher.SideOnly
|
||||
import li.cil.oc.Constants
|
||||
import li.cil.oc.Settings
|
||||
import li.cil.oc.api
|
||||
@ -27,7 +31,7 @@ import net.minecraft.util.MovingObjectPosition
|
||||
import scala.collection.convert.WrapAsJava
|
||||
import scala.collection.convert.WrapAsScala._
|
||||
|
||||
class CablePart(val original: Option[tileentity.Cable] = None) extends SimpleBlockPart with TCuboidPart with TNormalOcclusion with network.Environment {
|
||||
class CablePart(val original: Option[tileentity.Cable] = None) extends SimpleBlockPart with TCuboidPart with TSlottedPart with ISidedHollowConnect with TNormalOcclusion with network.Environment {
|
||||
val node = api.Network.newNode(this, Visibility.None).create()
|
||||
|
||||
private var _color = Color.LightGray
|
||||
@ -64,6 +68,11 @@ class CablePart(val original: Option[tileentity.Cable] = None) extends SimpleBlo
|
||||
|
||||
override def getRenderBounds = new Cuboid6(Cable.bounds(world, x, y, z).offset(x, y, z))
|
||||
|
||||
override def getHollowSize(side: Int) = 4 // 4 pixels as this is width of cable.
|
||||
|
||||
override def getSlotMask = 1 << 6 // 6 is center part.
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
override def activate(player: EntityPlayer, hit: MovingObjectPosition, item: ItemStack) = {
|
||||
|
@ -27,7 +27,7 @@ object DriverAPU extends DriverCPU with HostAware with EnvironmentAware {
|
||||
|
||||
override def cpuTier(stack: ItemStack) =
|
||||
Delegator.subItem(stack) match {
|
||||
case Some(apu: common.item.APU) => apu.tier
|
||||
case Some(apu: common.item.APU) => apu.cpuTier
|
||||
case _ => Tier.One
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ abstract class DriverCPU extends Item with Processor {
|
||||
|
||||
def cpuTier(stack: ItemStack): Int =
|
||||
Delegator.subItem(stack) match {
|
||||
case Some(cpu: item.CPU) => cpu.tier
|
||||
case Some(cpu: item.CPU) => cpu.cpuTier
|
||||
case _ => Tier.One
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ object DriverGraphicsCard extends Item with HostAware with EnvironmentAware {
|
||||
|
||||
override def tier(stack: ItemStack) =
|
||||
Delegator.subItem(stack) match {
|
||||
case Some(gpu: common.item.GraphicsCard) => gpu.tier
|
||||
case Some(gpu: common.item.GraphicsCard) => gpu.gpuTier
|
||||
case _ => Tier.One
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user