Post merge fixes for 1.19.2
This commit is contained in:
parent
53ee56fdd5
commit
5f337b1d1f
@ -517,9 +517,9 @@ object DataGen {
|
|||||||
event.generator.addProvider(event.includeServer(), blockStateProvider)
|
event.generator.addProvider(event.includeServer(), blockStateProvider)
|
||||||
event.generator.addProvider(event.includeClient(), itemModelProvider)
|
event.generator.addProvider(event.includeClient(), itemModelProvider)
|
||||||
event.generator.addProvider(event.includeServer(), recipeProvider)
|
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))
|
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.includeClient(), BatteryBankProvider(event, null))
|
||||||
event.generator.addProvider(event.includeServer(), lootTableProvider)
|
event.generator.addProvider(event.includeServer(), lootTableProvider)
|
||||||
event.generator.addProvider(event.includeServer(), lootModifier)
|
event.generator.addProvider(event.includeServer(), lootModifier)
|
||||||
|
@ -160,7 +160,7 @@ fun addItemModels(provider: MatteryItemModelProvider) {
|
|||||||
provider.block(MItems.TRITANIUM_TRAPDOOR[null]!!, "tritanium_trapdoor_bottom")
|
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")
|
provider.block(MItems.TRITANIUM_TRAPDOOR[color]!!, "tritanium_trapdoor_${color.name.lowercase()}_bottom")
|
||||||
|
|
||||||
for (item in MRegistry.CARGO_CRATES.allItems.values)
|
for (item in MRegistry.CARGO_CRATES.allItems.values)
|
||||||
|
@ -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 block(item: Item, path: String) = exec { withExistingParent(item.registryName!!.path, modLocation("block/$path")) }
|
||||||
|
|
||||||
fun coloredWithBaseBlock(items: Map<DyeColor?, Item>, path: String) {
|
fun coloredWithBaseBlock(items: Map<DyeColor?, Item>, path: String) {
|
||||||
for (color in DyeColor.entries) {
|
for (color in DyeColor.values()) {
|
||||||
block(items[color]!!, path + "_${color.name.lowercase()}")
|
block(items[color]!!, path + "_${color.name.lowercase()}")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun coloredWithBaseBlock(items: Map<DyeColor?, Item>, path: String, suffix: String) {
|
fun coloredWithBaseBlock(items: Map<DyeColor?, Item>, path: String, suffix: String) {
|
||||||
for (color in DyeColor.entries) {
|
for (color in DyeColor.values()) {
|
||||||
block(items[color]!!, path + "_${color.name.lowercase()}$suffix")
|
block(items[color]!!, path + "_${color.name.lowercase()}$suffix")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun colored(modelName: String, suffix: String, textureKeys: Map<String, String>) {
|
fun colored(modelName: String, suffix: String, textureKeys: Map<String, String>) {
|
||||||
for (color in DyeColor.entries) {
|
for (color in DyeColor.values()) {
|
||||||
exec {
|
exec {
|
||||||
val model = withExistingParent(modelName + "_${color.name.lowercase()}$suffix", modLocation(modelName + suffix))
|
val model = withExistingParent(modelName + "_${color.name.lowercase()}$suffix", modLocation(modelName + suffix))
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu
|
|||||||
DyeColor.BLACK to Items.BLACK_STAINED_GLASS,
|
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 item = MRegistry.INDUSTRIAL_GLASS.items[color]!!
|
||||||
val paneItem = MRegistry.INDUSTRIAL_GLASS_PANE.items[color]!!
|
val paneItem = MRegistry.INDUSTRIAL_GLASS_PANE.items[color]!!
|
||||||
val mappedVanilla = mappingUpgradeVanilla[color]!!
|
val mappedVanilla = mappingUpgradeVanilla[color]!!
|
||||||
|
@ -21,8 +21,7 @@ class TritaniumDoorBlock(val color: DyeColor?) : DoorBlock(
|
|||||||
.explosionResistance(80f)
|
.explosionResistance(80f)
|
||||||
.noOcclusion()
|
.noOcclusion()
|
||||||
.destroyTime(3f)
|
.destroyTime(3f)
|
||||||
.requiresCorrectToolForDrops(),
|
.requiresCorrectToolForDrops()
|
||||||
SoundEvents.IRON_DOOR_CLOSE, SoundEvents.IRON_DOOR_OPEN
|
|
||||||
) {
|
) {
|
||||||
override fun appendHoverText(
|
override fun appendHoverText(
|
||||||
p_49816_: ItemStack,
|
p_49816_: ItemStack,
|
||||||
|
@ -21,8 +21,7 @@ class TritaniumTrapdoorBlock(val color: DyeColor?) : TrapDoorBlock(
|
|||||||
.explosionResistance(80f)
|
.explosionResistance(80f)
|
||||||
.noOcclusion().destroyTime(3f)
|
.noOcclusion().destroyTime(3f)
|
||||||
.requiresCorrectToolForDrops()
|
.requiresCorrectToolForDrops()
|
||||||
.isValidSpawn { _: BlockState, _: BlockGetter, _: BlockPos, _: EntityType<*>? -> false },
|
.isValidSpawn { _: BlockState, _: BlockGetter, _: BlockPos, _: EntityType<*>? -> false }
|
||||||
SoundEvents.IRON_DOOR_CLOSE, SoundEvents.IRON_DOOR_OPEN
|
|
||||||
) {
|
) {
|
||||||
override fun appendHoverText(
|
override fun appendHoverText(
|
||||||
p_49816_: ItemStack,
|
p_49816_: ItemStack,
|
||||||
|
@ -68,14 +68,14 @@ enum class BlockRotationFreedom(vararg values: BlockRotation) {
|
|||||||
private val twoDirection = EnumMap<Direction, EnumMap<Direction, BlockRotation>>(Direction::class.java)
|
private val twoDirection = EnumMap<Direction, EnumMap<Direction, BlockRotation>>(Direction::class.java)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
for (direction in Direction.entries) {
|
for (direction in Direction.values()) {
|
||||||
oneDirection[direction] = possibleValues.firstOrNull { it.front == direction }
|
oneDirection[direction] = possibleValues.firstOrNull { it.front == direction }
|
||||||
?: possibleValues.first()
|
?: possibleValues.first()
|
||||||
|
|
||||||
val second = EnumMap<Direction, BlockRotation>(Direction::class.java)
|
val second = EnumMap<Direction, BlockRotation>(Direction::class.java)
|
||||||
twoDirection[direction] = second
|
twoDirection[direction] = second
|
||||||
|
|
||||||
for (direction2 in Direction.entries) {
|
for (direction2 in Direction.values()) {
|
||||||
second[direction2] = possibleValues.firstOrNull { it.front == direction && it.top == direction2 }
|
second[direction2] = possibleValues.firstOrNull { it.front == direction && it.top == direction2 }
|
||||||
?: possibleValues.firstOrNull { it.front == direction }
|
?: possibleValues.firstOrNull { it.front == direction }
|
||||||
?: possibleValues.first()
|
?: possibleValues.first()
|
||||||
|
@ -83,8 +83,8 @@ class StripedColoredDecorativeBlock(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun registerItems(registry: DeferredRegister<Item>) {
|
override fun registerItems(registry: DeferredRegister<Item>) {
|
||||||
for (base in DyeColor.entries) {
|
for (base in DyeColor.values()) {
|
||||||
for (stripe in DyeColor.entries) {
|
for (stripe in DyeColor.values()) {
|
||||||
if (base == stripe) {
|
if (base == stripe) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -98,8 +98,8 @@ class StripedColoredDecorativeBlock(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun registerBlocks(registry: DeferredRegister<Block>) {
|
override fun registerBlocks(registry: DeferredRegister<Block>) {
|
||||||
for (base in DyeColor.entries) {
|
for (base in DyeColor.values()) {
|
||||||
for (stripe in DyeColor.entries) {
|
for (stripe in DyeColor.values()) {
|
||||||
if (base == stripe) {
|
if (base == stripe) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user