From 4aac51f68e0e0486eb1fa2729982272813e4a3ce Mon Sep 17 00:00:00 2001 From: Lukas Rieger Date: Sat, 11 Jan 2020 20:38:11 +0100 Subject: [PATCH] Updated Configuring mods mod resources (markdown) --- Configuring-mods---mod-resources.md | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/Configuring-mods---mod-resources.md b/Configuring-mods---mod-resources.md index d334cfe..2d36434 100644 --- a/Configuring-mods---mod-resources.md +++ b/Configuring-mods---mod-resources.md @@ -28,22 +28,22 @@ After that you might need to do some more configuration. Go through the chapters This is the most annoying part, but it is only needed with worlds (chunks) stored in the 1.12.x format! So if you have a minecraft world with only 1.13.x and above, you don't need to do this. -Before 1.13 and [the flattening](https://minecraft.gamepedia.com/Java_Edition_1.13/Flattening), blocks are stored by their numeral-id and a meta-value. So the andesite block for example has id `1` and a meta value of `5`, this is usually written like so: `1:5`.
-If a mod now adds a new block, this new block is being assigned to such an id. Forge then stores a mapping of the numeral-id and the textual-id of this block in a table in the world-files *(`level.dat`)*. Now BlueMap needs to know for each id:meta combination what block-state to render. +Before 1.13 and [the flattening](https://minecraft.gamepedia.com/Java_Edition_1.13/Flattening), blocks are stored by their numeric-id and a meta-value. So the andesite block for example has id `1` and a meta value of `5`, this is usually written like so: `1:5`.
+If a mod now adds a new block, this new block is being assigned to such an id. Forge then stores a mapping of the numeric-id and the textual-id of this block in a table in the world-files *(`level.dat`)*. Now BlueMap needs to know for each id:meta combination what block-state to render. So, we have 3 id-types: -- The `numeral-id` (e.g. `169`) is some integer standing for some block. The mapped block can be different for each world. +- The `numeric-id` (e.g. `169`) is some integer standing for some block. The mapped block can be different for each world. - The `textual-id` (e.g. `minecraft:sea_lantern`) is the (namespaced) unique name of the block. - The `resource-id` (e.g. `minecraft:sea_lantern`) declares the namespace and the name of the block-state file in resources (and resource-packs). So BlueMap would search in the loaded resources for the file `assets//blockstates/.json` (`assets/minecraft/blockstates/sea_lantern.json`). This is usually the same as the `textual-id` but there are some rare cases where they are different. To configure a block, you need to find all possible meta-values and their belonging textual-id + properties. -Then we format them like this: `"namespace:textual-id:meta": "namespace:resource-id[property1=value1,property2=value2]"` and add them to the config *(see example above)*. You can also use the numeral-id instead of the textual-id, but since this id can change across worlds this is not recommended. +Then we format them like this: `"namespace:textual-id:meta": "namespace:resource-id[property1=value1,property2=value2]"` and add them to the config *(see example above)*. You can also use the numeric-id instead of the textual-id, but since this id can change across worlds this is not recommended. Currently, there is no general way how to find this info, but here are some things that might help: - Has the mod a wiki? Maybe there is some info. - The textual-id and the properties of a block are usually displayed in-game if you press F3 and look at the block. -- The BlueMap plugin has a command `/bluemap debug` that shows you all the information BlueMap has about the block at your feet and the one you are standing on. For 1.12.x this also includes the numeral-id and the meta-value. -- The mod/plugin [WorldEdit](https://www.curseforge.com/minecraft/mc-mods/worldedit) can create blocks based on numeral-id:meta for you +- The BlueMap plugin has a command `/bluemap debug` that shows you all the information BlueMap has about the block at your feet and the one you are standing on. For 1.12.x this also includes the numeric-id and the meta-value. +- The mod/plugin [WorldEdit](https://www.curseforge.com/minecraft/mc-mods/worldedit) can create blocks based on numeric-id:meta for you - In the future, i might create a forge-mod that can generate this config for you. Stay tuned. ^^ @@ -71,11 +71,28 @@ In the future, i might create a forge-mod that can generate this config for you. } ``` -So this is pretty simple. To render blocks correctly, BlueMap needs to know if a block is: +To render blocks correctly, BlueMap needs to know if a block is: - `culling` it's neighbor block-faces: If the neighbors block-face that is facing this block [can be removed](https://en.wikipedia.org/wiki/Hidden-surface_determination#Occlusion_culling) because it is not visible. - `occluding` near blocks: This is basically used to determine if the block is "occluding" light when calculating the [ambient occlusion](https://en.wikipedia.org/wiki/Ambient_occlusion) on neighbor blocks. - is `flammable`. This is currently only used in 1.12.x to calculate the appearance of fire. -If there are no properties defined for a block, BlueMap looks at the model and "guesses" its properties. This is mostly pretty accurate, but you can configure it in this config if you need to. +If there are no properties defined for a block, BlueMap looks at the model and "guesses" its properties. This is pretty accurate, but you can configure it in this config if you need to. ## Block-colors config +**File:** `blockColors.json`
+**Example:** +```json +{ + "minecraft:water": "@water", + "minecraft:grass": "@grass", + "minecraft:redstone_wire": "#ff0000", + "minecraft:birch_leaves": "#86a863" +} +``` + +Some blocks like grass, leaves, water or redstone are dynamically colored. Those colors change by biome, properties or are just static. + +Possible values are `@foliage`, `@grass`, `@water` to use the foliage-, grass- or water-color of the biome to color the block, or a static color using a [css-style color-hex](https://htmlcolorcodes.com/color-picker/) like `#86a863`. + +## Biomes config +This is still a todo, currently unknown biomes are treated as "ocean"-biomes. \ No newline at end of file