Coder Social home page Coder Social logo

arrp's Introduction

ARRP

Advanced Runtime resource packs (for fabric)

Ever thought having to make 4 jsons for a single block was outrageous? Or why every single item needed it's own json too? Or wanted to create items from templates dynamically depending on the mods loaded without having to pack tons of assets into your mod?

Well RRP is for you then! RRP allows modders to generate assets and data on the fly, you could in theory write an entire mod with blocks and items with nothing but .java files and your mod json! You can make your own json templates so you don't have to make a json file for every single item you add, and even automate it if you're lazy like I am. No need to clutter your project with hundreds of basic json files.

FAQ

Is this compatible with resource packs?

yes, RRP uses a resource pack internally, hence the name, and it's the second to last priority resource pack next to minecraft itself, however this means RRP cannot override mod assets, but it can override vanilla ones.

Adding ARRP

Gradle:

// should work for both groovy and kotlin DSL
repositories {
	maven {
		url = uri("https://ueaj.dev/maven")
		// for 0.4.2 and older
		// url uri("https://raw.githubusercontent.com/Devan-Kerman/Devan-Repo/master/")
	}
}

dependencies {
    modImplementation("net.devtech:arrp:0.8.2")
    // I never break backwards compatibility, so just fetching the latest version should be fine
    // modImplementation("net.devtech:arrp:0.+")
}

Using ARRP

https://github.com/Devan-Kerman/ARRP/wiki

This repository is licenced under the MPLv2 Licence

arrp's People

Contributors

andrew6rant avatar brokkonaut avatar chimericdream avatar devan-kerman avatar hydos avatar leo40git avatar mightyknight avatar neubulae avatar nichrosia avatar nnym avatar ptom76 avatar ramidzkh avatar theonlytails avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

arrp's Issues

Can't set interpolate to true

The property interpolate of animation file (*.png.mcmeta) is defaultly false, but invoking JAnimation#interpolate also sets interpolate to false. There is no way to set interpolate to true.

JLang.entity() uses wrong translation key type

ARRP's JLang.entity() produces translation keys of the form "entity_type.<namespace>.<path>" when it should be "entity.<namespace>.<path>".

The latter can be seen in the Minecraft en_us.json file, e.g. "entity.minecraft.polar_bear": "Polar Bear" and EntityType.getTranslationKey() also uses "entity".

Not a big deal when there's JLang.entityRespect(), just letting you know.
Should be easily fixed by changing these 2 strings here:

public JLang entity(EntityType<?> type, String name) {
return this.object(Registry.ENTITY_TYPE, "entity_type", type, name);

public JLang entity(Identifier id, String name) {
return this.object("entity_type", id, name);

Sound resource/subresource support

With sound resources, a pack only has one file to define them, which is sounds.json.
It's not possible to add multiple sound resources manually with the provided addAsset, as it overwrites the file instead of appending to it. The only way to work around this at the moment is to regenerate the entire file on modification, which is exponentially not very gucci.

advanced_runtime_resource_pack crashing on launch

I don’t have advanced_runtime_resource_pack installed directly but it seems to be causing a crash on launch from inside Modern Industrialization. I’m on Minecraft 1.18 and Fabric launcher 1.12.8. I only got this crash when updating ThonkUtil from 1.3 to 1.4 but the ThonkUtil folks believe it’s not on their end. I also opened a ticket on Modern Industrialization.

The error log I get:
net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:159)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:157)
... 2 more
Caused by: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'preLaunch' provided by 'advanced_runtime_resource_pack'
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:56)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
... 4 more
Caused by: java.lang.RuntimeException: Mixin transformation of net.devtech.arrp.ARRP failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:234)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:136)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at net.fabricmc.loader.impl.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:50)
at net.fabricmc.loader.impl.entrypoint.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:117)
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:53)
... 5 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [mixins.impersonate.common.json:MutableTextMixin] from phase [DEFAULT] in config [mixins.impersonate.common.json] from mod [impersonate] FAILED during PREPARE
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinPrepareError(MixinProcessor.java:585)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:543)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:229)
... 13 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTargetAlreadyLoadedException: Critical problem: mixins.impersonate.common.json:MutableTextMixin target net.minecraft.class_5250 was loaded too early.
at org.spongepowered.asm.mixin.transformer.MixinInfo.readDeclaredTargets(MixinInfo.java:948)
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:882)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:852)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:777)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540)
... 19 more

/reload takes very long (a few minutes)

every time i use /reload, the server log eventually stops at net.devtech.arrp.impl.RuntimeResourcePackImpl close 警告: closing rrp compact:builtin for a few minutes before continue. Because I always need to reload to implement new settings, this is becoming annoying to wait every time. Please consider cutting down the reload process thanks.

