mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-26 22:43:40 -04:00
Merge branch 'master' of https://github.com/MightyPirates/OpenComputers into MC1.7
Conflicts: src/main/java/li/cil/oc/api/prefab/TileEntitySidedEnvironment.java
This commit is contained in:
commit
8b1db646d6
@ -6,7 +6,6 @@ import li.cil.oc.api.network.SidedEnvironment;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import scala.Array;
|
||||
|
||||
/**
|
||||
* TileEntities can implement the {@link li.cil.oc.api.network.SidedEnvironment}
|
||||
@ -61,7 +60,7 @@ public abstract class TileEntitySidedEnvironment extends TileEntity implements S
|
||||
* </pre>
|
||||
*/
|
||||
protected TileEntitySidedEnvironment(final Node... nodes) {
|
||||
Array.copy(nodes, 0, this.nodes, 0, Math.min(nodes.length, this.nodes.length));
|
||||
System.arraycopy(nodes, 0, this.nodes, 0, Math.min(nodes.length, this.nodes.length));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -6,6 +6,7 @@ import java.io._
|
||||
import li.cil.oc.util.PackedColor
|
||||
import org.apache.commons.lang3.StringEscapeUtils
|
||||
import scala.collection.convert.WrapAsScala._
|
||||
import scala.io.Source
|
||||
|
||||
class Settings(config: Config) {
|
||||
// ----------------------------------------------------------------------- //
|
||||
@ -202,12 +203,12 @@ object Settings {
|
||||
// reportedly fixed the problem.
|
||||
val defaults = {
|
||||
val in = classOf[Settings].getResourceAsStream("/reference.conf")
|
||||
val config = ConfigFactory.parseReader(new BufferedReader(new InputStreamReader(in)))
|
||||
val config = Source.fromInputStream(in).mkString.replace("\r\n", "\n")
|
||||
in.close()
|
||||
config
|
||||
ConfigFactory.parseString(config)
|
||||
}
|
||||
try {
|
||||
val config = ConfigFactory.parseFile(file).withFallback(defaults)
|
||||
val config = ConfigFactory.parseString(Source.fromFile(file).mkString.replace("\r\n", "\n")).withFallback(defaults)
|
||||
settings = new Settings(config.getConfig("opencomputers"))
|
||||
|
||||
val renderSettings = ConfigRenderOptions.defaults.setJson(false).setOriginComments(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user