diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index fcebbdb80..24b1d7f40 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -517,9 +517,9 @@ object DataGen { event.generator.addProvider(event.includeServer(), blockStateProvider) event.generator.addProvider(event.includeClient(), itemModelProvider) event.generator.addProvider(event.includeServer(), recipeProvider) - DyeColor.entries.forEach { event.generator.addProvider(event.includeClient(), MatterBankProvider(event, it)) } + DyeColor.values().forEach { event.generator.addProvider(event.includeClient(), MatterBankProvider(event, it)) } event.generator.addProvider(event.includeClient(), MatterBankProvider(event, null)) - DyeColor.entries.forEach { event.generator.addProvider(event.includeClient(), BatteryBankProvider(event, it)) } + DyeColor.values().forEach { event.generator.addProvider(event.includeClient(), BatteryBankProvider(event, it)) } event.generator.addProvider(event.includeClient(), BatteryBankProvider(event, null)) event.generator.addProvider(event.includeServer(), lootTableProvider) event.generator.addProvider(event.includeServer(), lootModifier) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index 644ba75d4..2a7dc3cc7 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -160,7 +160,7 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.block(MItems.TRITANIUM_TRAPDOOR[null]!!, "tritanium_trapdoor_bottom") - for (color in DyeColor.entries) + for (color in DyeColor.values()) provider.block(MItems.TRITANIUM_TRAPDOOR[color]!!, "tritanium_trapdoor_${color.name.lowercase()}_bottom") for (item in MRegistry.CARGO_CRATES.allItems.values) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt index b90fc0be3..a44d35f25 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt @@ -32,7 +32,7 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event fun block(item: Item, path: String) = exec { withExistingParent(item.registryName!!.path, modLocation("block/$path")) } fun coloredWithBaseBlock(items: Map, path: String) { - for (color in DyeColor.entries) { + for (color in DyeColor.values()) { block(items[color]!!, path + "_${color.name.lowercase()}") } @@ -40,7 +40,7 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event } fun coloredWithBaseBlock(items: Map, path: String, suffix: String) { - for (color in DyeColor.entries) { + for (color in DyeColor.values()) { block(items[color]!!, path + "_${color.name.lowercase()}$suffix") } diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt index 78feb3973..8bbe938dd 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt @@ -99,7 +99,7 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve } fun colored(modelName: String, suffix: String, textureKeys: Map) { - for (color in DyeColor.entries) { + for (color in DyeColor.values()) { exec { val model = withExistingParent(modelName + "_${color.name.lowercase()}$suffix", modLocation(modelName + suffix)) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt index 1d326d9ce..ff875aca4 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt @@ -231,7 +231,7 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu DyeColor.BLACK to Items.BLACK_STAINED_GLASS, ) - for (color in DyeColor.entries) { + for (color in DyeColor.values()) { val item = MRegistry.INDUSTRIAL_GLASS.items[color]!! val paneItem = MRegistry.INDUSTRIAL_GLASS_PANE.items[color]!! val mappedVanilla = mappingUpgradeVanilla[color]!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumDoorBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumDoorBlock.kt index f130ae04d..311efe6d3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumDoorBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumDoorBlock.kt @@ -21,8 +21,7 @@ class TritaniumDoorBlock(val color: DyeColor?) : DoorBlock( .explosionResistance(80f) .noOcclusion() .destroyTime(3f) - .requiresCorrectToolForDrops(), - SoundEvents.IRON_DOOR_CLOSE, SoundEvents.IRON_DOOR_OPEN + .requiresCorrectToolForDrops() ) { override fun appendHoverText( p_49816_: ItemStack, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumTrapdoorBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumTrapdoorBlock.kt index 3d1399c3a..0558fa832 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumTrapdoorBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/TritaniumTrapdoorBlock.kt @@ -21,8 +21,7 @@ class TritaniumTrapdoorBlock(val color: DyeColor?) : TrapDoorBlock( .explosionResistance(80f) .noOcclusion().destroyTime(3f) .requiresCorrectToolForDrops() - .isValidSpawn { _: BlockState, _: BlockGetter, _: BlockPos, _: EntityType<*>? -> false }, - SoundEvents.IRON_DOOR_CLOSE, SoundEvents.IRON_DOOR_OPEN + .isValidSpawn { _: BlockState, _: BlockGetter, _: BlockPos, _: EntityType<*>? -> false } ) { override fun appendHoverText( p_49816_: ItemStack, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt index 6cb7926f4..52dc98d99 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/BlockRotationFreedom.kt @@ -68,14 +68,14 @@ enum class BlockRotationFreedom(vararg values: BlockRotation) { private val twoDirection = EnumMap>(Direction::class.java) init { - for (direction in Direction.entries) { + for (direction in Direction.values()) { oneDirection[direction] = possibleValues.firstOrNull { it.front == direction } ?: possibleValues.first() val second = EnumMap(Direction::class.java) twoDirection[direction] = second - for (direction2 in Direction.entries) { + for (direction2 in Direction.values()) { second[direction2] = possibleValues.firstOrNull { it.front == direction && it.top == direction2 } ?: possibleValues.firstOrNull { it.front == direction } ?: possibleValues.first() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt index 222bd7e31..29dc357a1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt @@ -83,8 +83,8 @@ class StripedColoredDecorativeBlock( } override fun registerItems(registry: DeferredRegister) { - for (base in DyeColor.entries) { - for (stripe in DyeColor.entries) { + for (base in DyeColor.values()) { + for (stripe in DyeColor.values()) { if (base == stripe) { continue } @@ -98,8 +98,8 @@ class StripedColoredDecorativeBlock( } override fun registerBlocks(registry: DeferredRegister) { - for (base in DyeColor.entries) { - for (stripe in DyeColor.entries) { + for (base in DyeColor.values()) { + for (stripe in DyeColor.values()) { if (base == stripe) { continue }