Crash when datagen-ing to hard

Right so I use ARRP in order to not make 8000 json files and I found out that at that size, the game crashes due to:

[20:51:38] [main/ERROR] (FabricLoader) Minecraft has crashed!
 net.fabricmc.loader.impl.FormattedException: java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.core.Registry
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:610) ~[fabric-loader-0.12.12.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.12.12.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) [fabric-loader-0.12.12.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.core.Registry
	at net.minecraft.server.Bootstrap.bootStrap(Bootstrap.java:49) ~[[email protected]:?]
	at net.minecraft.client.main.Main.main(Main.java:155) ~[[email protected]:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608) ~[fabric-loader-0.12.12.jar:?]
	... 3 more

Process finished with exit code 1

I managed to stop it by adding

try { 
            TimeUnit.SECONDS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

at the top of RRPPreGenEntrypoint.pregen, but clearly that doesn't seem ideal
Here's the source code of my mod for reference: https://github.com/RacoonDog/Chipped/blob/Fabric-1.18/src/main/java/com/grimbo/chipped/datagen/ChippedDataGen.java

My mod causes this to crash :

A mod crashed on startup!
net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:159)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:157)
... 2 more
Caused by: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'preLaunch' provided by 'advanced_runtime_resource_pack'
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:56)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
... 4 more
Caused by: java.lang.RuntimeException: Mixin transformation of net.devtech.arrp.ARRP failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:252)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at net.fabricmc.loader.impl.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:50)
at net.fabricmc.loader.impl.entrypoint.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:117)
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:53)
... 5 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [idontcare.mixins.json:PackListWidgetRenderMixin] from phase [DEFAULT] in config [idontcare.mixins.json] from mod [idontcare] FAILED during PREPARE
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinPrepareError(MixinProcessor.java:585)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:543)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247)
... 13 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: The specified mixin 'com.unjust1ce.idontcare.mixin.PackListWidgetRenderMixin' was not found
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:865)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:852)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:781)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540)
... 19 more
Caused by: java.lang.ClassNotFoundException: The specified mixin 'com.unjust1ce.idontcare.mixin.PackListWidgetRenderMixin' was not found
at org.spongepowered.asm.mixin.transformer.MixinInfo.loadMixinClass(MixinInfo.java:1314)
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:858)
... 22 more

Crash after updating mods in modpack

Sorry if this isn't relevant or on the wrong modpage, but I cannot read java logs

A mod crashed on startup!
net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:159)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:157)
... 2 more
Caused by: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'preLaunch' provided by 'advanced_runtime_resource_pack'
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:56)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
... 4 more
Caused by: java.lang.RuntimeException: Mixin transformation of net.devtech.arrp.ARRP failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:252)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at net.fabricmc.loader.impl.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:50)
at net.fabricmc.loader.impl.entrypoint.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:117)
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:53)
... 5 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [modid.mixins.json:ExampleMixin] from phase [DEFAULT] in config [modid.mixins.json] from mod [zzz] FAILED during PREPARE
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinPrepareError(MixinProcessor.java:585)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:543)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247)
... 13 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: The specified mixin 'net.fabricmc.example.mixin.ExampleMixin' was not found
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:865)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:852)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:781)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540)
... 19 more
Caused by: java.lang.ClassNotFoundException: The specified mixin 'net.fabricmc.example.mixin.ExampleMixin' was not found
at org.spongepowered.asm.mixin.transformer.MixinInfo.loadMixinClass(MixinInfo.java:1314)
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:858)
... 22 more

How to run this on my client?

Hi, there. I just wrote a mod that used this project, and I can run it in Idea. But when I tried to use my mod in my client, the game crashed with Caused by: java.lang.ClassNotFoundException: net.devtech.arrp.api.RuntimeResourcePack.

Info

  • build.gradle modImplementation "net.devtech:arrp:${project.arrp_version}"
  • gradle.properties
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
loader_version=0.11.6
mod_version=1.0.0
maven_group=dev.xyly.mc
archives_base_name=wither_skeleton_tweaks
fabric_version=0.40.1+1.16
arrp_version=0.4.4

crash.log

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 9/13/21 9:05 PM
Description: Initializing game

java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'wither_skeleton_tweaks'!
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:50)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:33)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:33)
	at net.minecraft.class_310.<init>(class_310.java:437)
	at net.minecraft.client.main.Main.main(Main.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
Caused by: java.lang.NoClassDefFoundError: net/devtech/arrp/api/RuntimeResourcePack
	at dev.xyly.mc.wither_skeleton_tweaks.Wither_skeleton_tweaks.<clinit>(Wither_skeleton_tweaks.java:8)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at net.fabricmc.loader.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:50)
	at net.fabricmc.loader.EntrypointStorage$NewEntry.lambda$getOrCreate$0(EntrypointStorage.java:106)
	at java.util.HashMap.computeIfAbsent(HashMap.java:1127)
	at net.fabricmc.loader.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:104)
	at net.fabricmc.loader.EntrypointStorage.lambda$getEntrypointContainers$1(EntrypointStorage.java:191)
	at net.fabricmc.loader.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:37)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:47)
	... 11 more
