Add optional enchantment glint

This commit is contained in:
Ampflower 🌺 2025-03-11 18:47:00 -07:00
parent 4180170b74
commit 0e06c39b36
No known key found for this signature in database
GPG Key ID: FC0397C90D508D7F
6 changed files with 28 additions and 3 deletions

View File

@ -43,9 +43,8 @@ public class JoyClient implements ClientModInitializer {
ParticleFactoryRegistry.getInstance().register(JoyParticles.TOTEM_OF_PRIDE_PARTICLE, TotemOfPrideParticle.Factory::new);
final ModContainer self = FabricLoader.getInstance().getModContainer(Joy.MOD_ID).orElseThrow();
ResourceManagerHelper.registerBuiltinResourcePack(JoyUtil.id("menu"), self, Text.of("Joy's Main Menu & HUD"), ResourcePackActivationType.DEFAULT_ENABLED);
JoyUtil.registerEnabledPack("menu", Text.of("Joy's Main Menu & HUD"));
JoyUtil.registerEnabledPack("glint", Text.of("Joy's Enchantment Glint"));
}
private static void registerBedBlockRenderLayers() {

View File

@ -1,5 +1,10 @@
package gay.pridecraft.joy;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.fabricmc.fabric.api.resource.ResourcePackActivationType;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
/**
@ -7,7 +12,22 @@ import net.minecraft.util.Identifier;
* @since 1.0.0
**/
public final class JoyUtil {
public static final ModContainer joyContainer =
FabricLoader.getInstance().getModContainer(Joy.MOD_ID).orElseThrow();
public static Identifier id(String name) {
return Identifier.of(Joy.MOD_ID, name);
}
public static void registerEnabledPack(String name, Text text) {
registerPack(name, text, ResourcePackActivationType.DEFAULT_ENABLED);
}
public static void registerPack(String name, Text text) {
registerPack(name, text, ResourcePackActivationType.NORMAL);
}
public static void registerPack(String name, Text text, ResourcePackActivationType type) {
ResourceManagerHelper.registerBuiltinResourcePack(JoyUtil.id(name), joyContainer, text, type);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 34,
"description": "From §cPr§6id§eep§2ac§9k 7§5.0§r"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB