Respackopts/docs/old/how_it_works.md
2021-08-30 14:38:03 +02:00

842 B

How it works

Format changes

V1 to V2

The way enums are expressed for canvas shaders was changed, now values are no longer constant numbers but instead booleans expressing whether they are selected.

A quick tour

In ResourcePackManagerMixin, the conf.json will be parsed and saved to a map in the main class. Now, whenever a resource is accessed, the mixins under conditions/ will check if a .rpo file exists for the current resource and parse it if that is the case. If a resource is "hidden", openFile will throw a FileNotFoundException and containsFile will return false, essentialy preventing the game from even knowing the resource exists.

Canvas integration

Grondag implemented an API into frex to allow RPO to supply a custom shader file which other may include, the code is generated by each individual entry class.