Caused by: java.lang.ClassNotFoundException: net.devtech.arrp.api.RuntimeResourcePack
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:175)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 21 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:50)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:33)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:33)
	at net.minecraft.class_310.<init>(class_310.java:437)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.main.Main.main(Main.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)

-- System Details --
Details:
	Minecraft Version: 1.16.5
	Minecraft Version ID: 1.16.5
	Operating System: Linux (amd64) version 5.14.2-arch1-2
	Java Version: 1.8.0_292, Oracle Corporation
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 5799372320 bytes (5530 MB) / 6174015488 bytes (5888 MB) up to 6190792704 bytes (5904 MB)
	CPUs: 4
	JVM Flags: 11 total; -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16m -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -XX:-DontCompileHugeMethods -Xmn128m -Xmx5895m
	Fabric Mods: 
		fabric: Fabric API 0.39.2+1.16
		fabric-api-base: Fabric API Base 0.3.0+c88702897d
		fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.3.0+2b6fb8d77d
		fabric-biome-api-v1: Fabric Biome API (v1) 3.1.11+efd7b8cf7d
		fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.5+ca58154a7d
		fabric-command-api-v1: Fabric Command API (v1) 1.1.2+95b14da07d
		fabric-commands-v0: Fabric Commands (v0) 0.2.2+ca58154a7d
		fabric-containers-v0: Fabric Containers (v0) 0.1.11+9354966b7d
		fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.4+5badb62d7d
		fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.3+ca58154a7d
		fabric-dimensions-v1: Fabric Dimensions API (v1) 2.0.6+61336ba97d
		fabric-entity-events-v1: Fabric Entity Events (v1) 1.2.2+2f5f89687d
		fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.3+f941baf07d
		fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+ca58154a7d
		fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.6+ca58154a7d
		fabric-item-api-v1: Fabric Item API (v1) 1.2.1+ca58154a7d
		fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.7+2868a2287d
		fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.4+9354966b7d
		fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.1+ca58154a7d
		fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.2.1+ca58154a7d
		fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.2+ca58154a7d
		fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+ca58154a7d
		fabric-models-v0: Fabric Models (v0) 0.3.0+bc7a746f7d
		fabric-networking-api-v1: Fabric Networking API (v1) 1.0.4+5badb62d7d
		fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.8+ca58154a7d
		fabric-networking-v0: Fabric Networking (v0) 0.3.2+ca58154a7d
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.9.5+c88702897d
		fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.2+ca58154a7d
		fabric-particles-v1: Fabric Particles (v1) 0.2.4+ca58154a7d
		fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.4+ca58154a7d
		fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.4+f3e8589e7d
		fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.4+ca58154a7d
		fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 2.3.0+2868a2287d
		fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+ca58154a7d
		fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.13+ca58154a7d
		fabric-rendering-v0: Fabric Rendering (v0) 1.1.2+ca58154a7d
		fabric-rendering-v1: Fabric Rendering (v1) 1.6.0+2868a2287d
		fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.7+6afaa13c7d
		fabric-screen-api-v1: Fabric Screen API (v1) 1.0.0+c045166c7d
		fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.5+9354966b7d
		fabric-structure-api-v1: Fabric Structure API (v1) 1.1.11+ca0ef93d7d
		fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.1+ca58154a7d
		fabric-textures-v0: Fabric Textures (v0) 1.0.6+ca58154a7d
		fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.7+8183d3957d
		fabric-transfer-api-v1: Fabric Transfer API (v1) 1.2.0+e1956bbf7d
		fabricloader: Fabric Loader 0.11.6
		java: OpenJDK 64-Bit Server VM 8
		minecraft: Minecraft 1.16.5
		wither_skeleton_tweaks: Wither Skeleton tweaks 1.0.0
	Launched Version: 1.16.5
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: NO CONTEXT
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fabric'
	Type: Client (map_client.txt)
	CPU: <unknown>

[Question] Complex blockstates

How would you generate a blockstate file representing this json?

"variants": {
      "facing": {
         "north": {},
         "south": {"y": 180},
         "west": {"y": 270},
         "east": {"y": 90}
      },
      "spell": {
         "good": { "model": "mischief:totem/totem_basalt_enchanted" },
         "bad": { "model": "mischief:totem/totem_basalt_enchanted" },
         "none": { "model": "mischief:totem/totem_basalt" }
      }	
  }

