upgrade to recent Forge and MCP mappings

This commit is contained in:
octarine-noise
2016-05-16 12:17:54 +02:00
parent 69db3d6608
commit b5af0fe1c5
18 changed files with 29 additions and 29 deletions

View File

@@ -34,7 +34,7 @@ class BlockMatcher(val domain: String, val path: String) : ConfigPropertyBase()
whiteList.forEach { if (it.isAssignableFrom(blockClass)) return true }
return false
}
fun matchesID(block: Block) = blockIDs.contains(Block.blockRegistry.getIDForObject(block))
fun matchesID(block: Block) = blockIDs.contains(Block.REGISTRY.getIDForObject(block))
fun matchesID(blockId: Int) = blockIDs.contains(blockId)
override fun attach(target: Configuration, langPrefix: String, categoryName: String, propertyName: String) {
@@ -59,8 +59,8 @@ class BlockMatcher(val domain: String, val path: String) : ConfigPropertyBase()
fun updateIDs() {
blockIDs.clear()
Block.blockRegistry.forEach {
if (matchesClass(it as Block)) blockIDs.add(Block.blockRegistry.getIDForObject(it))
Block.REGISTRY.forEach {
if (matchesClass(it as Block)) blockIDs.add(Block.REGISTRY.getIDForObject(it))
}
}

View File

@@ -13,9 +13,9 @@ import net.minecraftforge.fml.relauncher.SideOnly
private fun featureEnable() = boolean(true).lang("enabled")
private fun distanceLimit() = int(min=1, max=1000, default=1000).lang("distance")
fun biomeList(defaults: (BiomeGenBase) -> Boolean) = intList {
BiomeGenBase.biomeRegistry
BiomeGenBase.REGISTRY
.filter { it != null && defaults(it) }
.map { BiomeGenBase.biomeRegistry.getIDForObject(it) }
.map { BiomeGenBase.REGISTRY.getIDForObject(it) }
.toTypedArray()
}.apply { guiClass = BiomeListConfigEntry::class.java }