Post merge fixes for 1.19.2

This commit is contained in:
DBotThePony 2024-01-04 21:01:04 +07:00
parent 53ee56fdd5
commit 5f337b1d1f
Signed by: DBot
GPG Key ID: DCC23B5715498507
9 changed files with 15 additions and 17 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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<DyeColor?, Item>, 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<DyeColor?, Item>, path: String, suffix: String) {
for (color in DyeColor.entries) {
for (color in DyeColor.values()) {
block(items[color]!!, path + "_${color.name.lowercase()}$suffix")
}

View File

@ -99,7 +99,7 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve
}
fun colored(modelName: String, suffix: String, textureKeys: Map<String, String>) {
for (color in DyeColor.entries) {
for (color in DyeColor.values()) {
exec {
val model = withExistingParent(modelName + "_${color.name.lowercase()}$suffix", modLocation(modelName + suffix))

View File

@ -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]!!

View File

@ -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,

View File

@ -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,

View File

@ -68,14 +68,14 @@ enum class BlockRotationFreedom(vararg values: BlockRotation) {
private val twoDirection = EnumMap<Direction, EnumMap<Direction, BlockRotation>>(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, BlockRotation>(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()

View File

@ -83,8 +83,8 @@ class StripedColoredDecorativeBlock(
}
override fun registerItems(registry: DeferredRegister<Item>) {
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<Block>) {
for (base in DyeColor.entries) {
for (stripe in DyeColor.entries) {
for (base in DyeColor.values()) {
for (stripe in DyeColor.values()) {
if (base == stripe) {
continue
}