mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-08 06:41:23 -04:00
Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.8
Conflicts: src/main/scala/li/cil/oc/common/block/Hologram.scala
This commit is contained in:
commit
962e6fdb64
@ -1,7 +1,13 @@
|
||||
package li.cil.oc.api;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
import li.cil.oc.api.detail.*;
|
||||
import li.cil.oc.api.detail.DriverAPI;
|
||||
import li.cil.oc.api.detail.FileSystemAPI;
|
||||
import li.cil.oc.api.detail.ItemAPI;
|
||||
import li.cil.oc.api.detail.MachineAPI;
|
||||
import li.cil.oc.api.detail.ManualAPI;
|
||||
import li.cil.oc.api.detail.NanomachinesAPI;
|
||||
import li.cil.oc.api.detail.NetworkAPI;
|
||||
|
||||
/**
|
||||
* Central reference for the API.
|
||||
@ -12,7 +18,25 @@ import li.cil.oc.api.detail.*;
|
||||
*/
|
||||
public class API {
|
||||
public static final String ID_OWNER = "OpenComputers|Core";
|
||||
public static final String VERSION = "5.6.2";
|
||||
public static final String VERSION = "5.6.3";
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
/**
|
||||
* The loaded config.
|
||||
*/
|
||||
public static Config config = null;
|
||||
|
||||
/**
|
||||
* Whether OpenComputers uses power.
|
||||
* <p/>
|
||||
* This is set in the init phase, so do not rely it before the post-init phase.
|
||||
*/
|
||||
public static boolean isPowerEnabled = false;
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
// Prefer using the static methods in the respective classes in this package
|
||||
// over accessing these instances directly.
|
||||
|
||||
public static DriverAPI driver = null;
|
||||
public static FileSystemAPI fileSystem = null;
|
||||
@ -22,5 +46,8 @@ public class API {
|
||||
public static NanomachinesAPI nanomachines = null;
|
||||
public static NetworkAPI network = null;
|
||||
|
||||
public static Config config = null;
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
private API() {
|
||||
}
|
||||
}
|
||||
|
@ -1153,6 +1153,10 @@ opencomputers {
|
||||
# the *worst case* is ~30KB/s/client. Again, for normal use-cases this
|
||||
# is actually barely noticeable.
|
||||
setRawDelay: 0.2
|
||||
|
||||
# Whether the hologram block should provide light. It'll also emit light
|
||||
# when off, because having state-based light in MC is... painful.
|
||||
emitLight: true
|
||||
}
|
||||
|
||||
# Other settings that you might find useful to tweak.
|
||||
|
@ -309,6 +309,7 @@ class Settings(val config: Config) {
|
||||
Array(0.25, 0.5)
|
||||
}
|
||||
val hologramSetRawDelay = config.getDouble("hologram.setRawDelay") max 0
|
||||
val hologramLight = config.getBoolean("hologram.emitLight")
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
// misc
|
||||
|
@ -101,6 +101,8 @@ class Proxy {
|
||||
|
||||
OpenComputers.log.info("Initializing recipes.")
|
||||
Recipes.init()
|
||||
|
||||
api.API.isPowerEnabled = !Settings.get.ignorePower
|
||||
}
|
||||
|
||||
def postInit(e: FMLPostInitializationEvent) {
|
||||
|
@ -2,8 +2,8 @@ package li.cil.oc.common.block
|
||||
|
||||
import java.util
|
||||
|
||||
import li.cil.oc.Settings
|
||||
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
|
||||
@ -17,7 +17,9 @@ import net.minecraftforge.fml.relauncher.Side
|
||||
import net.minecraftforge.fml.relauncher.SideOnly
|
||||
|
||||
class Hologram(val tier: Int) extends SimpleBlock {
|
||||
ModColoredLights.setLightLevel(this, 15, 15, 15)
|
||||
if (Settings.get.hologramLight) {
|
||||
ModColoredLights.setLightLevel(this, 15, 15, 15)
|
||||
}
|
||||
setBlockBounds(0, 0, 0, 1, 0.5f, 1)
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
Loading…
x
Reference in New Issue
Block a user