From 7424c3c8a2ff9625cf4aa43b8dacb2f83b6f744b Mon Sep 17 00:00:00 2001 From: QuazChick Date: Tue, 4 Feb 2025 18:23:41 +0000 Subject: [PATCH 1/2] Added `wiki` namespace to texture atlas shortnames --- docs/blocks/applying-effects.md | 2 +- docs/blocks/block-components.md | 140 ++++---- docs/blocks/block-models.md | 12 +- docs/blocks/block-texture-variation.md | 10 +- docs/blocks/blocks-as-items.md | 4 +- docs/blocks/blocks-intro.md | 82 ++--- docs/blocks/custom-crops.md | 28 +- docs/blocks/custom-glazed-terracotta.md | 2 +- docs/blocks/custom-trapdoors.md | 2 +- docs/blocks/fake-blocks.md | 8 +- docs/blocks/flipbook-textures.md | 6 +- docs/blocks/precise-interaction.md | 70 ++-- docs/blocks/precise-rotation.md | 24 +- docs/blocks/troubleshooting-blocks.md | 38 +-- docs/concepts/overwriting-assets.md | 70 ++-- docs/contribute-style.md | 108 +++---- docs/entities/entity-intro-rp.md | 57 ++-- docs/entities/spawning-tamed-entities.md | 2 +- docs/guide/custom-item.md | 34 +- docs/items/custom-armor.md | 8 +- docs/items/custom-weapon.md | 4 +- docs/items/item-components.md | 392 +++++++++++------------ docs/items/items-intro.md | 18 +- docs/items/throwable.md | 2 +- docs/items/troubleshooting-items.md | 20 +- docs/visuals/retexturing-spawn-eggs.md | 23 +- 26 files changed, 596 insertions(+), 570 deletions(-) diff --git a/docs/blocks/applying-effects.md b/docs/blocks/applying-effects.md index ff2c5c83180..1bac5e9939f 100644 --- a/docs/blocks/applying-effects.md +++ b/docs/blocks/applying-effects.md @@ -156,7 +156,7 @@ And done! The code above will trigger the desired status effect as long as the e "minecraft:geometry": "geometry.wither_block", "minecraft:material_instances": { "*": { - "texture": "wither_block" + "texture": "wiki:wither_block" } }, "minecraft:custom_components": ["wiki:detect_treaders"] diff --git a/docs/blocks/block-components.md b/docs/blocks/block-components.md index 653e1158c80..224aac70aa1 100644 --- a/docs/blocks/block-components.md +++ b/docs/blocks/block-components.md @@ -50,10 +50,10 @@ Block components are used to change how your block appears and functions in the "minecraft:geometry": "geometry.lamp", "minecraft:material_instances": { "*": { - "texture": "lamp" + "texture": "wiki:lamp" }, "shade": { - "texture": "lamp_shade" + "texture": "wiki:lamp_shade" } } } @@ -71,10 +71,10 @@ _Released from experiment `Holiday Creator Features` for format versions 1.19.50 Type: Boolean/Object -- `origin`: Vector [a, b, c] - - Minimal position of the bounds of the collision box. `origin` is specified as `[x, y, z]` and must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. -- `size`: Vector [a, b, c] - - Size of each side of the collision box. Size is specified as `[x, y, z]`. `origin` + `size` must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. +- `origin`: Vector [a, b, c] + - Minimal position of the bounds of the collision box. `origin` is specified as `[x, y, z]` and must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. +- `size`: Vector [a, b, c] + - Size of each side of the collision box. Size is specified as `[x, y, z]`. `origin` + `size` must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. #### Example using Boolean @@ -103,11 +103,11 @@ _Released from experiment `Holiday Creator Features` for format versions 1.19.50 Type: Object -- `crafting_tags`: Array - - Required Field - - Defines the tags recipes should define to be crafted on this table. Limited to 64 tags. Each tag is limited to 64 characters. -- `table_name`: String - - Specifies the language file key that maps to what text will be displayed in the UI of this table. If the string given can not be resolved as a loc string, the raw string given will be displayed. If this field is omitted, the name displayed will default to the name specified in the "display_name" component. If this block has no "display_name" component, the name displayed will default to the name of the block. +- `crafting_tags`: Array + - Required Field + - Defines the tags recipes should define to be crafted on this table. Limited to 64 tags. Each tag is limited to 64 characters. +- `table_name`: String + - Specifies the language file key that maps to what text will be displayed in the UI of this table. If the string given can not be resolved as a loc string, the raw string given will be displayed. If this field is omitted, the name displayed will default to the name specified in the "display_name" component. If this block has no "display_name" component, the name displayed will default to the name of the block. minecraft:block > components @@ -127,8 +127,8 @@ Describes the destructible by explosion properties for this block. If set to tru Type: Boolean/Object -- `explosion_resistance`: Double - - Describes how resistant the block is to explosion. Greater values mean the block is less likely to break when near an explosion (or has higher resistance to explosions). The scale will be different for different explosion power levels. A negative value or 0 means it will easily explode; larger numbers increase level of resistance. +- `explosion_resistance`: Double + - Describes how resistant the block is to explosion. Greater values mean the block is less likely to break when near an explosion (or has higher resistance to explosions). The scale will be different for different explosion power levels. A negative value or 0 means it will easily explode; larger numbers increase level of resistance. #### Example using Boolean @@ -154,9 +154,9 @@ Describes the destructible by mining properties for this block. If set to true, Type: Boolean/Object -- `seconds_to_destroy`: Double - - Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times. - - Note: It actually takes 2x the amount of seconds defined. +- `seconds_to_destroy`: Double + - Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times. + - Note: It actually takes 2x the amount of seconds defined. #### Example using Boolean @@ -212,8 +212,8 @@ Triggers an event when an entity falls onto this block. Type: Object -- `min_fall_distance`: Double - - The minimum distance an entity must fall to trigger the event in blocks. +- `min_fall_distance`: Double + - The minimum distance an entity must fall to trigger the event in blocks. _Released from experiment `Beta APIs` for format versions 1.21.10 and higher._ @@ -231,8 +231,8 @@ Describes the flammable properties for this block. If set to true, default value Type: Boolean/Object -- `catch_chance_modifier`: Int - - A modifier affecting the chance that this block will catch flame when next to a fire. Values are greater than or equal to 0, with a higher number meaning more likely to catch on fire. For a `catch_chance_modifier` greater than 0, the fire will continue to burn until the block is destroyed (or it will burn forever if the `destroy_chance_modifier` is 0). If the `catch_chance_modifier` is 0, and the block is directly ignited, the fire will eventually burn out without destroying the block (or it will have a chance to be destroyed if `destroy_chance_modifier` is greater than 0). The default value of 5 is the same as that of Planks. +- `catch_chance_modifier`: Int + - A modifier affecting the chance that this block will catch flame when next to a fire. Values are greater than or equal to 0, with a higher number meaning more likely to catch on fire. For a `catch_chance_modifier` greater than 0, the fire will continue to burn until the block is destroyed (or it will burn forever if the `destroy_chance_modifier` is 0). If the `catch_chance_modifier` is 0, and the block is directly ignited, the fire will eventually burn out without destroying the block (or it will have a chance to be destroyed if `destroy_chance_modifier` is greater than 0). The default value of 5 is the same as that of Planks. #### Example using Boolean @@ -271,11 +271,11 @@ The description identifier of the geometry to use to render this block. This ide **Custom block model limitations:** -- Your block is limited to 30×30×30 pixels in size. +- Your block is limited to 30×30×30 pixels in size. -- At least 1 pixel of your block on each axis must be contained by the base 16×16×16 block. +- At least 1 pixel of your block on each axis must be contained by the base 16×16×16 block. -- The absolute bounds of the position of your 30×30×30 block are 30 pixels in each direction from the origin. Your block can be placed in any position within these bounds, as long as it adheres to rule #2. +- The absolute bounds of the position of your 30×30×30 block are 30 pixels in each direction from the origin. Your block can be placed in any position within these bounds, as long as it adheres to rule #2. Note: Does not conduct redstone. Even if using the vanilla `full_block` identifier. Makes your block breathable as well. Mobs are unable to spawn as well. Interestingly, bats are able to hang upside down on them despite being a "non solid" block in terms of spawnability and conducitvity. @@ -283,11 +283,11 @@ _Released from experiment `Holiday Creator Features` for format versions 1.19.40 Type: String/Object -- `identifier`: String - - The identifier of the geometry. -- `bone_visibility`: Object - - Optional “array” of Booleans that define the visibility of individual bones in the geometry file. In order to set up bone_visibility the geometry file name must be entered as an identifier. After the identifier has been specified, bone_visibility can be defined based on the names of the bones in the specified geometry file on a true/false basis. - - Note that all bones default to true, so bones should only be defined if they are being set to false. Including bones set to true will work the same as the default. +- `identifier`: String + - The identifier of the geometry. +- `bone_visibility`: Object + - Optional “array” of Booleans that define the visibility of individual bones in the geometry file. In order to set up bone_visibility the geometry file name must be entered as an identifier. After the identifier has been specified, bone_visibility can be defined based on the names of the bones in the specified geometry file on a true/false basis. + - Note that all bones default to true, so bones should only be defined if they are being set to false. Including bones set to true will work the same as the default. #### Example using String @@ -394,9 +394,9 @@ Type: String/Vector [a, b, c] Configuration of your block's rendering, including textures and lighting. -- All instances must have the same render method. -- Block faces will unconditionally darken if intersecting another block. -- The texture on the `down` face is used for destruction particles. +- All instances must have the same render method. +- Block faces will unconditionally darken if intersecting another block. +- The texture on the `down` face is used for destruction particles. Material instances can be combined with `RP/blocks.json` entries to create blocks which exhibit opaque-like properties. This is primarily used to enable face culling on [custom glass blocks](/blocks/custom-glass-blocks). @@ -414,13 +414,13 @@ Render methods essentially control how a block appears in the world, much like e | double_sided | ❌ | ❌ | ❌ | ❌ | N/A - Use for opaque 2D plains. | | opaque _(default)_ | ❌ | ❌ | ✔️ | ❌ | Dirt, Stone, Concrete. | -- **_Transparency_** - fully see-through areas. +- **_Transparency_** - fully see-through areas. -- **_Translucency_** - semi-transparent areas. +- **_Translucency_** - semi-transparent areas. -- **_Backface Culling_** - faces become invisible when viewed from behind. +- **_Backface Culling_** - faces become invisible when viewed from behind. -- **_Distant Culling_** - the block becomes invisible before reaching the full render distance. +- **_Distant Culling_** - the block becomes invisible before reaching the full render distance. minecraft:block > components @@ -429,7 +429,7 @@ Render methods essentially control how a block appears in the world, much like e // '*' instance required - default instance for cube faces // Instance names 'up', 'down', 'north', 'east', 'south' and 'west' are built in "*": { - "texture": "texture_name", // Shortname defined in `RP/textures/terrain_textures.json` + "texture": "wiki:texture_name", // Shortname defined in `RP/textures/terrain_texture.json` "render_method": "blend", // One of the render methods in the above table "face_dimming": true, // Defaults to true; should faces with this material be dimmed by their direction? "ambient_occlusion": true // Defaults to true; should shadows be created based on surrounding blocks? @@ -450,19 +450,19 @@ Custom instance names can be defined within material instances, and can be refer ```json "minecraft:material_instances": { "*": { - "texture": "texture_name", + "texture": "wiki:texture_name", "render_method": "blend" // Must match other instances }, // Custom instance name "end": { - "texture": "texture_name_end", + "texture": "wiki:texture_name_end", "render_method": "blend" // Must match other instances }, "up": "end", "down": "end", // Instance name defined in model: "flower": { - "texture": "texture_name_flower", + "texture": "wiki:texture_name_flower", "render_method": "blend" // Must match other instances } } @@ -476,20 +476,20 @@ _Released from experiment `Holiday Creator Features` for format versions 1.19.60 Type: Object -- `conditions`: Array - List of conditions where the block can be placed/survive. Limited to 64 conditions. Each condition is a JSON Object that must contain at least one (and can contain both) of the parameters `allowed_faces` or `block_filter` as shown below. - - `allowed_faces`: Array - List of any of the following strings describing which face(s) this block can be placed on: `up`, `down`, `north`, `south`, `east`, `west`, `side`, `all`. Limited to 6 faces. - - `block_filter`: Array - List of blocks that this block can be placed against in the `allowed_faces` direction. Limited to 64 blocks. Each block in this list can either be specified as a String (block name) or as a BlockDescriptor. +- `conditions`: Array - List of conditions where the block can be placed/survive. Limited to 64 conditions. Each condition is a JSON Object that must contain at least one (and can contain both) of the parameters `allowed_faces` or `block_filter` as shown below. + - `allowed_faces`: Array - List of any of the following strings describing which face(s) this block can be placed on: `up`, `down`, `north`, `south`, `east`, `west`, `side`, `all`. Limited to 6 faces. + - `block_filter`: Array - List of blocks that this block can be placed against in the `allowed_faces` direction. Limited to 64 blocks. Each block in this list can either be specified as a String (block name) or as a BlockDescriptor. #### Block Descriptor A BlockDescriptor is an object that allows you to reference a block (or multiple blocks) based on its tags, or based on its name and states. The fields of a BlockDescriptor are described below. -- `name`: String - - The name of a block. -- `states`: Object - - The list of Vanilla block states and their values that the block can have, expressed in key/value pairs. -- `tags`: String - - A condition using Molang queries that results to true/false that can be used to query for blocks with certain tags. +- `name`: String + - The name of a block. +- `states`: Object + - The list of Vanilla block states and their values that the block can have, expressed in key/value pairs. +- `tags`: String + - A condition using Molang queries that results to true/false that can be used to query for blocks with certain tags. minecraft:block > components @@ -527,10 +527,10 @@ _Released from experiment `Upcoming Creator Features` for format versions 1.21.4 Type: Object -- `redstone_conductor`: Boolean - - Determines whether this block conducts direct redstone power. -- `allows_wire_to_step_down`: Boolean - - Determines whether redstone wire can travel down the side of this block. +- `redstone_conductor`: Boolean + - Determines whether this block conducts direct redstone power. +- `allows_wire_to_step_down`: Boolean + - Determines whether redstone wire can travel down the side of this block. minecraft:block > components @@ -549,10 +549,10 @@ _Released from experiment `Holiday Creator Features` for format versions 1.19.60 Type: Boolean/Object -- `origin`: Vector [a, b, c] - - Minimal position of the bounds of the collision box. `origin` is specified as `[x, y, z]` and must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. -- `size`: Vector [a, b, c] - - Size of each side of the collision box. Size is specified as `[x, y, z]`. `origin` + `size` must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. +- `origin`: Vector [a, b, c] + - Minimal position of the bounds of the collision box. `origin` is specified as `[x, y, z]` and must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. +- `size`: Vector [a, b, c] + - Size of each side of the collision box. Size is specified as `[x, y, z]`. `origin` + `size` must be in the range `(-8, 0, -8)` to `(8, 16, 8)`, inclusive. #### Example using Boolean @@ -579,10 +579,10 @@ Causes the block to tick after a random delay in the range specified by `interva Type: Object -- `interval_range`: Range [a, b] - - Two durations (in ticks) which will be used as the minimum and maximum delays for randomness. -- `looping`: Boolean - - Whether this block should continuously tick, rather than only ticking once. +- `interval_range`: Range [a, b] + - Two durations (in ticks) which will be used as the minimum and maximum delays for randomness. +- `looping`: Boolean + - Whether this block should continuously tick, rather than only ticking once. _Released from experiment `Beta APIs` for format versions 1.21.10 and higher._ @@ -607,16 +607,16 @@ Lean about [rotatable blocks](/blocks/rotatable-blocks) to apply rotation based Type: Object -- `rotation`: Vector [a, b, c] - - How many degrees to rotate the geometry. [x ,y, z]. Must be in increments of 90. Can be negative. If not in increment of 90, the game will round to the nearest 90 increment. -- `rotation_pivot`: Vector [a, b, c] - - The pivot point(in block units) to rotate the block on. -- `scale`: Vector [a, b, c] - - How many pixels to scale the geometry. [x ,y, z] -- `scale_pivot`: Vector [a, b, c] - - The pivot point(in block units) to scale the block on. -- `translation`: Vector [a, b, c] - - How many pixels to translate the geometry. [x ,y, z] +- `rotation`: Vector [a, b, c] + - How many degrees to rotate the geometry. [x ,y, z]. Must be in increments of 90. Can be negative. If not in increment of 90, the game will round to the nearest 90 increment. +- `rotation_pivot`: Vector [a, b, c] + - The pivot point(in block units) to rotate the block on. +- `scale`: Vector [a, b, c] + - How many pixels to scale the geometry. [x ,y, z] +- `scale_pivot`: Vector [a, b, c] + - The pivot point(in block units) to scale the block on. +- `translation`: Vector [a, b, c] + - How many pixels to translate the geometry. [x ,y, z] minecraft:block > components diff --git a/docs/blocks/block-models.md b/docs/blocks/block-models.md index cb2df0a5b4e..2f0cd283bb5 100644 --- a/docs/blocks/block-models.md +++ b/docs/blocks/block-models.md @@ -70,7 +70,7 @@ Textures can be created in Blockbench by clicking `Create Texture` and selecting The "paper_bag" model has multiple pre-made textures, listed below: -- `textures/blocks/paper_bag.png` +- `textures/blocks/paper_bag.png` -- `textures/blocks/paper_bag_bottom_fold.png` +- `textures/blocks/paper_bag_bottom_fold.png` -- `textures/blocks/paper_bag_side_gusset.png` +- `textures/blocks/paper_bag_side_gusset.png` RP/textures/terrain_texture.json @@ -59,7 +59,7 @@ This is an example of how to create 3 texture variations for the vanilla dirt bl ## Weighted Texture Variation -After using the example above, you might want to adjust the weights, edit the `terrain_textures.json` to include a weight field as shown below. +After using the example above, you might want to adjust the weights, edit the `terrain_texture.json` to include a weight field as shown below. To calculate how likely a texture variation is, add all of the weights together (in this case 70 + 20 + 10 = 100) and divide the weight by this total. For example, the probability of the `dirt0` variation being chosen is 70 ÷ 100, so 70% of positions in the world will display `dirt0` if dirt is placed there. diff --git a/docs/blocks/blocks-as-items.md b/docs/blocks/blocks-as-items.md index cc5a7050ead..642c635c3a9 100644 --- a/docs/blocks/blocks-as-items.md +++ b/docs/blocks/blocks-as-items.md @@ -43,7 +43,7 @@ One example of a situation where replacing the block item is necessary is with f "minecraft:geometry": "minecraft:geometry.cross", "minecraft:material_instances": { "*": { - "texture": "daffodil", + "texture": "wiki:daffodil", "render_method": "alpha_test" } } @@ -66,7 +66,7 @@ One example of a situation where replacing the block item is necessary is with f } }, "components": { - "minecraft:icon": "daffodil", + "minecraft:icon": "wiki:daffodil", "minecraft:block_placer": { "block": "wiki:daffodil", "replace_block_item": true diff --git a/docs/blocks/blocks-intro.md b/docs/blocks/blocks-intro.md index aa2cc69b0ca..6456002a5b1 100644 --- a/docs/blocks/blocks-intro.md +++ b/docs/blocks/blocks-intro.md @@ -66,9 +66,9 @@ Below is the **minimum** behavior-side code to get a custom block into the creat ### Block Description -- Defines the block's `identifier` - a unique ID in the format of `namespace:identifier`. -- Configures which `menu_category` the block is placed into. - - Also takes the optional parameters `group` and `is_hidden_in_commands`. +- Defines the block's `identifier` - a unique ID in the format of `namespace:identifier`. +- Configures which `menu_category` the block is placed into. + - Also takes the optional parameters `group` and `is_hidden_in_commands`. _The block description is also home to [states](/blocks/block-states) and [traits](/blocks/block-traits), which are covered in their own pages._ @@ -107,13 +107,13 @@ Let's configure our own functionality! } ``` -- [`minecraft:destructible_by_mining`](/blocks/block-components#destructible-by-mining) defines how long the player will need to mine the block until it breaks. Currently, it isn't possible to set different destroy times for different tools. -- [`minecraft:destructible_by_explosion`](/blocks/block-components#destructible-by-explosion) defines the resistance to explosions. The higher the value, the lower the chance of destruction. -- [`minecraft:friction`](/blocks/block-components#friction) defines how much friction the block has. For example, soul sand has a high value for friction, so it slows the players. Ice has a lower friction value, so it has a slippery effect. The friction of classic blocks such as wood or stone is `0.4`. -- [`minecraft:map_color`](/blocks/block-components#map-color) is the hex color code that will be displayed on a Minecraft map to represent this block. `#ffffff` means white. You can get hex codes for other colors [here](https://www.google.com/search?q=hex+color+picker). -- [`minecraft:light_dampening`](/blocks/block-components#light-dampening) defines how much light will be blocked from passing through. -- [`minecraft:light_emission`](/blocks/block-components#light-emission) defines the light level the block will output. -- [`minecraft:loot`](/blocks/block-components#loot) defines a loot table path for the block to drop. If this is removed, then the block will drop itself. You can learn more about loot tables [here](/loot/loot-tables). +- [`minecraft:destructible_by_mining`](/blocks/block-components#destructible-by-mining) defines how long the player will need to mine the block until it breaks. Currently, it isn't possible to set different destroy times for different tools. +- [`minecraft:destructible_by_explosion`](/blocks/block-components#destructible-by-explosion) defines the resistance to explosions. The higher the value, the lower the chance of destruction. +- [`minecraft:friction`](/blocks/block-components#friction) defines how much friction the block has. For example, soul sand has a high value for friction, so it slows the players. Ice has a lower friction value, so it has a slippery effect. The friction of classic blocks such as wood or stone is `0.4`. +- [`minecraft:map_color`](/blocks/block-components#map-color) is the hex color code that will be displayed on a Minecraft map to represent this block. `#ffffff` means white. You can get hex codes for other colors [here](https://www.google.com/search?q=hex+color+picker). +- [`minecraft:light_dampening`](/blocks/block-components#light-dampening) defines how much light will be blocked from passing through. +- [`minecraft:light_emission`](/blocks/block-components#light-emission) defines the light level the block will output. +- [`minecraft:loot`](/blocks/block-components#loot) defines a loot table path for the block to drop. If this is removed, then the block will drop itself. You can learn more about loot tables [here](/loot/loot-tables). _Browse more block components [here](/blocks/block-components)!_ @@ -154,7 +154,7 @@ Now, we need to link the texture shortname to an image file path in `RP/textures "num_mip_levels": 4, // Quality of texture when viewed from a distance or at an angle "texture_data": { // Our texture shortname: - "custom_block": { + "wiki:custom_block": { "textures": "textures/blocks/custom_block" // Link to an image file name } } @@ -165,7 +165,7 @@ Now, we need to link the texture shortname to an image file path in `RP/textures Textures can also be applied per face. For example, a custom "compass block" could use the following ✨stunning✨ textures: -- `textures/blocks/compass_block_down.png` +- `textures/blocks/compass_block_down.png` -- `textures/blocks/compass_block_up.png` +- `textures/blocks/compass_block_up.png` - + -- `textures/blocks/compass_block_north.png` +- `textures/blocks/compass_block_north.png` -- `textures/blocks/compass_block_east.png` +- `textures/blocks/compass_block_east.png` -- `textures/blocks/compass_block_south.png` +- `textures/blocks/compass_block_south.png` -- `textures/blocks/compass_block_west.png` +- `textures/blocks/compass_block_west.png` BP/scripts/custom_crop.js @@ -177,7 +177,7 @@ For example, if `wiki:growth` is 7, the texture is set to `custom_crop_3` and th "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_0", + "texture": "wiki:custom_crop_0", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -208,7 +208,7 @@ For example, if `wiki:growth` is 7, the texture is set to `custom_crop_3` and th "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_1", + "texture": "wiki:custom_crop_1", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -239,7 +239,7 @@ For example, if `wiki:growth` is 7, the texture is set to `custom_crop_3` and th "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_2", + "texture": "wiki:custom_crop_2", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -279,7 +279,7 @@ For example, if `wiki:growth` is 7, the texture is set to `custom_crop_3` and th "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_3", + "texture": "wiki:custom_crop_3", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -351,7 +351,7 @@ Here is the entire `wiki:custom_crop` file for reference. "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_0", + "texture": "wiki:custom_crop_0", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -391,7 +391,7 @@ Here is the entire `wiki:custom_crop` file for reference. "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_1", + "texture": "wiki:custom_crop_1", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -422,7 +422,7 @@ Here is the entire `wiki:custom_crop` file for reference. "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_2", + "texture": "wiki:custom_crop_2", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -453,7 +453,7 @@ Here is the entire `wiki:custom_crop` file for reference. "components": { "minecraft:material_instances": { "*": { - "texture": "custom_crop_3", + "texture": "wiki:custom_crop_3", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false @@ -557,7 +557,7 @@ Holding a crop block in your hand wouldn't look right, so we place the crop with } }, "components": { - "minecraft:icon": "custom_seeds", + "minecraft:icon": "wiki:custom_seeds", "minecraft:block_placer": { "block": "wiki:custom_crop" // The block this item is placing. } @@ -584,7 +584,7 @@ Your crop can't only drop seeds! Create a custom food using the template below. } }, "components": { - "minecraft:icon": "custom_food", + "minecraft:icon": "wiki:custom_food", "minecraft:food": { "nutrition": 4, "saturation_modifier": 0.6 diff --git a/docs/blocks/custom-glazed-terracotta.md b/docs/blocks/custom-glazed-terracotta.md index 2d0d15b442d..836dfd5571d 100644 --- a/docs/blocks/custom-glazed-terracotta.md +++ b/docs/blocks/custom-glazed-terracotta.md @@ -108,7 +108,7 @@ This will create a vanilla-like custom glazed terracotta. }, "minecraft:material_instances": { "*": { - "texture": "purple_glazed_terracotta", + "texture": "wiki:custom_glazed_terracotta", "render_method": "opaque" } } diff --git a/docs/blocks/custom-trapdoors.md b/docs/blocks/custom-trapdoors.md index c73d33d85dd..cadc2187560 100644 --- a/docs/blocks/custom-trapdoors.md +++ b/docs/blocks/custom-trapdoors.md @@ -60,7 +60,7 @@ This is the block JSON you'll need for basic trapdoor functionality. It includes "minecraft:geometry": "geometry.trapdoor", "minecraft:material_instances": { "*": { - "texture": "acacia_trapdoor", + "texture": "wiki:custom_trapdoor", "render_method": "alpha_test_single_sided" } } diff --git a/docs/blocks/fake-blocks.md b/docs/blocks/fake-blocks.md index 37ee4b4718f..b214602f190 100644 --- a/docs/blocks/fake-blocks.md +++ b/docs/blocks/fake-blocks.md @@ -66,9 +66,9 @@ To align your entity in rotation, you will need some Math. Apply that code on the core folder (that has all the other groups inside) of your model in an animation, make sure the pivot point is 0 in the X and Z Axis, to avoid visual bugs. And also you don't need to add components like: -- `"minecraft:behavior.look_at_entity": {}` -- `"minecraft:behavior.look_at_player": {}` -- `"minecraft:behavior.look_at_target": {}` +- `"minecraft:behavior.look_at_entity": {}` +- `"minecraft:behavior.look_at_player": {}` +- `"minecraft:behavior.look_at_target": {}` The reason why is because this will change the Target Y Rotation, causing it to move the Body Y Rotation so the Model will move. Don't add walk components too. @@ -124,7 +124,7 @@ Block used to summon the dummy entity right on the block, and as the block is ce "minecraft:geometry": "geometry.empty", "minecraft:material_instances": { "*": { - "texture": "empty" + "texture": "wiki:empty" } }, "minecraft:destructible_by_mining": { diff --git a/docs/blocks/flipbook-textures.md b/docs/blocks/flipbook-textures.md index 75c0be02d61..d0d0c775c74 100644 --- a/docs/blocks/flipbook-textures.md +++ b/docs/blocks/flipbook-textures.md @@ -13,8 +13,8 @@ description: Flipbook (animated) textures for blocks. From this page you will learn: -- How to apply flipbook textures to a block. -- Which values you can apply in `RP/textures/flipbook_textures.json` and what they do. +- How to apply flipbook textures to a block. +- Which values you can apply in `RP/textures/flipbook_textures.json` and what they do. ## Applying Flipbook Textures @@ -103,7 +103,7 @@ While looking up for something in vanilla flipbook texture file, you may notice | Component | Type | Description | | ------------------ | ---------------- | ----------------------------------------------------------------------------------------------------------- | | flipbook_texture | string | Path to texture. | -| atlas_tile | string | The shortname defined in the terrain_textures.json. | +| atlas_tile | string | The shortname defined in the `terrain_texture.json` file. | | atlas_index | integer | The index of the texture array inside the definition of that shortname. | | atlas_tile_variant | integer | The variant of the block's texture array inside the shortname's block variation. | | ticks_per_frame | integer | How fast frames should be changed. 20 ticks = 1 second. | diff --git a/docs/blocks/precise-interaction.md b/docs/blocks/precise-interaction.md index 90379c6b1df..b0ee09e600a 100644 --- a/docs/blocks/precise-interaction.md +++ b/docs/blocks/precise-interaction.md @@ -112,7 +112,7 @@ export default class FaceSelectionPlains { ### Methods -- #### constructor +- #### constructor ```ts new FaceSelectionPlains(...plains: { origin: [number, number]; size: [number, number]; name?: string }[]) @@ -120,27 +120,27 @@ export default class FaceSelectionPlains { Creates a new `FaceSelectionPlains` instance. - + - - **plains**: `Object[]` + - **plains**: `Object[]` Array defining the 2D areas on a block's face which may be selected. - - **origin**: `[number, number]` + - **origin**: `[number, number]` [U, V] array defining the offset of the plain from the top left of the block face. - - **size**: `[number, number]` + - **size**: `[number, number]` [U, V] array defining the size of the plain, extending from the top left. - - **name**?: `string` + - **name**?: `string` Custom name to easily identify this plain when it is selected. - + -- #### getSelected +- #### getSelected ```ts getSelected(selection: { face: Direction; faceLocation: Vector3 }, options?: { invertU?: boolean; invertV?: boolean }): number | string | undefined @@ -148,33 +148,33 @@ export default class FaceSelectionPlains { Returns the involved plain's array index, or name if provided. If no plain is selected, `undefined` is returned. - + - - **selection**: `Object` + - **selection**: `Object` Object containing details about the selection. - - **face**: [`Direction`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/direction) + - **face**: [`Direction`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/direction) The selected face of the block. - - **faceLocation**: [`Vector3`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/vector3) + - **faceLocation**: [`Vector3`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/vector3) Selection location relative to the bottom north-west corner of the block. - - **options**?: `Object` + - **options**?: `Object` Optionally configure how the selected plain is calculated. - - **invertU**?: `boolean` + - **invertU**?: `boolean` Horizontal axis goes `right -> left` rather than `left -> right` if true. - - **invertV**?: `boolean` + - **invertV**?: `boolean` Vertical axis goes `bottom -> top` rather than `top -> bottom` if true. - + ### Usage @@ -309,7 +309,7 @@ export default class SelectionBoxes { ### Methods -- #### constructor +- #### constructor ```ts new SelectionBoxes(...boxes: { origin: [number, number, number]; size: [number, number, number]; name?: string }[]) @@ -317,27 +317,27 @@ export default class SelectionBoxes { Creates a new `SelectionBoxes` instance. - + - - **boxes**: `Object[]` + - **boxes**: `Object[]` Array defining the 3D areas within a block which may be selected. - - **origin**: `[number, number, number]` + - **origin**: `[number, number, number]` [X, Y, Z] array defining the offset of the box from the block's horizontal middle and vertical bottom in pixels, extending from the north-east. - - **size**: `[number, number, number]` + - **size**: `[number, number, number]` [X, Y, Z] array defining the size of the box in pixels, extending from the north-east.br> - - **name**?: `string` + - **name**?: `string` Custom name to easily identify this box when it is selected. - + -- #### getSelected +- #### getSelected ```ts getSelected(faceLocation: Vector3, options?: { invertX?: boolean; invertY?: boolean; invertZ?: boolean }): number | string | undefined @@ -347,29 +347,29 @@ export default class SelectionBoxes { Returns the involved box's array index, or name if provided. If no box is selected, `undefined` is returned. - + - - **faceLocation**: [`Vector3`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/vector3) + - **faceLocation**: [`Vector3`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/vector3) Selection location relative to the bottom north-west corner of the block. - - **options**?: `Object` + - **options**?: `Object` Optionally configure how the selected box is calculated. - - **invertX**?: `boolean` + - **invertX**?: `boolean` X axis extends `west -> east` rather than `east -> west` if true, following [Blockbench](https://blockbench.net)'s displayed positions. - - **invertY**?: `boolean` + - **invertY**?: `boolean` Y axis extends `up -> down` rather than `down -> up` if true. - - **invertZ**?: `boolean` + - **invertZ**?: `boolean` Z axis extends `south -> north` rather than `north -> south` if true. - + ### Usage @@ -474,10 +474,10 @@ Interacting with paper will fill the selected slot. Destroying the block release "texture": "stripped_bamboo_block" }, "empty_slot": { - "texture": "pigeonholes_empty" + "texture": "wiki:pigeonholes_empty" }, "occupied_slot": { - "texture": "pigeonholes_occupied" + "texture": "wiki:pigeonholes_occupied" } } }, @@ -679,12 +679,12 @@ Using our [SelectionBoxes](#selectionboxes-class) class, the player can interact }, // Material instances defined in model: "dirt": { - "texture": "double_flower_pot_dirt", // Apply a darker tint to the dirt texture to replicate vanilla potted dirt + "texture": "wiki:double_flower_pot_dirt", // Apply a darker tint to the dirt texture to replicate vanilla potted dirt "render_method": "alpha_test", "ambient_occlusion": false }, "handle": { - "texture": "double_flower_pot_handle", + "texture": "wiki:double_flower_pot_handle", "render_method": "alpha_test" }, "dandelion": { diff --git a/docs/blocks/precise-rotation.md b/docs/blocks/precise-rotation.md index 738cb12ae4b..6604eb8ce95 100644 --- a/docs/blocks/precise-rotation.md +++ b/docs/blocks/precise-rotation.md @@ -23,9 +23,9 @@ _Looking for regular rotation? Learn about it [here](/blocks/rotatable-blocks)!_ Features: -- Can be placed on the top of blocks, with 16 possible rotations -- Can be placed on the side faces of blocks (north, east, south & west) -- Rotation behaves the same as vanilla mob heads - without the performance hit from block entities! +- Can be placed on the top of blocks, with 16 possible rotations +- Can be placed on the side faces of blocks (north, east, south & west) +- Rotation behaves the same as vanilla mob heads - without the performance hit from block entities! ## Block Model @@ -33,10 +33,10 @@ To allow for more precise rotation, your block's model will need a few extra bon There are 4 bones required for precise ground rotation, each with different Y axis rotations: -- `up_0` (Y rotation = 0) -- `up_22_5` (Y rotation = 22.5) -- `up_45` (Y rotation = 45) -- `up_67_5` (Y rotation = 67.5) +- `up_0` (Y rotation = 0) +- `up_22_5` (Y rotation = 22.5) +- `up_45` (Y rotation = 45) +- `up_67_5` (Y rotation = 67.5) **These rotations are in a clockwise direction.** @@ -206,7 +206,7 @@ Below is the base "shell" block we will be adding advanced rotation to. }, "minecraft:material_instances": { "*": { - "texture": "shell" // Shortname defined in `RP/textures/terrain_texture.json` + "texture": "wiki:shell" // Shortname defined in `RP/textures/terrain_texture.json` } }, // Prevent block from being placed on `down` face @@ -461,7 +461,7 @@ Your block JSON and script files after the above steps should look similar to th }, "minecraft:material_instances": { "*": { - "texture": "shell" + "texture": "wiki:shell" } }, "minecraft:placement_filter": { @@ -557,9 +557,9 @@ world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => { What you have created: -- [x] Block model supporting precise rotation -- [x] Block with 16 supported rotation values, allowing placement on 5 block faces (20 total orientations) -- [x] Custom block component that can be used to set this rotation state +- [x] Block model supporting precise rotation +- [x] Block with 16 supported rotation values, allowing placement on 5 block faces (20 total orientations) +- [x] Custom block component that can be used to set this rotation state --- diff --git a/docs/blocks/troubleshooting-blocks.md b/docs/blocks/troubleshooting-blocks.md index d342f76addd..fc94a27e9c1 100644 --- a/docs/blocks/troubleshooting-blocks.md +++ b/docs/blocks/troubleshooting-blocks.md @@ -42,22 +42,22 @@ Navigate to your `RP/textures/terrain_texture.json`. Ensure that the file is pro "padding": 8, "num_mip_levels": 4, "texture_data": { - "dirt_like": { + "wiki:dirt_like": { "textures": "textures/blocks/dirt_like" // You can replace this with anything, just remember the name }, - "log_like_top": { - "textures": "textures/blocks/log_like_top" // You can replace this with anything, just remember the name + "wiki:custom_log_top": { + "textures": "textures/blocks/custom_log_top" // You can replace this with anything, just remember the name }, - "log_like_side": { - "textures": "textures/blocks/log_like_side" // You can replace this with anything, just remember the name + "wiki:custom_log_side": { + "textures": "textures/blocks/custom_log_side" // You can replace this with anything, just remember the name }, - "custom_grass_top": { + "wiki:custom_grass_top": { "textures": "textures/blocks/custom_grass_top" // You can replace this with anything, just remember the name }, - "custom_grass_bottom": { + "wiki:custom_grass_bottom": { "textures": "textures/blocks/custom_grass_bottom" // You can replace this with anything, just remember the name }, - "custom_grass_side": { + "wiki:custom_grass_side": { "textures": "textures/blocks/custom_grass_side" // You can replace this with anything, just remember the name } } @@ -80,7 +80,7 @@ Dirt like block example: "components": { "minecraft:material_instances": { "*": { - "texture": "dirt_like" + "texture": "wiki:dirt_like" } } } @@ -90,22 +90,22 @@ Dirt like block example: Log like block example: -BP/blocks/log_like.json +BP/blocks/custom_log.json ```json { "format_version": "1.21.40", "minecraft:block": { "description": { - "identifier": "wiki:log_like" + "identifier": "wiki:custom_log" }, "components": { "minecraft:material_instances": { "*": { - "texture": "log_like_side" + "texture": "wiki:custom_log_side" }, "end": { - "texture": "log_like_top" + "texture": "wiki:custom_log_top" }, "up": "end", "down": "end" @@ -129,13 +129,13 @@ Grass-like block example: "components": { "minecraft:material_instances": { "*": { - "texture": "custom_grass_side" + "texture": "wiki:custom_grass_side" }, "up": { - "texture": "custom_grass_top" + "texture": "wiki:custom_grass_top" }, "down": { - "texture": "custom_grass_bottom" + "texture": "wiki:custom_grass_bottom" } } } @@ -214,9 +214,9 @@ Problem: You get a content error similar to: Solution: Check your `minecraft:collision_box` or `minecraft:selection_box` components and do the following: -- Make sure the X and Z values are in the range `-8` - `8`. -- Make sure the Y value is in the range `0` - `16`. -- Make sure the box doesn't exit the block's 16×16×16 unit area. +- Make sure the X and Z values are in the range `-8` - `8`. +- Make sure the Y value is in the range `0` - `16`. +- Make sure the box doesn't exit the block's 16×16×16 unit area. ## 3.2 - Model Errors diff --git a/docs/concepts/overwriting-assets.md b/docs/concepts/overwriting-assets.md index f7aa00148c6..debd0538874 100644 --- a/docs/concepts/overwriting-assets.md +++ b/docs/concepts/overwriting-assets.md @@ -1,5 +1,6 @@ --- title: Overwriting Assets +description: Overwriting assets explained. tags: - intermediate mentions: @@ -7,7 +8,6 @@ mentions: - MedicalJewel105 - Luthorius - SmokeyStack -description: Overwriting assets explained. --- ## Add-on Layering @@ -20,7 +20,7 @@ This layered structure is very useful, because it allows us to access the files If the vanilla assets change, for example if [JAPPA](https://twitter.com/JasperBoerstra?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor) updates the stone texture, your add-on will also receive the update, since you are relying on the actual dynamic, vanilla resources. -You should try to use this system of layering as often as you can. If you don't *need* to copy/paste something into your add-on, don't. +You should try to use this system of layering as often as you can. If you don't _need_ to copy/paste something into your add-on, don't. :::warning It is never OK to make an add-on inside of a copy of the vanilla resource/behavior pack. This will make the download for your add-on incredibly huge, and will reduce performance. Always begin with a blank add-on, then copy/paste the files you want to overwrite. @@ -38,11 +38,11 @@ Different resources have different methods of overwriting, so be careful to use Assets that are referenced by _path_, and do _not have an identifier_ can be overwritten by simply placing a new asset into the same path. The following can be overwritten in this way: -- Functions -- Loot tables -- Textures -- Sounds -- Trade Tables +- Functions +- Loot tables +- Textures +- Sounds +- Trade Tables When you overwrite these files, the overwriting is absolute: The new asset will fully replace the old asset. @@ -54,15 +54,15 @@ When you overwrite these files, the overwriting is absolute: The new asset will Many assets are defined not by their name, but by their identifier! To overwrite these assets, simply create a new file that shares the same identifier, regardless of file-path. The following can be overwritten in this way: -- BP Entities -- RP Entities -- Animations -- Models -- Animation Controllers -- Spawn Rules -- Recipes -- Particles -- Render Controllers +- BP Entities +- RP Entities +- Animations +- Models +- Animation Controllers +- Spawn Rules +- Recipes +- Particles +- Render Controllers When you overwrite these files, the overwriting is absolute: The new asset will fully replace the old asset. @@ -78,32 +78,32 @@ Many assets can also be registered into some kind of "registration system" file. The following files work in this way: -- All UI files -- [All language files](/concepts/text-and-translations) -- `item_textures.json` -- `flipbook_textures.json` -- `terrain_textures.json` -- `sounds.json` -- `music_definitions.json` -- `sound_definitions.json` +- All UI files +- [All language files](/concepts/text-and-translations) +- `item_texture.json` +- `flipbook_textures.json` +- `terrain_texture.json` +- `sounds.json` +- `music_definitions.json` +- `sound_definitions.json` :::tip -**Example:** Lets say you want to override the `sugar` texture, using the reference files. You can do so by creating a new `item_textures.json`, with the following contents: +**Example:** Lets say you want to override the `sugar` texture, using the reference files. You can do so by creating a new `item_texture.json`, with the following contents: ```json { - "resource_pack_name": "vanilla", - "texture_data": { - "sugar": { - "textures": "textures/path/to/my/sugar" - } - } + "resource_pack_name": "vanilla", + "texture_data": { + "sugar": { + "textures": "textures/path/to/my/sugar" + } + } } ``` -This _definition_ will be merged with the vanilla `item_textures.json`, and will override the short-name `sugar`. When the vanilla item accesses this short-name, it will get a reference to your custom texture path, instead of the actual texture path to sugar. +This _definition_ will be merged with the vanilla `item_texture.json`, and will override the short-name `sugar`. When the vanilla item accesses this short-name, it will get a reference to your custom texture path, instead of the actual texture path to sugar. ::: ## Overwriting Dangers @@ -116,6 +116,6 @@ This is mostly a problem with `player.json` (in either the RP or the BP), since Not everything can be overwritten, the following is a list of things that cannot be overwritten using any of the described methods: -- Vanilla items (Not all) -- Vanilla blocks -- Vanilla fogs (create a fog with another namespace and change it everywhere it is used) +- Vanilla items (Not all) +- Vanilla blocks +- Vanilla fogs (create a fog with another namespace and change it everywhere it is used) diff --git a/docs/contribute-style.md b/docs/contribute-style.md index 84764f87cbd..f017c9e0f49 100644 --- a/docs/contribute-style.md +++ b/docs/contribute-style.md @@ -53,9 +53,9 @@ The list of available categories in a section can be found in the section's `ind Here are some of the common categories that you'll be able to use in most sections, check the page sidebar for others: -- General -- Tutorials -- Documentation +- General +- Tutorials +- Documentation #### Available Tags @@ -63,20 +63,20 @@ Tags are defined in the `docs/.vitepress/tags.ts` file. If you'd like to add a n If you're just looking for existing tags, here is the list of tags that this wiki currently supports: -- -- -- -- -- -- -- -- -- -- -- -- -- -- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ### Content @@ -279,16 +279,16 @@ Every page that is inside a folder has to be accessed by writing the name of the A regular bullet-pointed list. ```md -- This -- Is -- A -- List +- This +- Is +- A +- List ``` -- This -- Is -- A -- List +- This +- Is +- A +- List --- @@ -315,16 +315,16 @@ A list with consecutive numbers in place of bullet points. A list where each item is either checked or unchecked. An `x` between the square brackets marks the item as checked. ```md -- [x] This -- [x] Is -- [ ] A -- [x] List +- [x] This +- [x] Is +- [ ] A +- [x] List ``` -- [x] This -- [x] Is -- [ ] A -- [x] List +- [x] This +- [x] Is +- [ ] A +- [x] List ## Working with Components @@ -341,11 +341,11 @@ We have snippets for our components. To see them, start typing `wiki.` in Markdo Some components support a `color` attribute which can be used to add more visual flair! Here are the values that the wiki currently supports: -- -- -- -- -- +- +- +- +- +- ### Button @@ -475,13 +475,13 @@ Remember to format json. You can use [this](https://jsonformatter.curiousconcept The filepath goes between the two HTML-Tags. Make sure to follow our [Style-Guide](/meta/style-guide) when describing filepaths: -- If you link inside a Behavior-Pack, place `BP` in front of all other files: +- If you link inside a Behavior-Pack, place `BP` in front of all other files: ✔️ `BP/blocks/example.json` ❌ `YourBehaviorPack/blocks/example.json` -- Same for the Resource-Pack, use `RP` in front of all other files: +- Same for the Resource-Pack, use `RP` in front of all other files: ✔️ `RP/manifest.json` @@ -655,8 +655,8 @@ Wrong: Correct: ````md -- one -- two +- one +- two BP/blocks/example.json @@ -688,9 +688,9 @@ Title case is a casing style that must be used in page titles and headings. Some examples: -- `Welcome to the Wiki!` -- `Your First Add-On` -- `How It Works` +- `Welcome to the Wiki!` +- `Your First Add-On` +- `How It Works` ### Headings @@ -701,19 +701,19 @@ Some examples: Some examples: -- ✔️ `## A Page` +- ✔️ `## A Page` ❌ `# A Page` -- ✔️ `### Some Other Layer` +- ✔️ `### Some Other Layer` ❌ `###### Some Other Layer` -- ✔️ `## My Own Article` +- ✔️ `## My Own Article` ❌ `## my own: article` -- ✔️ `## Next Steps` +- ✔️ `## Next Steps` ❌ `## Next Steps:` @@ -721,7 +721,7 @@ Some examples: 1. Use CodeHeaders, unless it is illogical or not possible. 2. Fully extend JSON Code if it improves readability aka. as ["Prettified Code"](https://jsonformatter.curiousconcept.com/#). - - Do not extend `.geo.json` files as it would be too long. + - Do not extend `.geo.json` files as it would be too long. 3. If the code is too long or not necessary, wrap it in a spoiler component. 4. Use `RP` and `BP` as root folders. 5. Make comments but not many. @@ -745,18 +745,18 @@ Example: "components": { "minecraft:max_stack_size": 64, // Short description of a value/component. // Make notes about a group of specific components (icon and glint in our case) used below this way. - "minecraft:icon": "copper_coin", + "minecraft:icon": "wiki:copper_coin", "minecraft:glint": 3.5 } } } ``` -- `minecraft:max_stack_size` +- `minecraft:max_stack_size` ... -- `minecraft:icon` +- `minecraft:icon` ... @@ -778,7 +778,7 @@ The above steps will be done automatically if you install the [Prettier](https:/ ✔️ ```md -- list +- list ``` ❌ diff --git a/docs/entities/entity-intro-rp.md b/docs/entities/entity-intro-rp.md index 73cde1d69c7..ba7b691d6fd 100644 --- a/docs/entities/entity-intro-rp.md +++ b/docs/entities/entity-intro-rp.md @@ -50,9 +50,10 @@ This page will break down each part of the entity file and explain each part. Fo } ``` -While it may look overwhelming, many of these sections are just *shortname definitions*. A shortname definition is where we assign an asset such as a texture path or a geometry identifier to a shortname which we can then reference later. This means if we change where an asset is located later, we only have to change it one place. Additionally, it allows our code to be cleaner without needing write out long path locations or identifiers. +While it may look overwhelming, many of these sections are just _shortname definitions_. A shortname definition is where we assign an asset such as a texture path or a geometry identifier to a shortname which we can then reference later. This means if we change where an asset is located later, we only have to change it one place. Additionally, it allows our code to be cleaner without needing write out long path locations or identifiers. ## Materials + A material describes the way that a texture is rendered. For example, skeletons have a material which allows the texture to be transparent and endermen have one which allows their eyes to glow. There are many materials that you can use without needing to make your own. RP/entity/spider.entity.json#minecraft:client_entity/description @@ -64,11 +65,13 @@ A material describes the way that a texture is rendered. For example, skeletons }, ``` -Here the materials are `spider` and `spider_invisible` and the shortnames are `default` and `invisible` respectively. Remember this key just *defines* what material is attached to the shortname, our entity still doesn't know when to use each one. + +Here the materials are `spider` and `spider_invisible` and the shortnames are `default` and `invisible` respectively. Remember this key just _defines_ what material is attached to the shortname, our entity still doesn't know when to use each one. For a list of premade materials, you can check out our page [here](/documentation/materials). For a guide on making your own material, you can check this [page](/visuals/materials). Be warned that this is quite advanced. ## Textures + A texture is an image which gets mapped onto our geometry. Each entity has a different texture. Similarly to materials, this key is also a shortname definition however here, the reference is the path to the texture. RP/entity/bee.entity.json#minecraft:client_entity/description @@ -82,10 +85,12 @@ A texture is an image which gets mapped onto our geometry. Each entity has a dif } ``` + As before, we can define multiple textures. This can be useful if we want different variants of an entity, like for the bee above. Additionally, we can use multiple textures to layer different textures on different bases like how villagers have different biome bases and different profession layers. You can check out our page on render controllers [here](/entities/render-controllers) for more details on how to layer textures. ## Geometry -A geometry is a file which defines a collection of *bones* which make up the shape of our entity. This file can be made automatically using applications like Blockbench. You can check our [guide](/guide/blockbench) for more details on how to make your own models. + +A geometry is a file which defines a collection of _bones_ which make up the shape of our entity. This file can be made automatically using applications like Blockbench. You can check our [guide](/guide/blockbench) for more details on how to make your own models. RP/entity/creeper.entity.json#minecraft:client_entity/description @@ -95,6 +100,7 @@ A geometry is a file which defines a collection of *bones* which make up the sha "charged": "geometry.creeper.charged" } ``` + Here our shortname references the identifier of our geometry. RP/entity/creeper.entity.json#minecraft:client_entity/description @@ -111,6 +117,7 @@ Here our shortname references the identifier of our geometry. } } ``` + Again, we can have multiple geometries such as for the creeper which has two models for its charged and non-charged form. :::tip @@ -118,26 +125,28 @@ Often if your are having trouble with visuals, it may be because of a typo with ::: ## Render Controllers + A render controller simply controls how your entity will be rendered. This file takes the shortnames of your materials, textures and geometries and with them you define when it renders each element. RP/render_controllers/example.rc.json ```json { - "format_version": "1.10.0", - "render_controllers": { - "controller.render.example": { - "geometry": "geometry.default", - "materials": [ - { - "*": "material.default" - } - ], - "textures": ["texture.default"] - } - } + "format_version": "1.10.0", + "render_controllers": { + "controller.render.example": { + "geometry": "geometry.default", + "materials": [ + { + "*": "material.default" + } + ], + "textures": ["texture.default"] + } + } } ``` + Here, this render controller says to always use the `default` material, texture and geometry. You can get much more complex render controllers which allow for switching textures or making certain parts of the geometry invisible. This is explained on our render controller page [here](/entities/render-controllers). To tell our entity which render controller to use, we just add the render controller identifier to our file. @@ -153,6 +162,7 @@ To tell our entity which render controller to use, we just add the render contro The most basic entity file requires these 4 keys in order to properly render an entity. ## Animations + Animations describe how our entity may move. This can include walking animations, attacks or the way entities look at the player. They are defined by code which describe how a geometry moves at certain times or using maths equations. You need a geometry in order for your animations to work. RP/animations/example.a.json @@ -166,6 +176,7 @@ Animations describe how our entity may move. This can include walking animations } } ``` + Each animation is defined by its identifier. Our animation key is then another shortname definition for our animations. RP/entity/example.json#minecraft:client_entity/description @@ -183,11 +194,12 @@ Here you'll notice we also have referenced an animation controller. This control This controller uses the shortnames for animations defined in the animation key. We also additionally define our controller so we are able to reference when to run this controller later. I recommend checking out our guide for some more information on how the animation controller is structured. :::tip IMPORTANT -Remember that this key just *defines* a shortname for our animation and do not run our animation. If you only have this key your animations will not run in the game. +Remember that this key just _defines_ a shortname for our animation and do not run our animation. If you only have this key your animations will not run in the game. ::: ## Scripts -The scripts key defines certain scripts which the entity runs at certain times. This allows us to run animations, set up variables and even control the size of our entity. Additionally, we can use *Molang* to define these. For a more in depth look at Molang, you can check our page [here](/concepts/molang). Overall, Molang is essentially a type of math equation which uses variables. + +The scripts key defines certain scripts which the entity runs at certain times. This allows us to run animations, set up variables and even control the size of our entity. Additionally, we can use _Molang_ to define these. For a more in depth look at Molang, you can check our page [here](/concepts/molang). Overall, Molang is essentially a type of math equation which uses variables. RP/entity/example.json#minecraft:client_entity/description @@ -202,17 +214,21 @@ The scripts key defines certain scripts which the entity runs at certain times. ``` Some useful things in Molang are: + - queries. These are values which change depending on the condition. For example the `query.time_of_day` or `q.time_of_day` query returns the time of day. - variables. These are values can you edit to hold values to use later. For example, you can set the variable `variable.my_number` or `v.my_number` to be say 2. - evaluating. In Molang, we can use operators to return values. For example, we can return the value 1 if `q.time_of_day` is greater than `v.my_number` by writing `q.time_of_day > v.my_number`. ### Initialize + This script runs when the entity is first initialize, that is when it spawns in and each time it is loaded. This means each time you log into your world it will run anything in this script. This is useful for setting default values for custom variables. ### Pre Animation + This script runs every frame before the animations play. This is useful for computing variables that will be used in animations that need to be calculated before the animation runs. ### Animate + This script runs every frame after `pre_animation`. This is where you run animations and animation controllers. Each frame every animation or animation controller in this key will be run. RP/entity/example.json#minecraft:client_entity/description @@ -235,6 +251,7 @@ If we were instead to have `"walk": 2`, then walk animation would always play at If your animations aren't playing then it is a good idea to check if they are defined in `animate` using the correct shortname. ### Scale + Scale controls the size of the model. This is slightly different to the component `minecraft:scale` which you can define in an entity's behavior file. The component `minecraft:scale` scales the model and hitbox of an entity, whereas `scale` in the entity's resource file only scales the model. Depending on your case, either might be more useful. Another difference of `scale` is that you can use Molang and there are 3 additional components: `scaleX`, `scaleY` and `scaleZ`. @@ -268,6 +285,7 @@ A use case of this may be having an atmospheric entity which has a random size. This code will make it so each time the entity is loaded, it will have a random size between the values we chose. Here `math.random_integer` is a Molang function which chooses a random integer between the numbers provided. ## Sound Effects + Sounds effects are sound files which can be played in game at certain times. This key again defines shortnames for sound effects which can be used by the entity in animations. This can be useful for creating more dynamic sounds when an entity interacts with the world. For example, you may want the entity to play 3 sounds as it attacks. RP/entity/example.json#minecraft:client_entity/description @@ -283,6 +301,7 @@ Sounds effects are sound files which can be played in game at certain times. Thi Here, the shortname references the sound shortname defined in the `sound_definitions.json` file. When using the sound elsewhere, such as in a command, you would use `mob.entity.attack_1`, but in an animation defined in the entity, you would use `attack_1`. ## Particle Effects + Particle effects are files which contain information about the movement of many small spires to create effects like smoke or fire. Similarly to sound effects, this key defines short names for particle effects to be used in animations. For example, the phantom has particle effects on its wings as it flies around. RP/entity/example.json#minecraft:client_entity/description @@ -296,6 +315,7 @@ Particle effects are files which contain information about the movement of many Here, the shortname references the identifier for the particle. For more information on particles and making your own, check out our particle pages [here](/particles/particles). For more information on using sound effects and particle effect in animations you can also check out our page [here](/visuals/animation-effects). ## Spawn Egg + The spawn egg key allows us to generate a spawn egg for our entity. When used this will spawn in our entity and is automatically added to the creative inventory. There are two options for the look of your spawn egg, colored and texture. RP/entity/example.json#minecraft:client_entity/description @@ -313,13 +333,14 @@ Using `base_color` and `overlay_color` will create a texture egg similar to the ```json "spawn_egg": { - "texture": "wiki.example", + "texture": "wiki:example", } ``` The `texture` key takes the texture shortname of an image, defined in `item_texture.json`, to use as the image for the spawn egg. If this key is omitted, then a spawn egg will not be generated. ## Additional Settings + `enable_attachments` determines whether or not the entity can use attachments. For example, setting this to false means that the entity cannot hold weapons like swords or bows. `hide_armor` allows the entity to wear armor, but it will not be rendered. diff --git a/docs/entities/spawning-tamed-entities.md b/docs/entities/spawning-tamed-entities.md index 3991723cb1c..c628bc30f81 100644 --- a/docs/entities/spawning-tamed-entities.md +++ b/docs/entities/spawning-tamed-entities.md @@ -132,7 +132,7 @@ To make the tamed wolf spawn only when the projectile hits something, we first n "identifier": "wiki:throwable_pretamed_wolf" }, "components": { - "minecraft:icon": "my_icon", + "minecraft:icon": "wiki:my_icon", "minecraft:throwable": { "do_swing_animation": true }, diff --git a/docs/guide/custom-item.md b/docs/guide/custom-item.md index 2ea07a5bdfe..03391986870 100644 --- a/docs/guide/custom-item.md +++ b/docs/guide/custom-item.md @@ -28,8 +28,8 @@ In this tutorial we are going to learn how to create a simple "ectoplasm" item, Conceptually, items are made up of two parts: -- The visuals (texture, name) -- The behaviors (how the item should behave) +- The visuals (texture, name) +- The behaviors (how the item should behave) First, we will learn how to create a new simple item & define its behaviors. In the next section we will assign a texture to this item, so you can see it in game. @@ -67,8 +67,8 @@ In order for the game to apply the correct components to the correct item, we ne An identifier is a name unique to this item. For a vanilla minecraft egg it's identifier is `minecraft:egg`. An identifier is made of two parts, -- The namespace (`minecraft`) -- The id (`egg`) +- The namespace (`minecraft`) +- The id (`egg`) The namespace is unique to your add-on and you will use it throughout the project. This is to reduce issues if someone adds two packs to your game which both add an ectoplasm item; the namespace reduces the chance of the identifier being the same. The namespace that Minecraft use is `minecraft`. Your namespace should be unique to you, for example the authors initials or an abbreviation of the pack name. We will use the namespace `wiki` in our example; for more information on making a namespace check out our page [here](/concepts/namespaces). @@ -203,14 +203,14 @@ Under `texture_data` will our list of item shortname definitions. An example def RP/textures/item_texture.json/texture_data ```json -"wiki_ectoplasm": { +"wiki:ectoplasm": { "textures": "textures/items/ectoplasm" } ``` -Here `wiki_ectoplasm` is our shortname and under `textures` we have the path to our item. Notice that this is relative to the resource pack, and does not include the file extension. Your shortname should be short and unique. We recommend setting it as the namespace and id for the item we are assigning it to. +Here `wiki:ectoplasm` is our shortname and under `textures` we have the path to our item. Notice that this is relative to the resource pack, and does not include the file extension. Your shortname should be short and unique. We recommend setting it as the namespace and id for the item we are assigning it to. -Now whenever we want to refer our image, we will use the shortname `wiki_ectoplasm`. +Now whenever we want to refer our image, we will use the shortname `wiki:ectoplasm`. ### Icon @@ -221,7 +221,7 @@ To finally apply our texture to our item, we add the `minecraft:icon` component ```json "components": { "minecraft:max_stack_size": 16, - "minecraft:icon": "wiki_ectoplasm" + "minecraft:icon": "wiki:ectoplasm" } ``` @@ -277,7 +277,7 @@ Your folder structure should look like this: }, "components": { "minecraft:max_stack_size": 16, - "minecraft:icon": "wiki_ectoplasm" + "minecraft:icon": "wiki:ectoplasm" } } } @@ -294,7 +294,7 @@ Your folder structure should look like this: "resource_pack_name": "Ghostly Guide", "texture_name": "atlas.items", "texture_data": { - "wiki_ectoplasm": { + "wiki:ectoplasm": { "textures": "textures/items/ectoplasm" } } @@ -307,10 +307,10 @@ If you're having some trouble, check the [Troubleshooting page](/items/troublesh ## Your Progress So Far -- [x] Setup your pack -- [x] Create a custom item -- [x] How to format the behavior and resource files for an item -- [x] What components are and how to use them -- [x] How to set an items texture -- [ ] Create a custom entity -- [ ] Create the entity's loot, spawn rules, and a custom recipe +- [x] Setup your pack +- [x] Create a custom item +- [x] How to format the behavior and resource files for an item +- [x] What components are and how to use them +- [x] How to set an items texture +- [ ] Create a custom entity +- [ ] Create the entity's loot, spawn rules, and a custom recipe diff --git a/docs/items/custom-armor.md b/docs/items/custom-armor.md index 61efdfd536e..ddeb26bbe2b 100644 --- a/docs/items/custom-armor.md +++ b/docs/items/custom-armor.md @@ -43,7 +43,7 @@ Create a chest piece: }, "components": { // The icon we want to use in our INVENTORY - "minecraft:icon": "my_chest", + "minecraft:icon": "wiki:my_chest", // We give it a name "minecraft:display_name": { "value": "My Custom Armor" @@ -169,7 +169,7 @@ So while the chest piece alone is great, you probably want a whole set, so from }, "components": { // Give it an applicable ITEM texture - "minecraft:icon": "my_leggings", + "minecraft:icon": "wiki:my_leggings", "minecraft:display_name": { "value": "My Custom Leggings" }, @@ -264,7 +264,7 @@ This is just like the chest piece, just we change some of the categories and slo } }, "components": { - "minecraft:icon": "my_helm", + "minecraft:icon": "wiki:my_helm", "minecraft:display_name": { "value": "My Custom Helmet" }, @@ -358,7 +358,7 @@ You already know the pattern so lets make the item and attachable json files. } }, "components": { - "minecraft:icon": "my_boots", + "minecraft:icon": "wiki:my_boots", "minecraft:display_name": { "value": "My Custom Boots" }, diff --git a/docs/items/custom-weapon.md b/docs/items/custom-weapon.md index 53bea96a35b..45ce90bb334 100644 --- a/docs/items/custom-weapon.md +++ b/docs/items/custom-weapon.md @@ -51,7 +51,7 @@ Like with the other item tutorials we will start by making a simple custom sword "slot": "sword" }, // This texture is used for both inventory and the hand model - "minecraft:icon": "my_sword", + "minecraft:icon": "wiki:my_sword", "minecraft:display_name": { "value": "My Custom Sword" }, @@ -78,7 +78,7 @@ So at a bare minimum that is enough to get a sword put into the game, we still n "resource_pack_name": "custom-weapon", "texture_name": "atlas.items", "texture_data": { - "my_sword": { + "wiki:my_sword": { // Make sure you have put an icon texture called my_sword.png here "textures": "textures/items/my_sword" } diff --git a/docs/items/item-components.md b/docs/items/item-components.md index 1fd400ec1e3..2f2c1fcd6bf 100644 --- a/docs/items/item-components.md +++ b/docs/items/item-components.md @@ -31,7 +31,7 @@ Item components are used to change how your item appears and functions in the wo "components": { "minecraft:icon": { "textures": { - "default": "custom_item" + "default": "wiki:custom_item" } } } @@ -67,11 +67,11 @@ When used in Survival Mode, the item will be consumed. Type: Object -- `block`: String/Object - - Defines the block that will be placed. -- `use_on`: Array - - List of block descriptors that contain blocks that this item can be used on. If left empty, all blocks will be allowed. See Custom Item Use Priority for more information on use behavior. - - This applies to Creative Mode as well. +- `block`: String/Object + - Defines the block that will be placed. +- `use_on`: Array + - List of block descriptors that contain blocks that this item can be used on. If left empty, all blocks will be allowed. See Custom Item Use Priority for more information on use behavior. + - This applies to Creative Mode as well. minecraft:item > components @@ -94,9 +94,9 @@ _Released from experiment `Bundles` for format versions 1.21.40 and higher._ Type: Object -- `num_viewable_slots`: Integer (1-64) - - Defines the maximum number of item stacks accessible from the top of the bundle. - - Slots are accessed in rows filling from the bottom of the tooltip from right to left. +- `num_viewable_slots`: Integer (1-64) + - Defines the maximum number of item stacks accessible from the top of the bundle. + - Slots are accessed in rows filling from the bottom of the tooltip from right to left. minecraft:item > components @@ -128,11 +128,11 @@ Requires `minecraft:use_modifiers`. Type: Object -- `category`: String - - The type of cool down for this item. -- `duration`: Float - - The duration of time (in seconds) items with a matching category will spend cooling down before becoming usable again. - - If this value is a negative number, it renders the item unusable. +- `category`: String + - The type of cool down for this item. +- `duration`: Float + - The duration of time (in seconds) items with a matching category will spend cooling down before becoming usable again. + - If this value is a negative number, it renders the item unusable. minecraft:item > components @@ -186,8 +186,8 @@ Causes the item to absorb damage that would otherwise be dealt to its wearer. Fo Type: Object -- `absorbable_causes`: Array - - List of damage causes (such as `entity_attack` and `magma`) that can be absorbed by the item. +- `absorbable_causes`: Array + - List of damage causes (such as `entity_attack` and `magma`) that can be absorbed by the item. minecraft:item > components @@ -203,16 +203,16 @@ Determine how quickly an item can dig specific blocks. Type: Object -- `destroy_speeds`: Object - A list of blocks to dig, with correlating speeds of digging. - - `block`: String/Object - What block the item will destroy. - - `tags`: String - - Molang query - - `speed`: Int - - How fast the block will be destroyed. - - Can be negative. If negative, the item will not be able to destroy the block. -- `use_efficiency`: Boolean - - Determines whether the item should be impacted if the `efficiency` enchant is applied to it. - - Does not seem to work. +- `destroy_speeds`: Object - A list of blocks to dig, with correlating speeds of digging. + - `block`: String/Object - What block the item will destroy. + - `tags`: String + - Molang query + - `speed`: Int + - How fast the block will be destroyed. + - Can be negative. If negative, the item will not be able to destroy the block. +- `use_efficiency`: Boolean + - Determines whether the item should be impacted if the `efficiency` enchant is applied to it. + - Does not seem to work. minecraft:item > components @@ -271,24 +271,24 @@ https://bugs.mojang.com/browse/MCPE-180112 Type: Object -- `damage_chance`: Object - Damage chance is the percentage chance of this item losing durability. Default is set at 100. Defined as an int range with min and max value. - - `min`: Int - - Minimum chance for durability to take damage. Range: [0, 100]. - - `max`: Int - - Maximum chance for durability to take damage. Range: [0, 100]. -- `max_durability`: Int - - Max durability is the amount of damage that this item can take before breaking. This is a required parameter with a minimum value of 0. - - Uses signed 16-bit integer. 2’s complements creates negative range. `[32768-65536]` - gets treated as negative. The values given to the item will be `(-32768-0)`. So the negative ranges are `[256*(256x+128) - 256*(256(x+1)))` where x is an arbitrary number. - - https://bugs.mojang.com/browse/MCPE-180112 +- `damage_chance`: Object - Damage chance is the percentage chance of this item losing durability. Default is set at 100. Defined as an int range with min and max value. + - `min`: Int + - Minimum chance for durability to take damage. Range: [0, 100]. + - `max`: Int + - Maximum chance for durability to take damage. Range: [0, 100]. +- `max_durability`: Int + - Max durability is the amount of damage that this item can take before breaking. This is a required parameter with a minimum value of 0. + - Uses signed 16-bit integer. 2’s complements creates negative range. `[32768-65536]` - gets treated as negative. The values given to the item will be `(-32768-0)`. So the negative ranges are `[256*(256x+128) - 256*(256(x+1)))` where x is an arbitrary number. + - https://bugs.mojang.com/browse/MCPE-180112 #### Damage Chance Used to calculate unbreaking chance. -- No Unbreaking - 100% of the time regardless of the range -- Unbreaking I - 50% of the range -- Unbreaking II - 33% of the range -- Unbreaking III - 25% of the range +- No Unbreaking - 100% of the time regardless of the range +- Unbreaking I - 50% of the range +- Unbreaking II - 33% of the range +- Unbreaking III - 25% of the range Max cannot be greater than min @@ -310,20 +310,20 @@ Enables an item to emit effects when it receives damage. Type: Object -- `durability_thresholds`: Array - - Items define both the durability thresholds, and the effects emitted when each threshold is met. - - When multiple thresholds are met, only the threshold with the lowest durability after applying the damage is considered. +- `durability_thresholds`: Array + - Items define both the durability thresholds, and the effects emitted when each threshold is met. + - When multiple thresholds are met, only the threshold with the lowest durability after applying the damage is considered. #### Durability Threshold Type: Object -- `durability`: Integer - - The effects are emitted when the item durability value is less than or equal to this value. -- `particle_type`: String - - Particle effect to emit when the threshold is met. -- `sound_event`: String - - Sound effect to emit when the threshold is met. +- `durability`: Integer + - The effects are emitted when the item durability value is less than or equal to this value. +- `particle_type`: String + - Particle effect to emit when the threshold is met. +- `sound_event`: String + - Sound effect to emit when the threshold is met. minecraft:item > components @@ -349,8 +349,8 @@ Allows the item to be dyed by cauldron water. Once dyed, the item will display t Type: Object -- `default_color`: String - - Optional color to use by default before the player has dyed the item. +- `default_color`: String + - Optional color to use by default before the player has dyed the item. minecraft:item > components @@ -368,34 +368,34 @@ https://bugs.mojang.com/browse/MCPE-180331 Type: Object -- `slot`: String - - What enchantments can be applied (ex. Using `bow` would allow this item to be enchanted as if it were a bow). - - Required Field. -- `value`: Int - - The value of the enchantment (minimum of 0). - - Required Field - - Value is `value % 256` +- `slot`: String + - What enchantments can be applied (ex. Using `bow` would allow this item to be enchanted as if it were a bow). + - Required Field. +- `value`: Int + - The value of the enchantment (minimum of 0). + - Required Field + - Value is `value % 256` #### Slot -- armor_feet -- armor_torso -- armor_head -- armor_legs -- axe -- bow -- cosmetic_head -- crossbow -- elytra -- fishing_rod -- flintsteel -- hoe -- pickaxe -- shears -- shield -- shovel -- sword -- all +- armor_feet +- armor_torso +- armor_head +- armor_legs +- axe +- bow +- cosmetic_head +- crossbow +- elytra +- fishing_rod +- flintsteel +- hoe +- pickaxe +- shears +- shield +- shovel +- sword +- all #### Enchantability Value @@ -431,13 +431,13 @@ Allows the item to place specified entities into the world. Released from experi Type: Object -- `dispense_on`: Array - - List of block descriptors that contain blocks that this item can be dispensed on. If left empty, all blocks will be allowed. - - The mouth of the dispenser has to be pointing to either an air block or the block defined in this array. If it’s an air block, the game checks if the block below matches a block defined in this array -- `entity`: String - - The entity to be placed in the world. -- `use_on`: Array - - List of block descriptors that contain blocks that this item can be used on. If left empty, all blocks will be allowed. See Custom Item Use Priority for more information on use behavior. +- `dispense_on`: Array + - List of block descriptors that contain blocks that this item can be dispensed on. If left empty, all blocks will be allowed. + - The mouth of the dispenser has to be pointing to either an air block or the block defined in this array. If it’s an air block, the game checks if the block below matches a block defined in this array +- `entity`: String + - The entity to be placed in the world. +- `use_on`: Array + - List of block descriptors that contain blocks that this item can be used on. If left empty, all blocks will be allowed. See Custom Item Use Priority for more information on use behavior. minecraft:item > components @@ -461,17 +461,17 @@ Will implicitly play the eating animation in third person. First person requires Type: Object -- `can_always_eat`: Boolean - - If `true` you can always eat this item (even when not hungry). -- `nutrition`: Int - - The value that is added to the actor's nutrition when the item is used. - - Can be negative. - - Max value is the 32-bit integer limit -- `saturation_modifier`: Float - - Saturation Modifier is used in this formula: `(nutrition * saturation_modifier * 2)` when applying the saturation buff. - - Value must be greater than 0 -- `using_converts_to`: String - - When used, converts to the item specified by the string in this field. +- `can_always_eat`: Boolean + - If `true` you can always eat this item (even when not hungry). +- `nutrition`: Int + - The value that is added to the actor's nutrition when the item is used. + - Can be negative. + - Max value is the 32-bit integer limit +- `saturation_modifier`: Float + - Saturation Modifier is used in this formula: `(nutrition * saturation_modifier * 2)` when applying the saturation buff. + - Value must be greater than 0 +- `using_converts_to`: String + - When used, converts to the item specified by the string in this field. minecraft:item > components @@ -492,8 +492,8 @@ Max value is `107374180` inclusive. The reason for this number is because when t Type: Object -- `duration`: Float - - How long in seconds will this fuel cook items for. Minimum value: 0.05. +- `duration`: Float + - How long in seconds will this fuel cook items for. Minimum value: 0.05. minecraft:item > components @@ -551,22 +551,22 @@ Determines the icon to represent the item in the UI and elsewhere. Released from Type: Object -- `textures`: Object - This map contains the different textures that can be used for the item's icon. `default` will contain the actual icon texture. Armor trim textures and palettes can be specified here as well. The icon textures are the keys from the `resource_pack/textures/item_texture.json -> texture_data` object associated with the texture file. - - `default`: String - - The actual icon used for items - - `dyed`: String - - The icon used after the item is dyed in a cauldron. - - This can only be displayed if the item has the `minecraft:dyeable` component. - - `icon_trim`: String - - The icon overlay for when your item has a trim on it. - - `icon_trim` implicitly falls back to the type of slot in the `minecraft:wearable` component. Currently, the icon will only overlay if the shortname matches the item’s identifier. Whether this is a bug or feature is unknown yet. +- `textures`: Object - This map contains the different textures that can be used for the item's icon. `default` will contain the actual icon texture. Armor trim textures and palettes can be specified here as well. The icon textures are the keys from the `resource_pack/textures/item_texture.json -> texture_data` object associated with the texture file. + - `default`: String + - The actual icon used for items + - `dyed`: String + - The icon used after the item is dyed in a cauldron. + - This can only be displayed if the item has the `minecraft:dyeable` component. + - `icon_trim`: String + - The icon overlay for when your item has a trim on it. + - `icon_trim` implicitly falls back to the type of slot in the `minecraft:wearable` component. Currently, the icon will only overlay if the shortname matches the item’s identifier. Whether this is a bug or feature is unknown yet. minecraft:item > components ```json -"minecraft:icon":{ +"minecraft:icon": { "textures": { - "default": "custom_item" + "default": "wiki:custom_item" } } ``` @@ -627,10 +627,10 @@ Projectile item component. Projectile items shoot out, like an arrow. Released f Type: Object -- `minimum_critical_power`: Float - - Defines the time a projectile needs to charge in order to critically hit. -- `projectile_entity`: String - - The entity to be fired as a projectile. If no namespace is specified, it is assumed to be `minecraft`. +- `minimum_critical_power`: Float + - Defines the time a projectile needs to charge in order to critically hit. +- `projectile_entity`: String + - The entity to be fired as a projectile. If no namespace is specified, it is assumed to be `minecraft`. minecraft:item > components @@ -651,10 +651,10 @@ An `epic` rarity item will remain unchanged when enchanted. Type: String -- `common` results in a white name. -- `uncommon` results in a yellow name. -- `rare` results in an aqua name. -- `epic` results in a light purple name. +- `common` results in a white name. +- `uncommon` results in a yellow name. +- `rare` results in an aqua name. +- `epic` results in a light purple name. minecraft:item > components @@ -668,16 +668,16 @@ The record item component allows the item to play a sound when used in a jukebox Type: Object -- `comparator_signal`: Tnt - - Signal strength for comparator blocks to use - - While this value can be any number(even negative!), the comparator signal still locks itself between [0, 15]. -- `duration`: Float - - Duration of sound event in seconds float value. -- `sound_event`: String - - Sound event types - - If sound type is any of the vanilla music discs, the item will have the lore of the artist’s name. When played in a jukebox, an actionbar will appear on the player’s screen describing what record is being played. - - Regardless of what sound type used, the item’s text color will change to aqua just like vanilla music discs - - Only vanilla sound events are allowed +- `comparator_signal`: Tnt + - Signal strength for comparator blocks to use + - While this value can be any number(even negative!), the comparator signal still locks itself between [0, 15]. +- `duration`: Float + - Duration of sound event in seconds float value. +- `sound_event`: String + - Sound event types + - If sound type is any of the vanilla music discs, the item will have the lore of the artist’s name. When played in a jukebox, an actionbar will appear on the player’s screen describing what record is being played. + - Regardless of what sound type used, the item’s text color will change to aqua just like vanilla music discs + - Only vanilla sound events are allowed minecraft:item > components @@ -701,13 +701,13 @@ By default, it can be repaired by itself. It will combine the two durabilities. Type: Object -- `repair_items`: Array - List of repair item entries. - - `repair_amount`: Int/String - - How much durability is repaired - - Molang can be used in the string type. `math.random` can be used. Use `context.other` to get the anvil’s second slot. - - `items`: Array - - The items used to repair the item - - Required Field +- `repair_items`: Array - List of repair item entries. + - `repair_amount`: Int/String + - How much durability is repaired + - Molang can be used in the string type. `math.random` can be used. Use `context.other` to get the anvil’s second slot. + - `items`: Array + - The items used to repair the item + - Required Field minecraft:item > components @@ -760,18 +760,18 @@ Shooter Item Component. Must have the `minecraft:use_modifiers` component in o Type: Object -- `ammunition`: Array - - `item`: String - Denotes the item description identifier. Item must have the `minecraft:projectile` component. - - `use_offhand`: Boolean - When set to `true`, ammunition can be used from the offhand. - - `search_inventory`: Boolean - Determines whether the inventory can be searched for ammunition to use. Required to be `true` if used in Survival. In Creative, required to be true if `use_in_creative` is `false`. Will not consume ammunition if in Creative. - - `use_in_creative`: Boolean - Determines whether the ammunition can be used in Creative mode. -- `charge_on_draw`: Boolean - - Sets if the item is charged when drawn - - Item's `minecraft:use_modifiers` -> `use_duration` must be >= `max_draw_duration`. -- `max_draw_duration`: Float - - Determines how long can the weapon can be drawn before releasing automatically -- `scale_power_by_draw_duration`: Boolean - - When set to `true`, the longer the weapon is drawn, the more power it will have when released +- `ammunition`: Array + - `item`: String - Denotes the item description identifier. Item must have the `minecraft:projectile` component. + - `use_offhand`: Boolean - When set to `true`, ammunition can be used from the offhand. + - `search_inventory`: Boolean - Determines whether the inventory can be searched for ammunition to use. Required to be `true` if used in Survival. In Creative, required to be true if `use_in_creative` is `false`. Will not consume ammunition if in Creative. + - `use_in_creative`: Boolean - Determines whether the ammunition can be used in Creative mode. +- `charge_on_draw`: Boolean + - Sets if the item is charged when drawn + - Item's `minecraft:use_modifiers` -> `use_duration` must be >= `max_draw_duration`. +- `max_draw_duration`: Float + - Determines how long can the weapon can be drawn before releasing automatically +- `scale_power_by_draw_duration`: Boolean + - When set to `true`, the longer the weapon is drawn, the more power it will have when released #### Ammunition @@ -830,22 +830,22 @@ _Released from experiment `Bundles` for format versions 1.21.40 and higher._ Type: Object -- `allow_nested_storage_items`: Boolean - - Determines whether other storage items can be placed into the container. -- `allowed_items`: Array - - Defines the items that are exclusively allowed in the container. - - If empty all items are allowed in the container. -- `banned_items`: Array - - Defines the items that are not allowed in the container. -- `max_slots`: Integer (1-64) - - Defines the number of slots in the container. -- `max_weight_limit`: Integer - - Defines the maximum allowed total weight of all items in the container. - - To calculate the weight of an item, divide 64 by its max stack size. - - Items that stack to 64 weigh 1 each, those that stack to 16 weigh 4 each and unstackable items weigh 64. -- `weight_in_storage_item`: Integer (0-64) - - Defines the additional weight the item adds when inside another storage item. - - A value of 0 means that this item is not allowed inside another storage item. +- `allow_nested_storage_items`: Boolean + - Determines whether other storage items can be placed into the container. +- `allowed_items`: Array + - Defines the items that are exclusively allowed in the container. + - If empty all items are allowed in the container. +- `banned_items`: Array + - Defines the items that are not allowed in the container. +- `max_slots`: Integer (1-64) + - Defines the number of slots in the container. +- `max_weight_limit`: Integer + - Defines the maximum allowed total weight of all items in the container. + - To calculate the weight of an item, divide 64 by its max stack size. + - Items that stack to 64 weigh 1 each, those that stack to 16 weigh 4 each and unstackable items weigh 64. +- `weight_in_storage_item`: Integer (0-64) + - Defines the additional weight the item adds when inside another storage item. + - A value of 0 means that this item is not allowed inside another storage item. minecraft:item > components @@ -868,8 +868,8 @@ The `tags` component determines which tags are attached to an item. Type: Object -- `tags`: Array - - List of tags attached to the item. +- `tags`: Array + - List of tags attached to the item. minecraft:item > components @@ -887,23 +887,23 @@ Throwable item component. Throwable items, such as a snowball. Released from exp Type: Object -- `do_swing_animation`: Boolean - - Whether the item should use the swing animation when thrown. -- `launch_power_scale`: Float - - The scale at which the power of the throw increases. - - Can be negative. Negative values will launch the projectile the opposite way. -- `max_draw_duration`: Float - - The maximum duration to draw a throwable item. - - Can be negative. Will shoot instantly. - - No side effects if max is less than min from testing. -- `max_launch_power`: Float - - The maximum power to launch the throwable item. - - Can be negative. -- `min_draw_duration`: Float - - The minimum duration to draw a throwable item. - - Can be negative. Will shoot instantly. -- `scale_power_by_draw_duration`: Boolean - - Whether or not the power of the throw increases with duration charged. When `true`, The longer you hold, the more power it will have when released. +- `do_swing_animation`: Boolean + - Whether the item should use the swing animation when thrown. +- `launch_power_scale`: Float + - The scale at which the power of the throw increases. + - Can be negative. Negative values will launch the projectile the opposite way. +- `max_draw_duration`: Float + - The maximum duration to draw a throwable item. + - Can be negative. Will shoot instantly. + - No side effects if max is less than min from testing. +- `max_launch_power`: Float + - The maximum power to launch the throwable item. + - Can be negative. +- `min_draw_duration`: Float + - The minimum duration to draw a throwable item. + - Can be negative. Will shoot instantly. +- `scale_power_by_draw_duration`: Boolean + - Whether or not the power of the throw increases with duration charged. When `true`, The longer you hold, the more power it will have when released. minecraft:item > components @@ -934,16 +934,16 @@ Type: String #### Known Animations -- eat -- drink -- bow -- block -- camera -- crossbow -- none -- brush -- spear -- spyglass +- eat +- drink +- bow +- block +- camera +- crossbow +- none +- brush +- spear +- spyglass ### Use Modifiers @@ -951,12 +951,12 @@ Modifies use effects, including how long an item takes to use and the player's s Type: Object -- `movement_modifier`: Float - - Modifier value to scale the players movement speed when item is in use. - - Range: [0, 1] -- `use_duration`: Float - - How long the item takes to use in seconds. - - Required Field +- `movement_modifier`: Float + - Modifier value to scale the players movement speed when item is in use. + - Range: [0, 1] +- `use_duration`: Float + - How long the item takes to use in seconds. + - Required Field minecraft:item > components @@ -973,8 +973,8 @@ Determines where the item can be worn. If any non-hand slot is chosen, the max s Type: Object -- `protection`: Int -- `slot`: String +- `protection`: Int +- `slot`: String minecraft:item > components diff --git a/docs/items/items-intro.md b/docs/items/items-intro.md index 046c42a14ed..b2a363585fb 100644 --- a/docs/items/items-intro.md +++ b/docs/items/items-intro.md @@ -53,9 +53,9 @@ Below is the **minimum** behavior-side code to get a custom item into the creati ### Item Description -- Defines the item's identifier - a unique ID in the format of `namespace:identifier`. -- Configures which `menu_category` the item is placed into. - - Also takes the optional parameters `group` and `is_hidden_in_commands`. +- Defines the item's identifier - a unique ID in the format of `namespace:identifier`. +- Configures which `menu_category` the item is placed into. + - Also takes the optional parameters `group` and `is_hidden_in_commands`. ## Adding Components @@ -99,7 +99,7 @@ We need to create a texture shortname to link it to an image in `RP/textures/ite "resource_pack_name": "wiki", "texture_name": "atlas.items", "texture_data": { - "custom_item": { + "wiki:custom_item": { "textures": "textures/items/custom_item" } } @@ -121,7 +121,7 @@ In our item file, we will add the `minecraft:icon` component to apply the textur } }, "components": { - "minecraft:icon": "custom_item" + "minecraft:icon": "wiki:custom_item" } } } @@ -141,7 +141,7 @@ tile.wiki:custom_item.name=Custom Item In this page, you've learnt about the following: -- [x] Basic features of items -- [x] How to apply a texture -- [x] How to link textures using shortnames in `item_textures.json` -- [x] How to define names in the language file +- [x] Basic features of items +- [x] How to apply a texture +- [x] How to link textures using shortnames in `item_texture.json` +- [x] How to define names in the language file diff --git a/docs/items/throwable.md b/docs/items/throwable.md index 3718acf82cd..844f0938ad1 100644 --- a/docs/items/throwable.md +++ b/docs/items/throwable.md @@ -42,7 +42,7 @@ First, you'll want to make the actual item: "minecraft:projectile": { "projectile_entity": "wiki:throwable_item_entity" }, - "minecraft:icon": "throwable_item" + "minecraft:icon": "wiki:throwable_item" } } } diff --git a/docs/items/troubleshooting-items.md b/docs/items/troubleshooting-items.md index f2738a801e2..7a2ee6a5676 100644 --- a/docs/items/troubleshooting-items.md +++ b/docs/items/troubleshooting-items.md @@ -1,5 +1,6 @@ --- title: Troubleshooting Items +description: Troubleshooting guide to items. category: General tags: - help @@ -11,7 +12,6 @@ mentions: - TheDoctor15 - ThomasOrs - QuazChick -description: Troubleshooting guide to items. --- :::tip @@ -26,18 +26,18 @@ No need to panic! This page will help debug common issues. ### Item Doesn't Exist -- Confirm that your pack is actually applied to your world -- Confirm that your item is in the folder `BP/items/` -- Confirm that your item is valid, according to [jsonlint](https://jsonlint.com/). -- Confirm that your identifier is all lowercase, and looks similar to this: `wiki:my_item` +- Confirm that your pack is actually applied to your world +- Confirm that your item is in the folder `BP/items/` +- Confirm that your item is valid, according to [jsonlint](https://jsonlint.com/). +- Confirm that your identifier is all lowercase, and looks similar to this: `wiki:my_item` ### Missing Textures Navigate to your `item_texture.json` file. Ensure that it is properly named, and in the correct folder. Some examples of wrong names: -- ⚠️ `texture/item_texture.json` -- ⚠️ `textures/Item_texture.json` -- ⚠️ `textures/item_textures.json` +- ⚠️ `texture/item_texture.json` +- ⚠️ `textures/Item_texture.json` +- ⚠️ `textures/item_textures.json` Here is an example file to compare against: @@ -48,7 +48,7 @@ Here is an example file to compare against: "resource_pack_name": "wiki", "texture_name": "atlas.items", "texture_data": { - "your_item_icon": { + "wiki:your_item_icon": { "textures": "textures/items/your_item_icon" } } @@ -70,7 +70,7 @@ Next, navigate to your items BP file. Place the `minecraft:icon` component in yo } }, "components": { - "minecraft:icon": "your_item_icon" // Make sure this string matches the shortname you put in item_texture.json + "minecraft:icon": "wiki:your_item_icon" // Make sure this string matches the shortname you put in item_texture.json } } } diff --git a/docs/visuals/retexturing-spawn-eggs.md b/docs/visuals/retexturing-spawn-eggs.md index 507d3d817fa..dcd00d3844f 100644 --- a/docs/visuals/retexturing-spawn-eggs.md +++ b/docs/visuals/retexturing-spawn-eggs.md @@ -1,14 +1,14 @@ --- title: Retexturing Spawn Eggs +description: Change the default texture of an entity's spawn egg. +category: Tutorials tags: - beginner -category: Tutorials mentions: - SirLich - Joelant05 - MedicalJewel105 - aexer0e -description: Change spawn default texture of spawn egg. --- Custom entities will automatically be given a spawn egg. This spawn egg can be found inside of the creative menu, with a name like `item.spawn_egg.entity.wiki:my_entity.name`. If you want to rename your spawn egg as well as set a texture, you can do so in the lang files. @@ -33,13 +33,14 @@ Now we need to give our texture a short-name. This can be done in item_texture f ```json { - "resource_pack_name": "My Map Name", //I don't actually know if this field does anything. - "texture_name": "atlas.items", - "texture_data": { - "my_entity": { //"my_entity" is the short-name of the texture, which we can reference later - "textures": "textures/items/egg/my_entity" - } - //Add more spawn egg textures here + "resource_pack_name": "My Map Name", //I don't actually know if this field does anything. + "texture_name": "atlas.items", + "texture_data": { + "wiki:my_entity": { + // "my_entity" is the short-name of the texture, which we can reference later + "textures": "textures/items/egg/my_entity" + } + // Add more spawn egg textures here } } ``` @@ -52,9 +53,9 @@ Now we can use our new texture inside of the Resource Pack entity file: ```json "spawn_egg": { - "texture": "my_entity", //"my entity should match the texture short-name we created in step-1. + "texture": "wiki:my_entity", // "wiki:my_entity" should match the texture short-name we created in step-1. "texture_index": 0 } ``` -Go and test it now! \ No newline at end of file +Go and test it now! From cb446da51a5028c67adef9c6a2baee996eeb9d2e Mon Sep 17 00:00:00 2001 From: QuazChick Date: Tue, 4 Feb 2025 18:32:57 +0000 Subject: [PATCH 2/2] Corrected formatting --- docs/blocks/precise-interaction.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/blocks/precise-interaction.md b/docs/blocks/precise-interaction.md index b0ee09e600a..d5fb0ab2b2e 100644 --- a/docs/blocks/precise-interaction.md +++ b/docs/blocks/precise-interaction.md @@ -120,7 +120,7 @@ export default class FaceSelectionPlains { Creates a new `FaceSelectionPlains` instance. - + - **plains**: `Object[]` @@ -138,7 +138,7 @@ export default class FaceSelectionPlains { Custom name to easily identify this plain when it is selected. - + - #### getSelected @@ -148,7 +148,7 @@ export default class FaceSelectionPlains { Returns the involved plain's array index, or name if provided. If no plain is selected, `undefined` is returned. - + - **selection**: `Object` @@ -174,7 +174,7 @@ export default class FaceSelectionPlains { Vertical axis goes `bottom -> top` rather than `top -> bottom` if true. - + ### Usage @@ -317,7 +317,7 @@ export default class SelectionBoxes { Creates a new `SelectionBoxes` instance. - + - **boxes**: `Object[]` @@ -335,7 +335,7 @@ export default class SelectionBoxes { Custom name to easily identify this box when it is selected. - + - #### getSelected @@ -347,7 +347,7 @@ export default class SelectionBoxes { Returns the involved box's array index, or name if provided. If no box is selected, `undefined` is returned. - + - **faceLocation**: [`Vector3`](https://learn.microsoft.com/minecraft/creator/scriptapi/minecraft/server/vector3) @@ -369,7 +369,7 @@ export default class SelectionBoxes { Z axis extends `south -> north` rather than `north -> south` if true. - + ### Usage