This is my obviously wrong attempt.
model(it) just returns the something like 'modid:block/name'

new JVariant()
    put(SpellableBlock.STATE.name, State.NONE, JBlockModel(model(it).toString()))
    put(SpellableBlock.STATE.name, State.CURSED, JBlockModel(model(it).toString()))
    put(SpellableBlock.STATE.name, State.BLESSED, JBlockModel(model(it).toString()))
    put(Totem.FACING.name, Direction.NORTH, JBlockModel("what").y(0))
    put(Totem.FACING.name, Direction.SOUTH, JBlockModel("what").y(180))
    put(Totem.FACING.name, Direction.WEST, JBlockModel("what").y(270))
    put(Totem.FACING.name, Direction.EAST, JBlockModel("what").y(90))

java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.util.registry.Registry

I referred to this article and placed my class in rrp:pregen entrypoint. However, when launching client, errors caused.
Error info as follows:

[16:57:17] [main/INFO] (ARRP) I used the json to destroy the json
[16:57:18] [main/WARN] (FileUtil) Configuration conflict: there is more than one oshi.properties file on the classpath
[16:57:19] [main/WARN] (FileUtil) Configuration conflict: there is more than one oshi.architecture.properties file on the classpath
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:236)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
	... 3 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.util.registry.Registry
	at net.minecraft.Bootstrap.initialize(Bootstrap.java:44)
	at net.minecraft.client.main.Main.main(Main.java:139)
	... 8 more
与目标 VM 断开连接, 地址为: ''127.0.0.1:13528',传输: '套接字''

进程已结束,退出代码为 1

Source code can be referred to at https://github.com/SolidBlock-cn/extshape/tree/1.17-with_arrp.

Improve examples for blocks in wiki.

Especially for blockstates that require more than 3-4 properties. That could make library more widely usable. I don't mean nobody uses this library but It could make more understandable with better wiki.

Server data is not loaded in my developent environment

In my own game instance, with 1.18.2, arrp 0.5.7, the server data (loot tables, recipes, etc.) is normal.

However, when I build your code in my own development environment, there is no data loaded (only client assets loaded, like #58 ) - no matter BEFORE_VANILLA or AFTER_VANILLA, no matter registered in RRPPregenEntrypoint or ModInitializer.

I have inspected the code, and found that the only mixin is ReloaderResourceManagerImplMixin, which seems only to be loaded when loading client assets.

However, in my own game instance, all data is loaded normally. I'm not sure how it is achieved. Is there any solution?

Threading conundrum

I'm in the situation where I have potentially a significant number of runtime assets which are relatively slow to read which all need giving to RRP. With the way this is designed I would've thought the rrp_pre entrypoint would work, yet its implementation is just a serial loop in another thread. Whilst there is nothing wrong with this, it leaves me with a choice of three scenarios:

  • Use the rrp_pre entrypoint and block the thread until the initial reading (which is still on thread from a different preLaunch entrypoint) is done, then add the resources.
    • This is obviously non-ideal as now other resource generators are being held up by me waiting on the main thread. They probably won't be held up for that long, but I don't know how long they might take either.
  • Use the preLaunch entrypoint and add things asynchronously in my own thread
    • This is non-ideal as it won't hold up resource loading if it happens to be slow (as only RRPPre.PRE_GEN_LOCK can do that). Potentially this is not important as the resources may not be accessed until later, but I cannot guarantee this for them all nor have a way of knowing for a given resource if this is the case.
    • As an aside the non-thread safe methods in RuntimeResourcePack should probably warn of it given they are not backed by thread safe collections. It's all quite innocent in RRPPreGenEntrypoint which suggests they are all safe enough to call which could make for some strange CMEs from the main thread.
  • Use the preLaunch entrypoint and add things synchronously
    • This is non-ideal as it will hold the whole game up whilst I add things. Avoids any problems with being too slow for resource loading I guess ;)

