Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.
Merged
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 build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {

allprojects {
group = "io.github.solid-resourcepack"
version = "1.21-1.0.1"
version = "1.21-1.0.2"

repositories {
mavenCentral()
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidColormapMaterialTexture(
public val key: Lazy<Key>,
) {
FOLIAGE(lazy { Key.key("minecraft:colormap/foliage") }),
GRASS(lazy { Key.key("minecraft:colormap/grass") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidEffectMaterialTexture(
public val key: Lazy<Key>,
) {
DITHER(lazy { Key.key("minecraft:effect/dither") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidEnvironmentMaterialTexture(
public val key: Lazy<Key>,
) {
CLOUDS(lazy { Key.key("minecraft:environment/clouds") }),
END_SKY(lazy { Key.key("minecraft:environment/end_sky") }),
MOON_PHASES(lazy { Key.key("minecraft:environment/moon_phases") }),
RAIN(lazy { Key.key("minecraft:environment/rain") }),
SNOW(lazy { Key.key("minecraft:environment/snow") }),
SUN(lazy { Key.key("minecraft:environment/sun") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidFontMaterialTexture(
public val key: Lazy<Key>,
) {
ACCENTED(lazy { Key.key("minecraft:font/accented") }),
ASCII(lazy { Key.key("minecraft:font/ascii") }),
ASCIILLAGER(lazy { Key.key("minecraft:font/asciillager") }),
ASCII_SGA(lazy { Key.key("minecraft:font/ascii_sga") }),
NONLATIN_EUROPEAN(lazy { Key.key("minecraft:font/nonlatin_european") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidMapMaterialTexture(
public val key: Lazy<Key>,
) {
MAP_BACKGROUND(lazy { Key.key("minecraft:map/map_background") }),
MAP_BACKGROUND_CHECKERBOARD(lazy { Key.key("minecraft:map/map_background_checkerboard") }),
BLACK_BANNER(lazy { Key.key("minecraft:map/decorations/black_banner") }),
BLUE_BANNER(lazy { Key.key("minecraft:map/decorations/blue_banner") }),
BLUE_MARKER(lazy { Key.key("minecraft:map/decorations/blue_marker") }),
BROWN_BANNER(lazy { Key.key("minecraft:map/decorations/brown_banner") }),
CYAN_BANNER(lazy { Key.key("minecraft:map/decorations/cyan_banner") }),
DESERT_VILLAGE(lazy { Key.key("minecraft:map/decorations/desert_village") }),
FRAME(lazy { Key.key("minecraft:map/decorations/frame") }),
GRAY_BANNER(lazy { Key.key("minecraft:map/decorations/gray_banner") }),
GREEN_BANNER(lazy { Key.key("minecraft:map/decorations/green_banner") }),
JUNGLE_TEMPLE(lazy { Key.key("minecraft:map/decorations/jungle_temple") }),
LIGHT_BLUE_BANNER(lazy { Key.key("minecraft:map/decorations/light_blue_banner") }),
LIGHT_GRAY_BANNER(lazy { Key.key("minecraft:map/decorations/light_gray_banner") }),
LIME_BANNER(lazy { Key.key("minecraft:map/decorations/lime_banner") }),
MAGENTA_BANNER(lazy { Key.key("minecraft:map/decorations/magenta_banner") }),
OCEAN_MONUMENT(lazy { Key.key("minecraft:map/decorations/ocean_monument") }),
ORANGE_BANNER(lazy { Key.key("minecraft:map/decorations/orange_banner") }),
PINK_BANNER(lazy { Key.key("minecraft:map/decorations/pink_banner") }),
PLAINS_VILLAGE(lazy { Key.key("minecraft:map/decorations/plains_village") }),
PLAYER(lazy { Key.key("minecraft:map/decorations/player") }),
PLAYER_OFF_LIMITS(lazy { Key.key("minecraft:map/decorations/player_off_limits") }),
PLAYER_OFF_MAP(lazy { Key.key("minecraft:map/decorations/player_off_map") }),
PURPLE_BANNER(lazy { Key.key("minecraft:map/decorations/purple_banner") }),
RED_BANNER(lazy { Key.key("minecraft:map/decorations/red_banner") }),
RED_MARKER(lazy { Key.key("minecraft:map/decorations/red_marker") }),
RED_X(lazy { Key.key("minecraft:map/decorations/red_x") }),
SAVANNA_VILLAGE(lazy { Key.key("minecraft:map/decorations/savanna_village") }),
SNOWY_VILLAGE(lazy { Key.key("minecraft:map/decorations/snowy_village") }),
SWAMP_HUT(lazy { Key.key("minecraft:map/decorations/swamp_hut") }),
TAIGA_VILLAGE(lazy { Key.key("minecraft:map/decorations/taiga_village") }),
TARGET_POINT(lazy { Key.key("minecraft:map/decorations/target_point") }),
TARGET_X(lazy { Key.key("minecraft:map/decorations/target_x") }),
TRIAL_CHAMBERS(lazy { Key.key("minecraft:map/decorations/trial_chambers") }),
WHITE_BANNER(lazy { Key.key("minecraft:map/decorations/white_banner") }),
WOODLAND_MANSION(lazy { Key.key("minecraft:map/decorations/woodland_mansion") }),
YELLOW_BANNER(lazy { Key.key("minecraft:map/decorations/yellow_banner") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package io.github.solid.resourcepack.material

import net.kyori.adventure.key.Key

data class SolidMaterialTexture(
val key: Key
) {
companion object {
fun exists(key: Key): Boolean {
if (key.namespace() != Key.MINECRAFT_NAMESPACE) return false
val split = key.value().split("/")
val type = split.first().uppercase()
val value = split.last().uppercase()
return when (type) {
"BLOCK" -> try {
SolidBlockMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"ITEM" -> try {
SolidItemMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"MODELS" -> try {
SolidModelsMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"GUI" -> try {
SolidGuiMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"ENTITY" -> try {
SolidEntityMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"PARTICLE" -> try {
SolidParticleMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"ENVIRONMENT" -> try {
SolidEnvironmentMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"MISC" -> try {
SolidMiscMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"PAINTING" -> try {
SolidPaintingMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"FONT" -> try {
SolidFontMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"MAP" -> try {
SolidMapMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"COLORMAP" -> try {
SolidColormapMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"EFFECT" -> try {
SolidEffectMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"TRIMS" -> try {
SolidTrimsMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

"MOB_EFFECT" -> try {
SolidMobEffectMaterialTexture.valueOf(value); true
} catch (ignored: Exception) {
false
}

else -> false
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidMiscMaterialTexture(
public val key: Lazy<Key>,
) {
CREDITS_VIGNETTE(lazy { Key.key("minecraft:misc/credits_vignette") }),
PUMPKINBLUR(lazy { Key.key("minecraft:misc/pumpkinblur") }),
SHADOW(lazy { Key.key("minecraft:misc/shadow") }),
VIGNETTE(lazy { Key.key("minecraft:misc/vignette") }),
ENCHANTED_GLINT_ENTITY(lazy { Key.key("minecraft:misc/enchanted_glint_entity") }),
ENCHANTED_GLINT_ITEM(lazy { Key.key("minecraft:misc/enchanted_glint_item") }),
FORCEFIELD(lazy { Key.key("minecraft:misc/forcefield") }),
NAUSEA(lazy { Key.key("minecraft:misc/nausea") }),
POWDER_SNOW_OUTLINE(lazy { Key.key("minecraft:misc/powder_snow_outline") }),
SPYGLASS_SCOPE(lazy { Key.key("minecraft:misc/spyglass_scope") }),
UNDERWATER(lazy { Key.key("minecraft:misc/underwater") }),
UNKNOWN_PACK(lazy { Key.key("minecraft:misc/unknown_pack") }),
UNKNOWN_SERVER(lazy { Key.key("minecraft:misc/unknown_server") }),
WHITE(lazy { Key.key("minecraft:misc/white") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidMobEffectMaterialTexture(
public val key: Lazy<Key>,
) {
ABSORPTION(lazy { Key.key("minecraft:mob_effect/absorption") }),
BAD_OMEN(lazy { Key.key("minecraft:mob_effect/bad_omen") }),
BLINDNESS(lazy { Key.key("minecraft:mob_effect/blindness") }),
CONDUIT_POWER(lazy { Key.key("minecraft:mob_effect/conduit_power") }),
DARKNESS(lazy { Key.key("minecraft:mob_effect/darkness") }),
DOLPHINS_GRACE(lazy { Key.key("minecraft:mob_effect/dolphins_grace") }),
FIRE_RESISTANCE(lazy { Key.key("minecraft:mob_effect/fire_resistance") }),
GLOWING(lazy { Key.key("minecraft:mob_effect/glowing") }),
HASTE(lazy { Key.key("minecraft:mob_effect/haste") }),
HEALTH_BOOST(lazy { Key.key("minecraft:mob_effect/health_boost") }),
HERO_OF_THE_VILLAGE(lazy { Key.key("minecraft:mob_effect/hero_of_the_village") }),
HUNGER(lazy { Key.key("minecraft:mob_effect/hunger") }),
INFESTED(lazy { Key.key("minecraft:mob_effect/infested") }),
INSTANT_DAMAGE(lazy { Key.key("minecraft:mob_effect/instant_damage") }),
INSTANT_HEALTH(lazy { Key.key("minecraft:mob_effect/instant_health") }),
INVISIBILITY(lazy { Key.key("minecraft:mob_effect/invisibility") }),
JUMP_BOOST(lazy { Key.key("minecraft:mob_effect/jump_boost") }),
LEVITATION(lazy { Key.key("minecraft:mob_effect/levitation") }),
LUCK(lazy { Key.key("minecraft:mob_effect/luck") }),
MINING_FATIGUE(lazy { Key.key("minecraft:mob_effect/mining_fatigue") }),
NAUSEA(lazy { Key.key("minecraft:mob_effect/nausea") }),
NIGHT_VISION(lazy { Key.key("minecraft:mob_effect/night_vision") }),
OOZING(lazy { Key.key("minecraft:mob_effect/oozing") }),
POISON(lazy { Key.key("minecraft:mob_effect/poison") }),
RAID_OMEN(lazy { Key.key("minecraft:mob_effect/raid_omen") }),
REGENERATION(lazy { Key.key("minecraft:mob_effect/regeneration") }),
RESISTANCE(lazy { Key.key("minecraft:mob_effect/resistance") }),
SATURATION(lazy { Key.key("minecraft:mob_effect/saturation") }),
SLOWNESS(lazy { Key.key("minecraft:mob_effect/slowness") }),
SLOW_FALLING(lazy { Key.key("minecraft:mob_effect/slow_falling") }),
SPEED(lazy { Key.key("minecraft:mob_effect/speed") }),
STRENGTH(lazy { Key.key("minecraft:mob_effect/strength") }),
TRIAL_OMEN(lazy { Key.key("minecraft:mob_effect/trial_omen") }),
UNLUCK(lazy { Key.key("minecraft:mob_effect/unluck") }),
WATER_BREATHING(lazy { Key.key("minecraft:mob_effect/water_breathing") }),
WEAKNESS(lazy { Key.key("minecraft:mob_effect/weakness") }),
WEAVING(lazy { Key.key("minecraft:mob_effect/weaving") }),
WIND_CHARGED(lazy { Key.key("minecraft:mob_effect/wind_charged") }),
WITHER(lazy { Key.key("minecraft:mob_effect/wither") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package io.github.solid.resourcepack.material

import kotlin.Lazy
import net.kyori.adventure.key.Key

public enum class SolidModelsMaterialTexture(
public val key: Lazy<Key>,
) {
CHAINMAIL_LAYER_1(lazy { Key.key("minecraft:models/armor/chainmail_layer_1") }),
CHAINMAIL_LAYER_2(lazy { Key.key("minecraft:models/armor/chainmail_layer_2") }),
DIAMOND_LAYER_1(lazy { Key.key("minecraft:models/armor/diamond_layer_1") }),
DIAMOND_LAYER_2(lazy { Key.key("minecraft:models/armor/diamond_layer_2") }),
GOLD_LAYER_1(lazy { Key.key("minecraft:models/armor/gold_layer_1") }),
GOLD_LAYER_2(lazy { Key.key("minecraft:models/armor/gold_layer_2") }),
IRON_LAYER_1(lazy { Key.key("minecraft:models/armor/iron_layer_1") }),
IRON_LAYER_2(lazy { Key.key("minecraft:models/armor/iron_layer_2") }),
LEATHER_LAYER_1(lazy { Key.key("minecraft:models/armor/leather_layer_1") }),
LEATHER_LAYER_1_OVERLAY(lazy { Key.key("minecraft:models/armor/leather_layer_1_overlay") }),
LEATHER_LAYER_2(lazy { Key.key("minecraft:models/armor/leather_layer_2") }),
LEATHER_LAYER_2_OVERLAY(lazy { Key.key("minecraft:models/armor/leather_layer_2_overlay") }),
NETHERITE_LAYER_1(lazy { Key.key("minecraft:models/armor/netherite_layer_1") }),
NETHERITE_LAYER_2(lazy { Key.key("minecraft:models/armor/netherite_layer_2") }),
TURTLE_LAYER_1(lazy { Key.key("minecraft:models/armor/turtle_layer_1") }),
;

public fun toGeneric(): SolidMaterialTexture = SolidMaterialTexture(key.value)
}
Loading