... | @@ -2,6 +2,10 @@ Crucible allows people to create "custom blocks" using the extra block states fr |
... | @@ -2,6 +2,10 @@ Crucible allows people to create "custom blocks" using the extra block states fr |
|
|
|
|
|
Items that are configured to be blocks will have their corresponding block placed in the world where the player is looking when right-clicked, and will drop the original item when broken by default (unless configured otherwise).
|
|
Items that are configured to be blocks will have their corresponding block placed in the world where the player is looking when right-clicked, and will drop the original item when broken by default (unless configured otherwise).
|
|
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
|
|
## Disclaimer
|
|
|
|
|
|
Custom Blocks use blockstates to work. This can lead to some glitchy looking behaviour with block updates, if you are using Paper it is recommended to disable updates for these blocks.
|
|
Custom Blocks use blockstates to work. This can lead to some glitchy looking behaviour with block updates, if you are using Paper it is recommended to disable updates for these blocks.
|
|
Head to `/config/paper-global.yml` and disable block updates for the base block type you use in the section at the top. This example disables Noteblock updates.
|
|
Head to `/config/paper-global.yml` and disable block updates for the base block type you use in the section at the top. This example disables Noteblock updates.
|
|
```yaml
|
|
```yaml
|
... | @@ -11,18 +15,23 @@ block-updates: |
... | @@ -11,18 +15,23 @@ block-updates: |
|
disable-noteblock-updates: true
|
|
disable-noteblock-updates: true
|
|
disable-tripwire-updates: false
|
|
disable-tripwire-updates: false
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
## Custom Block Options
|
|
## Custom Block Options
|
|
All options are placed under a `CustomBlock` section on an item.
|
|
All options are placed under a `CustomBlock` section on an item.
|
|
|
|
|
|
MUSHROOM_BLOCK and NOTE_BLOCK are considered as "solid" blocks, these blocks need a path to the texture to generate itself, other blocks (TRIPWIRE and CHORUS) are non solid this means you can omit the `Texture` field and Crucible will use the model assigned to the item
|
|
MUSHROOM_BLOCK and NOTE_BLOCK are considered as "solid" blocks, these blocks need a path to the texture to generate itself, other blocks (TRIPWIRE and CHORUS) are non solid this means you can omit the `Texture` field and Crucible will use the model assigned to the item
|
|
|
|
|
|
### Base Options
|
|
| Option | Description | Default |
|
|
- `Type` - The type of custom block, defaults to mushroom (MUSHROOM_BLOCK, NOTE_BLOCK, TRIPWIRE, CHORUS)
|
|
|------------------|-------------------------------------------------------------------------|-----------|
|
|
- `Id` - The ID of the custom block.
|
|
| Type | The type of custom block | MUSHROOM |
|
|
- `Texture` - The path of the texture the block will use, or none if block is non solid
|
|
| Id | The ID of the custom block | 0 |
|
|
- `Textures` - Optional: Texture key and path the block will use (Needed if you want to assign different texture per face)
|
|
| Parent | Parent model that the block should use | minecraft:block/cube_all |
|
|
- `Parent` - Optional: Parent model that the block should use (Useful when having different textures per face)
|
|
| Model | The path to the model. Generated automatically | |
|
|
- `Variants` - Optional: Gives the ability to have variant of the block (having different rotations)
|
|
| Texture | The path of the texture the block will use, or none if block is non solid. Gets ignored if `Textures` is set | |
|
|
|
|
| Textures | Paths of the textures that the block will use | |
|
|
|
|
| Variants | Possible variants of the block (having different rotations) | |
|
|
|
|
| Drops | What the block will drop. Defaults to itself | |
|
|
|
|
|
|
```yaml
|
|
```yaml
|
|
CustomBlock:
|
|
CustomBlock:
|
... | @@ -31,26 +40,38 @@ MUSHROOM_BLOCK and NOTE_BLOCK are considered as "solid" blocks, these blocks nee |
... | @@ -31,26 +40,38 @@ MUSHROOM_BLOCK and NOTE_BLOCK are considered as "solid" blocks, these blocks nee |
|
Texture: block/stars1
|
|
Texture: block/stars1
|
|
```
|
|
```
|
|
|
|
|
|
## Putting in Resource Pack
|
|
### Type Option
|
|
Please refer to the [Resourcepack Generator](ResourcePack-Generator) wiki page for info.
|
|
The possible block types are
|
|
|
|
| Type | Aliases | Solid |
|
|
|
|
|-------------------|---------------------------------------------------------------------------|--------|
|
|
|
|
| `MUSHROOM` | `MUSHROOM_BLOCK`, `MUSHROOMBLOCK` | true |
|
|
|
|
| `NOTEBLOCK` | `NOTE`, `NOTE_BLOCK` | true |
|
|
|
|
| `TRIPWIRE` | `WIRE`, `STRING` | false |
|
|
|
|
| `CHORUS` | `CHORUS_PLANT` | false |
|
|
|
|
|
|
## Examples
|
|
### Textures Option
|
|
```yaml
|
|
|
|
TestBlock:
|
|
Each key inside this option will correspond to a texture of the Parent model, and their value will be their path.
|
|
Id: STONE
|
|
This means that there is not set amount of possible keys for this option, and they instead depends on the Parent.
|
|
Model: 5
|
|
|
|
Display: 'Probably a Block'
|
|
Let's take, for example, the `cube_top` model
|
|
Type: BLOCK
|
|
```json
|
|
CustomBlock:
|
|
{
|
|
Type: MUSHROOM_BLOCK
|
|
"parent": "block/cube",
|
|
Id: 30
|
|
"textures": {
|
|
Texture: block/exampletexture
|
|
"particle": "#side",
|
|
CustomBlockSkills:
|
|
"down": "#side",
|
|
- sound{s=block.amethyst_block.place} @self ~onBlockPlace
|
|
"up": "#top",
|
|
- sound{s=block.amethyst_block.break} @self ~onBlockBreak
|
|
"north": "#side",
|
|
|
|
"east": "#side",
|
|
|
|
"south": "#side",
|
|
|
|
"west": "#side"
|
|
|
|
}
|
|
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
This block will have a different texture on top
|
|
It has the `particle`, `down`, `up`, `north`, `east`, `south` and `west` particles explicitly declared, and they inherit what the `side` and `top` particles are set to if any. This means that, if we inherit this Parent, we can use the `side` and `top` keys to set the textures of the block
|
|
|
|
|
|
```yaml
|
|
```yaml
|
|
TestBlock:
|
|
TestBlock:
|
|
Id: STONE
|
|
Id: STONE
|
... | @@ -65,6 +86,16 @@ TestBlock: |
... | @@ -65,6 +86,16 @@ TestBlock: |
|
top: block/top_texture
|
|
top: block/top_texture
|
|
side: block/side_texture
|
|
side: block/side_texture
|
|
```
|
|
```
|
|
|
|
> This block will have a different texture on top
|
|
|
|
|
|
|
|
### Variants Option
|
|
|
|
With variants you can make your blocks have different rotations from each other with a probability. This option can be configured by defining a list of possible variants, each list being an hashmap containing specific keys that can be omitted
|
|
|
|
| Variants Keys | Description |
|
|
|
|
|---------------|-----------------------------|
|
|
|
|
| weight | The weight of the variant |
|
|
|
|
| x | The x rotation |
|
|
|
|
| y | The y rotation |
|
|
|
|
| uvLock | Whether the uv of the textures should be locked |
|
|
|
|
|
|
This block will have two random rotation variant
|
|
This block will have two random rotation variant
|
|
```yaml
|
|
```yaml
|
... | @@ -87,6 +118,27 @@ TestBlock: |
... | @@ -87,6 +118,27 @@ TestBlock: |
|
weigth: 3
|
|
weigth: 3
|
|
```
|
|
```
|
|
|
|
|
|
|
|
## Putting in Resource Pack
|
|
|
|
Please refer to the [Resourcepack Generator](ResourcePack-Generator) wiki page for info.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
```yaml
|
|
|
|
TestBlock:
|
|
|
|
Id: STONE
|
|
|
|
Model: 5
|
|
|
|
Display: 'Probably a Block'
|
|
|
|
Type: BLOCK
|
|
|
|
CustomBlock:
|
|
|
|
Type: MUSHROOM_BLOCK
|
|
|
|
Id: 30
|
|
|
|
Texture: block/exampletexture
|
|
|
|
CustomBlockSkills:
|
|
|
|
- sound{s=block.amethyst_block.place} @self ~onBlockPlace
|
|
|
|
- sound{s=block.amethyst_block.break} @self ~onBlockBreak
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This tripwire block will use the model generated from the item's `Generation` field
|
|
This tripwire block will use the model generated from the item's `Generation` field
|
|
```yaml
|
|
```yaml
|
|
TestTripwire:
|
|
TestTripwire:
|
... | | ... | |