Make mod compile against 1.19.3

This commit is contained in:
DBotThePony 2024-01-01 22:15:32 +07:00
parent b9f6b65900
commit 2aa084290b
Signed by: DBot
GPG Key ID: DCC23B5715498507
5 changed files with 2 additions and 32 deletions

View File

@ -87,7 +87,7 @@ fun addItemModels(provider: MatteryItemModelProvider) {
provider.handheld(MItems.TRITANIUM_TOOLS)
provider.armorColored(MItems.TRITANIUM_ARMOR)
provider.armorWithTrims(MItems.SIMPLE_TRITANIUM_ARMOR)
provider.generated(MItems.SIMPLE_TRITANIUM_ARMOR)
provider.handheld(MItems.CHEST_UPGRADER)

View File

@ -82,29 +82,6 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event
}
}
fun armorWithTrims(item: Item, texture: ResourceLocation) = exec {
val mainModel = withExistingParent(item.registryName!!.path, GENERATED).texture("layer0", texture)
if (item is ArmorItem) {
for ((i, material) in ARMOR_TRIM_MATERIALS.withIndex()) {
val trimLocation = ResourceLocation("trims/items/${item.type.getName()}_trim_${material}")
existingFileHelper.trackGenerated(trimLocation, PackType.CLIENT_RESOURCES, ".png", "textures")
val overrideModel = withExistingParent("${item.registryName!!.path}_${material}_trim", GENERATED)
.texture("layer0", texture)
.texture("layer1", trimLocation)
mainModel.override()
.predicate(ItemModelGenerators.TRIM_TYPE_PREDICATE_ID, (i + 1).toFloat() / ARMOR_TRIM_MATERIALS.size.toFloat())
.model(overrideModel)
.end()
}
}
}
fun armorWithTrims(vararg items: Item) = items.forEach { armorWithTrims(it, modLocation("item/${it.registryName!!.path}")) }
fun armorWithTrims(items: Collection<Item>) = items.forEach { armorWithTrims(it, modLocation("item/${it.registryName!!.path}")) }
fun armorColored(item: Item) = exec {
withExistingParent(item.registryName!!.path, GENERATED)
.texture("layer0", modLocation("item/${item.registryName!!.path}_base"))

View File

@ -462,7 +462,7 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) {
.build(consumer)
MatteryRecipe(MItems.PAINTER, category = machinesCategory)
.row(Items.BRUSH, Items.BUCKET, Items.BUCKET)
.row(Tags.Items.RODS_WOODEN, Items.BUCKET, Items.BUCKET)
.row(MItemTags.IRON_PLATES, Items.BUCKET, MItemTags.IRON_PLATES)
.row(MItemTags.IRON_PLATES, MItemTags.CRAFTING_TABLES, MItemTags.IRON_PLATES)
.unlockedBy(Tags.Items.DYES)

View File

@ -119,14 +119,8 @@ fun addTags(tagsProvider: TagsProvider) {
tagsProvider.items.Appender(Tags.Items.ARMORS_BOOTS)
.add(MItems.TRITANIUM_BOOTS, MItems.SIMPLE_TRITANIUM_BOOTS)
tagsProvider.items.Appender(ItemTags.TRIMMABLE_ARMOR).add(MItems.SIMPLE_TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.FREEZE_IMMUNE_WEARABLES).add(MItems.TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.SWORDS).add(MItems.TRITANIUM_SWORD).add(MItems.ENERGY_SWORD)
tagsProvider.items.Appender(ItemTags.AXES).add(MItems.TRITANIUM_AXE)
tagsProvider.items.Appender(ItemTags.PICKAXES).add(MItems.TRITANIUM_PICKAXE)
tagsProvider.items.Appender(ItemTags.SHOVELS).add(MItems.TRITANIUM_SHOVEL)
tagsProvider.items.Appender(ItemTags.SHOVELS).add(MItems.TRITANIUM_HOE)
tagsProvider.items.Appender(Tags.Items.SHEARS).add(MItems.TRITANIUM_SHEARS)
tagsProvider.items.Appender(Tags.Items.TOOLS_SHIELDS).add(MItems.TRITANIUM_SHIELD)

View File

@ -168,7 +168,6 @@ class TagsProvider(private val event: GatherDataEvent) {
val blocks = Delegate(ForgeRegistries.BLOCKS)
val items = Delegate(ForgeRegistries.ITEMS)
val mobEffects = Delegate(ForgeRegistries.MOB_EFFECTS)
val damageTypes = Delegate(Registries.DAMAGE_TYPE)
val androidImmuneEffects = mobEffects.Appender(MatteryPlayerCapability.ANDROID_IMMUNE_EFFECTS)