Switch Kotlin version to 1.0.0
This commit is contained in:
@@ -6,7 +6,7 @@ version = "2.0.3"
|
|||||||
archivesBaseName = rootProject.name + '-MC1.8'
|
archivesBaseName = rootProject.name + '-MC1.8'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.0.0-beta-4589'
|
ext.kotlin_version = '1.0.0'
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
|
|||||||
*/
|
*/
|
||||||
class BlockMatcher(val domain: String, val path: String) : ConfigPropertyBase() {
|
class BlockMatcher(val domain: String, val path: String) : ConfigPropertyBase() {
|
||||||
|
|
||||||
val blackList = linkedListOf<Class<*>>()
|
val blackList = mutableListOf<Class<*>>()
|
||||||
val whiteList = linkedListOf<Class<*>>()
|
val whiteList = mutableListOf<Class<*>>()
|
||||||
val blockIDs = hashSetOf<Int>()
|
val blockIDs = hashSetOf<Int>()
|
||||||
var blacklistProperty: Property? = null
|
var blacklistProperty: Property? = null
|
||||||
var whitelistProperty: Property? = null
|
var whitelistProperty: Property? = null
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.util.*
|
|||||||
class EntityRisingSoulFX(world: World, pos: BlockPos) :
|
class EntityRisingSoulFX(world: World, pos: BlockPos) :
|
||||||
AbstractEntityFX(world, pos.x.toDouble() + 0.5, pos.y.toDouble() + 1.0, pos.z.toDouble() + 0.5) {
|
AbstractEntityFX(world, pos.x.toDouble() + 0.5, pos.y.toDouble() + 1.0, pos.z.toDouble() + 0.5) {
|
||||||
|
|
||||||
val particleTrail: Deque<Double3> = linkedListOf()
|
val particleTrail: Deque<Double3> = LinkedList<Double3>()
|
||||||
val initialPhase = rand.nextInt(64)
|
val initialPhase = rand.nextInt(64)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class TextureMatcher() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val mappings: MutableList<Mapping> = linkedListOf()
|
val mappings: MutableList<Mapping> = mutableListOf()
|
||||||
|
|
||||||
fun getType(icon: TextureAtlasSprite): String? = mappings.filter { it.matches(icon) }.map { it.type }.firstOrNull()
|
fun getType(icon: TextureAtlasSprite): String? = mappings.filter { it.matches(icon) }.map { it.type }.firstOrNull()
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ data class Quad(val v1: Vertex, val v2: Vertex, val v3: Vertex, val v4: Vertex)
|
|||||||
*/
|
*/
|
||||||
class Model() {
|
class Model() {
|
||||||
constructor(other: List<Quad>) : this() { quads.addAll(other) }
|
constructor(other: List<Quad>) : this() { quads.addAll(other) }
|
||||||
val quads = linkedListOf<Quad>()
|
val quads = mutableListOf<Quad>()
|
||||||
|
|
||||||
fun Quad.add() = quads.add(this)
|
fun Quad.add() = quads.add(this)
|
||||||
fun Iterable<Quad>.addAll() = forEach { quads.add(it) }
|
fun Iterable<Quad>.addAll() = forEach { quads.add(it) }
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ abstract class ModelDataInspector {
|
|||||||
abstract class BlockTextureInspector<T> : ModelDataInspector() {
|
abstract class BlockTextureInspector<T> : ModelDataInspector() {
|
||||||
|
|
||||||
val state2Names = hashMapOf<IBlockState, Iterable<String>>()
|
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>()
|
val stateMap = hashMapOf<IBlockState, T>()
|
||||||
|
|
||||||
fun match(textureNames: Iterable<String>, predicate: (IBlockState, IModel)->Boolean) =
|
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) {
|
open class ResourceHandler(val modId: String) {
|
||||||
|
|
||||||
val resources = linkedListOf<Any>()
|
val resources = mutableListOf<Any>()
|
||||||
open fun afterStitch() {}
|
open fun afterStitch() {}
|
||||||
|
|
||||||
// ============================
|
// ============================
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ abstract class TextureGenerator(domain: String) : ParameterBasedGenerator(domain
|
|||||||
*/
|
*/
|
||||||
fun getMultisizeTexture(maxSize: Int, maskPath: (Int)->ResourceLocation): IResource? {
|
fun getMultisizeTexture(maxSize: Int, maskPath: (Int)->ResourceLocation): IResource? {
|
||||||
var size = maxSize
|
var size = maxSize
|
||||||
val sizes = linkedListOf<Int>()
|
val sizes = mutableListOf<Int>()
|
||||||
while(size > 2) { sizes.add(size); size /= 2 }
|
while(size > 2) { sizes.add(size); size /= 2 }
|
||||||
return sizes.map { resourceManager[maskPath(it)] }.filterNotNull().firstOrNull()
|
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. */
|
/** The [Configuration] backing this config object. */
|
||||||
var config: Configuration? = null
|
var config: Configuration? = null
|
||||||
val rootGuiElements = linkedListOf<IConfigElement>()
|
val rootGuiElements = mutableListOf<IConfigElement>()
|
||||||
|
|
||||||
/** Attach this config object to the given [Configuration] and update all properties. */
|
/** Attach this config object to the given [Configuration] and update all properties. */
|
||||||
fun attach(config: Configuration) {
|
fun attach(config: Configuration) {
|
||||||
|
|||||||
Reference in New Issue
Block a user