I have a feeling everything isn't designed with threading in mind (which is totally fine. it can be a pain to design for), but if speed is the goal to use this over Artifice it shouldn't be left taped on IMO. I have given it a little thought about possible solutions at least if you'd like some ideas:

  • Move to using a thread pool to handle asynchronous additions (possibly RuntimeResourcePack#EXECUTOR_SERVICE)
    • This allows shutting down the pool when it is time for the resources to be done, preventing late submissions.
    • This fixes the spin loop in ReloadableResourceManagerImplMixin#registerRDP which is a bit naughty.
  • Stop using EntrypointUtils and instead parallelise the List returned by FabricLoader#getEntrypoints.
    • This avoids people shouting at you for using internal APIs and fixes the entrypoints blocking each other if some are slower than others
  • Wrap everything up in Futures and allow mods to chain their resources into the loading process
    • The Mojang way it feels like, not that you should necessarily listen to them :P
    • Probably just a messier way of having a thread pool by abstracting it all
    • Potentially easier for a modder to use if the external abstraction is clear (not that you couldn't just abstract a thread pool well directly)
  • Go completely wild and allow other mods to register their intentions to a Phaser and then use that as a form of self asserted thread pooling.
    • Not entirely necessary if there's already a thread pool, but allows greater flexibility for other mods to use their own (optionally threaded) implementations.
    • Also means the threads don't have to start until the work for them is ready, or even at all.
    • Does open the possibility for the game to hang if a mod fails to announce their completion re-arriving or deregistering, but you can force Phasers to stun terminate if they're being slow/you want them to with a single method call.

There's probably an argument for an entirely threaded form of RuntimeResourcePack, maybe even using Semaphores to limit concurrent writes or just as a lazy way of de-threading calls (or a ReentrantReadWriteLock which would work for that task too), but maybe there's a point of diminishing returns eventually where it doesn't quite need to be that complicated. All food for thought in making the generation faster at least.

tintindex actually set as tintIndex

When you declare a tintindex of a JFace, it actually sets the value to "tintIndex", which at first glance looks the same, but the capital 'I' keeps the tints from affecting the face properly.

            JModel blockModel = JModel.model("block/cube_all").textures(
                    JModel.textures().var("all", prefixIdentifier(baseIdentifier, "block")).particle("#all")
            ).element(JModel.element()
                    .from(0, 0, 0)
                    .to(16, 16, 16)
                    .faces(JModel.faces()
                            .down  (JModel.face("all") .cullface(Direction.DOWN)  .uv(0, 0, 16, 16) .tintIndex(0))
                            .up    (JModel.face("all") .cullface(Direction.UP)    .uv(0, 0, 16, 16) .tintIndex(0))
                            .north (JModel.face("all") .cullface(Direction.NORTH) .uv(0, 0, 16, 16) .tintIndex(0))
                            .south (JModel.face("all") .cullface(Direction.SOUTH) .uv(0, 0, 16, 16) .tintIndex(0))
                            .west  (JModel.face("all") .cullface(Direction.WEST)  .uv(0, 0, 16, 16) .tintIndex(0))
                            .east  (JModel.face("all") .cullface(Direction.EAST)  .uv(0, 0, 16, 16) .tintIndex(0))
                    )
            );

In this case, it outputs a normally correct JSON file, save for the use of "tintIndex"

Expected output:

{
  "parent": "block/cube_all",
  "textures": {
    "all": "minecraft:block/stone",
    "particle": "#all"
  },
  "elements": [
    {
      "from": [
        0.0,
        0.0,
        0.0
      ],
      "to": [
        16.0,
        16.0,
        16.0
      ],
      "faces": {
        "up": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "up",
          "tintindex": 0
        },
        "down": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "down",
          "tintindex": 0
        },
        "north": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "north",
          "tintindex": 0
        },
        "south": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "south",
          "tintindex": 0
        },
        "east": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "east",
          "tintindex": 0
        },
        "west": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "west",
          "tintindex": 0
        }
      }
    }
  ]
}

Actual output:

{
  "parent": "block/cube_all",
  "textures": {
    "all": "minecraft:block/stone",
    "particle": "#all"
  },
  "elements": [
    {
      "from": [
        0.0,
        0.0,
        0.0
      ],
      "to": [
        16.0,
        16.0,
        16.0
      ],
      "faces": {
        "up": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "up",
          "tintIndex": 0
        },
        "down": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "down",
          "tintIndex": 0
        },
        "north": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "north",
          "tintIndex": 0
        },
        "south": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "south",
          "tintIndex": 0
        },
        "east": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "east",
          "tintIndex": 0
        },
        "west": {
          "uv": [
            0.0,
            0.0,
            16.0,
            16.0
          ],
          "texture": "#all",
          "cullface": "west",
          "tintIndex": 0
        }
      }
    }
  ]
}

Cant replace vanilla texture

Hello,

I am trying to replace a vanilla texture via ARRP.
But if I add a texture like RESOURCE_PACK.addTexture(new Identifier("minecraft", "/gui/options_background"), image);,
it changes nothing.

Having addLang append instead of replace

Either that or a similar substitute, maybe JTranslation? Having to keep one JLang object until you've generate all your things and then adding it feels difficult to use in comparison to some of the other things, unless I'm misunderstanding how it works

Incompatibility with 1.18.2

