Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with armour strip. #164

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

modVersion = 1.20.1-1.1.0-beta.1
modVersion = 1.20.1-1.1.0-beta.2
mcVersion = 1.20.1
projectId = 480779
modId = temporalsmith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// 1.20.1 2023-11-24T11:59:52.3856983 atlases generator for temporalsmith
2e3aee5600cc51902b39e716ab778c83910090b2 assets/minecraft/atlases/armor_trims.json
// 1.20.1 2024-01-20T19:17:50.66474 atlases generator for temporalsmith
76927df2f4e630fbd00ac1b9578f5b41d66a10bc assets/minecraft/atlases/blocks.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
*/
package io.github.realyusufismail.temporalsmith.datagen.spirit

import com.google.common.collect.ImmutableMap
import io.github.realyusufismail.temporalsmith.TemporalSmith
import io.github.realyusufismail.temporalsmith.TemporalSmith.TemporalSmith.MOD_ID
import java.util.*
import net.minecraft.client.renderer.texture.atlas.sources.PalettedPermutations
import net.minecraft.client.renderer.texture.atlas.sources.SingleFile
import net.minecraft.data.PackOutput
import net.minecraft.resources.ResourceLocation
import net.minecraftforge.common.data.ExistingFileHelper
import net.minecraftforge.common.data.SpriteSourceProvider

Expand All @@ -34,8 +31,6 @@ class ModSpriteSourceProvider(output: PackOutput, exFileHelper: ExistingFileHelp
SpriteSourceProvider(output, exFileHelper, MOD_ID) {
override fun addSources() {
val blockAtlas = atlas(BLOCKS_ATLAS)
val armorTrimsAtlas = atlas(ResourceLocation("armor_trims"))

blockAtlas.addSource(
SingleFile(TemporalSmith.getModIdAndName("entity/shield/ruby"), Optional.empty()))

Expand All @@ -50,27 +45,5 @@ class ModSpriteSourceProvider(output: PackOutput, exFileHelper: ExistingFileHelp

blockAtlas.addSource(
SingleFile(TemporalSmith.getModIdAndName("entity/shield/graphite"), Optional.empty()))

// Add the armor trims to ruby armor
armorTrimsAtlas.addSource(
PalettedPermutations(
listOf(
TemporalSmith.getModIdAndName("trims/items/ruby_head_trim"),
TemporalSmith.getModIdAndName("trims/items/ruby_chest_trim"),
TemporalSmith.getModIdAndName("trims/items/ruby_legs_trim"),
TemporalSmith.getModIdAndName("trims/items/ruby_feet_trim")),
ResourceLocation("trims/color_palettes/trim_palette"),
ImmutableMap.builder<String, ResourceLocation>()
.put("ruby_emerald", ResourceLocation("trims/color_palettes/emerald"))
.put("ruby_lapis", ResourceLocation("trims/color_palettes/lapis"))
.put("ruby_diamond", ResourceLocation("trims/color_palettes/diamond"))
.put("ruby_gold", ResourceLocation("trims/color_palettes/gold"))
.put("ruby_iron", ResourceLocation("trims/color_palettes/iron"))
.put("ruby_redstone", ResourceLocation("trims/color_palettes/redstone"))
.put("ruby_coal", ResourceLocation("trims/color_palettes/coal"))
.put("ruby_copper", ResourceLocation("trims/color_palettes/copper"))
.put("ruby_quartz", ResourceLocation("trims/color_palettes/quartz"))
.put("ruby_amethyst", ResourceLocation("trims/color_palettes/amethyst"))
.build()))
}
}
Loading