mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 18:30:27 -04:00
Merge branch 'master-MC1.7.10' into master-MC1.10
This commit is contained in:
commit
56eaafabdc
@ -200,13 +200,6 @@ object SaveHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def cleanSaveData(): Unit = {
|
def cleanSaveData(): Unit = {
|
||||||
while (!chunkDirs.isEmpty) {
|
|
||||||
val chunkPath = chunkDirs.poll()
|
|
||||||
if (chunkPath.exists && chunkPath.isDirectory && chunkPath.list() != null) {
|
|
||||||
for (file <- chunkPath.listFiles() if System.currentTimeMillis() - file.lastModified() > TimeToHoldOntoOldSaves) file.delete()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete empty folders to keep the state folder clean.
|
// Delete empty folders to keep the state folder clean.
|
||||||
val emptyDirs = savePath.listFiles(new FileFilter {
|
val emptyDirs = savePath.listFiles(new FileFilter {
|
||||||
override def accept(file: File) = file.isDirectory &&
|
override def accept(file: File) = file.isDirectory &&
|
||||||
|
@ -389,7 +389,7 @@ object DebugCard {
|
|||||||
def setGameType(context: Context, args: Arguments): Array[AnyRef] =
|
def setGameType(context: Context, args: Arguments): Array[AnyRef] =
|
||||||
withPlayer(player => {
|
withPlayer(player => {
|
||||||
val gametype = args.checkString(0)
|
val gametype = args.checkString(0)
|
||||||
player.setGameType(GameType.values.find(_.name == gametype).getOrElse(GameType.SURVIVAL))
|
player.setGameType(GameType.values.find(_.getName == gametype).getOrElse(GameType.SURVIVAL))
|
||||||
null
|
null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -83,7 +83,8 @@ class UpgradeNavigation(val host: EnvironmentHost with Rotatable) extends prefab
|
|||||||
Map(
|
Map(
|
||||||
"position" -> Array(delta.xCoord, delta.yCoord, delta.zCoord),
|
"position" -> Array(delta.xCoord, delta.yCoord, delta.zCoord),
|
||||||
"redstone" -> waypoint.maxInput,
|
"redstone" -> waypoint.maxInput,
|
||||||
"label" -> waypoint.label
|
"label" -> waypoint.label,
|
||||||
|
"address" -> waypoint.node.address()
|
||||||
)
|
)
|
||||||
}).toArray)
|
}).toArray)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user