[13:55:58] [Render thread/ERROR] (FabricLoader/Mixin) Mixin apply for mod advanced_runtime_resource_pack failed arrp.mixins.json:ReloadableResourceManagerImplMixin -> net.minecraft.resource.ReloadableResourceManagerImpl: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException @Shadow method method_14475 in arrp.mixins.json:ReloadableResourceManagerImplMixin was not located in the target class net.minecraft.resource.ReloadableResourceManagerImpl. Using refmap arrp-refmap.json
 org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: @Shadow method method_14475 in arrp.mixins.json:ReloadableResourceManagerImplMixin was not located in the target class net.minecraft.resource.ReloadableResourceManagerImpl. Using refmap arrp-refmap.json
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:436) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachShadowMethod(MixinPreProcessorStandard.java:412) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:340) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:299) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1289) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:292) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403) ~[sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) [sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) [sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) [sponge-mixin-0.11.2+mixin.0.8.5.jar:0.11.2+mixin.0.8.5]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155) [fabric-loader-0.13.3.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) [?:?]
	at net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:504) [[email protected]:?]
	at net.minecraft.client.main.Main.main(Main.java:197) [[email protected]:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]

Server unable to stop

everytime when i trt to close server, it will get stuck with the following debug log:
net.devtech.arrp.impl.RuntimeResourcePackImpl close 警告: closing rrp compact:builtin
and then the server will stop responding and not close. please look into it thanks

My mod causes this to crash :| how can i fix it (assuming this is a me problem)

My mod (IDontCare) causes this to crash :| how can i fix it (assuming this is a me problem)

net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:159)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'advanced_runtime_resource_pack'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:157)
... 2 more
Caused by: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'preLaunch' provided by 'advanced_runtime_resource_pack'
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:56)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
... 4 more
Caused by: java.lang.RuntimeException: Mixin transformation of net.devtech.arrp.ARRP failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:252)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at net.fabricmc.loader.impl.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:50)
at net.fabricmc.loader.impl.entrypoint.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:117)
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:53)
... 5 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [idontcare.mixins.json:PackListWidgetRenderMixin] from phase [DEFAULT] in config [idontcare.mixins.json] from mod [idontcare] FAILED during PREPARE
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinPrepareError(MixinProcessor.java:585)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:543)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247)
... 13 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: The specified mixin 'com.unjust1ce.idontcare.mixin.PackListWidgetRenderMixin' was not found
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:865)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:852)
at org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:781)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540)
... 19 more
Caused by: java.lang.ClassNotFoundException: The specified mixin 'com.unjust1ce.idontcare.mixin.PackListWidgetRenderMixin' was not found
at org.spongepowered.asm.mixin.transformer.MixinInfo.loadMixinClass(MixinInfo.java:1314)
at org.spongepowered.asm.mixin.transformer.MixinInfo.(MixinInfo.java:858)
... 22 more

BlockState multi-variant serialization is completely incorrect

Example:

import static net.devtech.arrp.json.blockstate.JState.*;

state().add(variant()
  .put("ready", false, model("yo:block/machine"))
  .put("ready", true, model("yo:block/machine_ready"))
)

What it currently outputs as:

{
  "variants": [
    {
      "ready=false": {
        "model": "yo:block/machine"
      }
    },
    {
      "ready=true": {
        "model": "yo:block/machine_ready"
      }
    }
  ]
}

What it should output:

