Switch Kotlin version to 1.0.0
This commit is contained in:
@@ -91,7 +91,7 @@ data class Quad(val v1: Vertex, val v2: Vertex, val v3: Vertex, val v4: Vertex)
|
||||
*/
|
||||
class Model() {
|
||||
constructor(other: List<Quad>) : this() { quads.addAll(other) }
|
||||
val quads = linkedListOf<Quad>()
|
||||
val quads = mutableListOf<Quad>()
|
||||
|
||||
fun Quad.add() = quads.add(this)
|
||||
fun Iterable<Quad>.addAll() = forEach { quads.add(it) }
|
||||
|
||||
@@ -53,7 +53,7 @@ abstract class ModelDataInspector {
|
||||
abstract class BlockTextureInspector<T> : ModelDataInspector() {
|
||||
|
||||
val state2Names = hashMapOf<IBlockState, Iterable<String>>()
|
||||
val modelMappings = linkedListOf<Pair<(IBlockState, IModel)->Boolean, Iterable<String>>>()
|
||||
val modelMappings = mutableListOf<Pair<(IBlockState, IModel)->Boolean, Iterable<String>>>()
|
||||
val stateMap = hashMapOf<IBlockState, T>()
|
||||
|
||||
fun match(textureNames: Iterable<String>, predicate: (IBlockState, IModel)->Boolean) =
|
||||
|
||||
@@ -34,7 +34,7 @@ interface IWorldLoadListener { fun onWorldLoad(world: World) }
|
||||
*/
|
||||
open class ResourceHandler(val modId: String) {
|
||||
|
||||
val resources = linkedListOf<Any>()
|
||||
val resources = mutableListOf<Any>()
|
||||
open fun afterStitch() {}
|
||||
|
||||
// ============================
|
||||
|
||||
@@ -79,7 +79,7 @@ abstract class TextureGenerator(domain: String) : ParameterBasedGenerator(domain
|
||||
*/
|
||||
fun getMultisizeTexture(maxSize: Int, maskPath: (Int)->ResourceLocation): IResource? {
|
||||
var size = maxSize
|
||||
val sizes = linkedListOf<Int>()
|
||||
val sizes = mutableListOf<Int>()
|
||||
while(size > 2) { sizes.add(size); size /= 2 }
|
||||
return sizes.map { resourceManager[maskPath(it)] }.filterNotNull().firstOrNull()
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class DelegatingConfig(val modId: String, val langPrefix: String) {
|
||||
|
||||
/** The [Configuration] backing this config object. */
|
||||
var config: Configuration? = null
|
||||
val rootGuiElements = linkedListOf<IConfigElement>()
|
||||
val rootGuiElements = mutableListOf<IConfigElement>()
|
||||
|
||||
/** Attach this config object to the given [Configuration] and update all properties. */
|
||||
fun attach(config: Configuration) {
|
||||
|
||||
Reference in New Issue
Block a user