mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-22 11:52:38 -04:00
Merge branch 'master' of https://github.com/MightyPirates/OpenComputers into MC1.7
Conflicts: README.md build.gradle gradle/wrapper/gradle-wrapper.jar gradle/wrapper/gradle-wrapper.properties src/api/java/universalelectricity/api/CompatibilityModule.java src/api/java/universalelectricity/api/energy/IEnergyContainer.java src/api/java/universalelectricity/api/energy/IEnergyInterface.java src/api/java/universalelectricity/api/net/IConnectable.java src/main/java/li/cil/oc/client/TexturePreloader.scala src/main/java/li/cil/oc/common/block/Keyboard.scala src/main/java/universalelectricity/api/UniversalClass.java src/main/scala/li/cil/oc/CraftingHandler.scala src/main/scala/li/cil/oc/client/TexturePreloader.scala src/main/scala/li/cil/oc/client/Textures.scala src/main/scala/li/cil/oc/common/ConnectionHandler.scala src/main/scala/li/cil/oc/common/block/Keyboard.scala src/main/scala/li/cil/oc/common/block/KeyboardDeprecated.scala src/main/scala/li/cil/oc/common/launch/TransformerLoader.scala src/main/scala/li/cil/oc/common/tileentity/Hologram.scala src/main/scala/li/cil/oc/server/TickHandler.scala src/main/scala/li/cil/oc/util/mods/UniversalElectricity.scala
This commit is contained in:
commit
d2b04bceff
@ -18,7 +18,7 @@ Extending
|
||||
---------
|
||||
You can implement your own item and block components using [the public API](https://github.com/MightyPirates/OpenComputers/tree/master/src/main/java/li/cil/oc/api), which unlike the rest of the mod is in plain Java, so you don't have to know or learn Scala.
|
||||
|
||||
Note that to get the OC JARs working in your development environment you'll want to run [BON](https://github.com/immibis/bearded-octo-nemesis) over it, first (I'll see when I find the time to make Jenkins produce a deobfed artifact), unless you don't need the class transformer (i.e. you don't use the `SimpleComponent` interface).
|
||||
Use the deobfuscated artifact from one of the [Jenkins builds](http://ci.cil.li/) in your development environment and OpenComputers *should* work without problems. If it doesn't please let me know.
|
||||
|
||||
If you have any questions about the API or how to add OC support to your mod, please don't hesitate to ask, either on the Forums or on IRC!
|
||||
|
||||
@ -26,7 +26,7 @@ Building
|
||||
========
|
||||
Java
|
||||
----
|
||||
You'll need a Forge development environment set up with support for Scala. There are no dependencies other than the bundled APIs.
|
||||
Just run `gradlew build`!
|
||||
|
||||
Natives
|
||||
-------
|
||||
|
@ -21,9 +21,14 @@ local filename = shell.resolve(args[1])
|
||||
|
||||
local readonly = options.r or fs.get(filename) == nil or fs.get(filename).isReadOnly()
|
||||
|
||||
if fs.isDirectory(filename) or readonly and not fs.exists(filename) then
|
||||
io.stderr:write("file not found")
|
||||
return
|
||||
if not fs.exists(filename) then
|
||||
if fs.isDirectory(filename) then
|
||||
io.stderr:write("file is a directory")
|
||||
return
|
||||
elseif readonly then
|
||||
io.stderr:write("file system is read only")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
term.clear()
|
||||
|
@ -44,7 +44,7 @@ class Analyzer(val parent: Delegator) extends Delegate {
|
||||
}
|
||||
}
|
||||
|
||||
private def analyzeNodes(nodes: Array[Node], player: EntityPlayerMP) = if (nodes != null) for (node <- nodes) {
|
||||
private def analyzeNodes(nodes: Array[Node], player: EntityPlayerMP) = if (nodes != null) for (node <- nodes if node != null) {
|
||||
node match {
|
||||
case connector: Connector =>
|
||||
if (connector.localBufferSize > 0) {
|
||||
|
@ -7,8 +7,9 @@ import li.cil.oc.{Settings, api}
|
||||
import net.minecraft.nbt.NBTTagCompound
|
||||
import net.minecraft.util.AxisAlignedBB
|
||||
import net.minecraftforge.common.util.ForgeDirection
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
|
||||
class Hologram extends Environment with SidedEnvironment {
|
||||
class Hologram extends Environment with SidedEnvironment with Analyzable {
|
||||
val node = api.Network.newNode(this, Visibility.Network).
|
||||
withComponent("hologram").
|
||||
withConnector().
|
||||
@ -65,6 +66,8 @@ class Hologram extends Environment with SidedEnvironment {
|
||||
|
||||
override def sidedNode(side: ForgeDirection) = if (side == ForgeDirection.DOWN) node else null
|
||||
|
||||
override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = Array(node)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
@Callback(doc = """function() -- Clears the hologram.""")
|
||||
|
Loading…
x
Reference in New Issue
Block a user