{
  "variants": {
    "ready=false": {
      "model": "yo:block/machine"
    },
    "ready=true": {
      "model": "yo:block/machine_ready"
    }
}

Translations not working

Helllo! I tried added translations to my blocks using the following code but it's not working

 RESOURCE_PACK.mergeLang(id(MyAwesomeMod.MOD_ID, "en_us"),
            JLang.lang().block(identifier, "Test Slab"));

I tried with the Minecraft namespace too, but still doesn't work

 RESOURCE_PACK.mergeLang(id("en_us"),
            JLang.lang().block(identifier, "Test Slab"));

Also I tried by changing the language to "en-us" but nope, doesn't work. And by debugging the language file generation, everything is looking fine so I have no idea what could be happening 😭

Wiki could use more examples on Loot tables

I started using ARRP for my mod's datapack stuff, but then I stumbled across a rather big blocking point, where I found myself unable to reproduce a vanilla loot table in code using the JLootTable methods.

The loot tables I was trying to reproduce were notably :

  • the bookshelf loot table (silk touch predicate)
  • the slab loot table but with a silk touch predicate for both single and double slab drops.

I would really appreciate if you could either put more examples or point me in the right direction for these 👍

-Aza

dumpijnkg cragsh my gaem halp

evhry tieem I booot my serv i greeted by

[03:12:09] [main/INFO]: ARRP register
Feb 01, 2021 3:12:09 AM net.devtech.arrp.impl.RuntimeResourcePackImpl dump
INFO: dumping minecraft:lint's assets and data
[03:12:09] [main/FATAL]: Failed to start the minecraft server
java.lang.RuntimeException: java.nio.file.FileAlreadyExistsException: /MikanCraft/MikanCraft/rrp.debug/minecraft;lint/data

downgradering ARRP fixs wtf plz quick revert unplayeble 0/NaN
:halfplz:

Problem when adding language resources

Hello. I created such a method to register language localization for English and Chinese while registering the item.

    private static Item register(String path, String enName, String cnName, String enTooltip, String cnTooltip, Item item) {
        Identifier itemId = new Identifier("elt", path);
        ITEM_RESOURCE.addLang(new Identifier("elt", "en_us"), JLang.lang().translate("item.elt."+path, enName).translate("item.elt."+path+".tooltip", enTooltip));
        ITEM_RESOURCE.addLang(new Identifier("elt", "zh_cn"), JLang.lang().translate("item.elt."+path, cnName).translate("item.elt."+path+".tooltip", cnTooltip));
        return register(itemId, item);
    }

And I register the items:

    static {
        ELT_SYMBOL = register("symbol", "Symbol", "能级跃迁", "", "", new ItemBase((new Item.Settings()).group(ItemGroups_ELT.ELT_MISC)));
        BRANCH = register("oak_branch", "Oak Branch", "橡木树枝", "A branch", "一根树枝", new ItemBase((new Item.Settings()).group(ItemGroups_ELT.ELT_MATERIAL)));
        BRICH_BRANCH = register("birch_branch", "Birch Branch", "白桦树枝", "A branch", "一根树枝", new ItemBase((new Item.Settings()).group(ItemGroups_ELT.ELT_MATERIAL)));
    }

Problem occurs. ARRP seems to be only registering the translation the first item called (in this case is ELT_SYMBOL), leaving the subsequent items unlocalized in game. I noticed other resources like models and blockstates don't have this problem when I register a lot of items/blocks.

RuntimeResourcePackImpl threads do not allow the JVM process to terminate

ExecutorService doesn't make deamon threads initially sad.

Fix

import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
ThreadFactory factory = new ThreadFactoryBuilder()
        .setNameFormat("ARRP-Workers-%d")
        .setDaemon(true)
        .build();
EXECUTOR_SERVICE = Executors.newFixedThreadPool(processors, factory);

[BUG] Non-ASCII characters become garbled code in non-development environment

If a java file uses utf-8 in development environment and it contains strings invocation (such as JLang's), these strings will become gibberish in non-development environment.
Been tested, in net.devtech.arrp.impl.RuntimeResourcePackImpl#serialize appending a parameter Charsets.UTF_8 to new OutputStreamWriter(ubaos) will solve this.
I guess the reason is that in non-development environment the java.nio.charset.Charset#defaultCharset is not Charsets.UTF_8.

JBlockModel is missing weight parameter

Currently there are only 4 properties for JBlockModel:
Identifier model;
Integer x;
Integer y;
Boolean uvlock;

But there is a weight parameter that determines how often the model is used if multiple models are provided for one variant.

Could not find net.devtech:arrp:0.3.7.

A problem occurred configuring root project 'mineralspawn-mod'.
> Could not resolve all files for configuration ':modCompileClasspath'.
   > Could not find net.devtech:arrp:0.3.7.
     Searched in the following locations:
       - file:/home/zeney/mineralspawn-mod/build/loom-cache/arrp-0.3.7.jar
       - file:/home/zeney/mineralspawn-mod/build/loom-cache/arrp.jar
       - file:/home/zeney/mineralspawn-mod/.gradle/loom-cache/remapped_mods/net/devtech/arrp/0.3.7/arrp-0.3.7.pom
       - https://maven.fabricmc.net/net/devtech/arrp/0.3.7/arrp-0.3.7.pom
       - https://libraries.minecraft.net/net/devtech/arrp/0.3.7/arrp-0.3.7.pom
       - https://repo.maven.apache.org/maven2/net/devtech/arrp/0.3.7/arrp-0.3.7.pom
       - file:/home/zeney/.gradle/caches/fabric-loom/1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.4-v2/arrp-0.3.7.jar
       - file:/home/zeney/.gradle/caches/fabric-loom/1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.4-v2/arrp.jar
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

...
what does that mean?

plugins {
    id 'fabric-loom' version '0.6-SNAPSHOT'
    id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

dependencies {
    //to change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

    // Fabric API. This is technically optional, but you probably want it anyway.
    modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

    // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
    // You may need to force-disable transitiveness on them.
    modImplementation group: 'net.devtech', name: 'arrp', version: '0.3.7'
}

processResources {
    inputs.property "version", project.version

    from(sourceSets.main.resources.srcDirs) {
        include "fabric.mod.json"
        expand "version": project.version
    }

    from(sourceSets.main.resources.srcDirs) {
        exclude "fabric.mod.json"
    }
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = "sources"
    from sourceSets.main.allSource
}

jar {
    from "LICENSE"
}

// configure the maven publication
publishing {
    publications {
        mavenJava(MavenPublication) {
            // add all the jars that should be included when publishing to maven
            artifact(remapJar) {
                builtBy remapJar
            }
            artifact(sourcesJar) {
                builtBy remapSourcesJar
            }
        }
    }

    // select the repositories you want to publish to
    repositories {

        maven {
            url = 'https://raw.githubusercontent.com/Devan-Kerman/Devan-Repo/master/'
        }
        // uncomment to publish to the local maven
        // mavenLocal()
    }
}

Error: cannot access class_3262

When building, I encounter the error:

cannot access class_3262
class file for net.minecraft.class_3262 not found

in my ModInitializer for the line

public static final RuntimeResourcePack RESOURCE_PACK = RuntimeResourcePack.create(MOD_ID + ":dynamic_resources");

Minecraft Version: 1.16.4

Is it possible to build an mod .jar file of arrp?

Update:
I have tried the RunClient task,but i got this error.

Task :compileJava FAILED
E:\ARRP-master\src\main\java\net\devtech\arrp\mixin\ReloadableResourceManagerImplMixin.java:25: error: Unable to locate obfuscation mapping for @ModifyVariable target reload
@ModifyVariable(method = "reload",
^
warning: The following options were not recognized by any processor: '[outMapFileNamedIntermediary, inMapFileNamedIntermediary]'

Wrong serialization of JVariant

JState has a "List<JVariant>", which seems incorrect. For example, a block with multiple variants should be

{
  "variants": {
    "": [ {blockModel1}, {blockModel2}, {blockModel3} ]
  }
}

which will randomly use one of the variants, instead of:

{
  "variants": [
    {"": {blockModel1}},
    {"": {blockModel2}},
    {"": {blockModel3}}
  ]
}

Stop Using BufferedImage

Using the AWT class BufferedImage is not a great idea, it would be better to use something like NativeImage to prevent loading a bunch of AWT classes when it is not necessary to do so.

0.5.5 breaks compatibility

0.5.5 is not compatible with 1.16.5

This version nests Fabric API 0.4.3, which throws NoClassDefFoundError.

[12:24:55] [main/ERROR] (FabricLoader) Minecraft has crashed!
 net.fabricmc.loader.impl.FormattedException: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:418) ~[fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at net.fabricmc.fabric.impl.base.event.ArrayBackedEvent.<clinit>(ArrayBackedEvent.java:35) ~[fabric-api-base-0.4.3+d7c144a8d2.jar:?]
	at net.fabricmc.fabric.impl.base.event.EventFactoryImpl.createArrayBacked(EventFactoryImpl.java:44) ~[fabric-api-base-0.4.3+d7c144a8d2.jar:?]
	at net.fabricmc.fabric.api.event.EventFactory.createArrayBacked(EventFactory.java:63) ~[fabric-api-base-0.4.3+d7c144a8d2.jar:?]
	at net.minecraft.util.registry.SimpleRegistry.<init>(SimpleRegistry.java:52) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at net.minecraft.util.registry.Registry.<clinit>(Registry.java:102) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at net.minecraft.Bootstrap.initialize(Bootstrap.java:42) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:137) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) ~[fabric-loader-0.13.3.jar:?]
	... 3 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
	at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
	at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:158) ~[fabric-loader-0.13.3.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at net.fabricmc.fabric.impl.base.event.ArrayBackedEvent.<clinit>(ArrayBackedEvent.java:35) ~[fabric-api-base-0.4.3+d7c144a8d2.jar:?]
	at net.fabricmc.fabric.impl.base.event.EventFactoryImpl.createArrayBacked(EventFactoryImpl.java:44) ~[fabric-api-base-0.4.3+d7c144a8d2.jar:?]
	at net.fabricmc.fabric.api.event.EventFactory.createArrayBacked(EventFactory.java:63) ~[fabric-api-base-0.4.3+d7c144a8d2.jar:?]
	at net.minecraft.util.registry.SimpleRegistry.<init>(SimpleRegistry.java:52) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at net.minecraft.util.registry.Registry.<clinit>(Registry.java:102) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at net.minecraft.Bootstrap.initialize(Bootstrap.java:42) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:137) ~[minecraft-1.16.5-mapped-net.fabricmc.yarn-1.16.5+build.10-v2.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) ~[fabric-loader-0.13.3.jar:?]
	... 3 more

Format dumped json output

At the moment the dumped json files are unformatted and all pressed into on line.
It would help a lot if you could pretty-print them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.