🧊Compressed Block

Explanation

The compressed blocks are used to define more precisely compressed variants for a block.

Mandatory properties

There are no mandatory properties for this block but it is suggested to have at least a texture field in it

Optional properties

chevron-rightπŸ–ŒοΈ Texturehashtag

Name : texture

Description :

This value will behave the same as if the value of a block is a string. It is a string representing a texture location

Warning: You can't have a texture object if a model object is already present

Example :

"texture": "minecraft:block/stone"
chevron-rightπŸ“¦ Modelhashtag

Name : model

Default : {}

Description :

Defines a custom model for compressed blocks. The model is composed of 2 different parts. The first one is the parent which allows you to define which model will be used as the parent of the model The second one is the textures , it works like the one in the normal minecraft models. When launched the game will apply the layer defines in the configuration on all the textures in the textures object.

Warning: You can't have a model object if a texture object is already present

Example :

"model": {
  "parent":"minecraft:block/acacia_log",
  "textures": {
    "side": "minecraft:block/stone"
  }
}

Here the model of the compressed block will be the one of an acacia log with stone on the side. The layer to indicate the tier of compression will only be applied on the side because it was the only texture that we precised in the model.

chevron-rightβš™οΈ Classhashtag

Name : class

Default : net.minecraft.world.level.block.Block

Description :

Defines a custom java class used to create the block in the game registries.

Warning : The used class must have a constructor with only a BlockBehaviour.Properties paramater. If you use a class without a constructor or with a constructor with other paramaters, the block won't be created.

Example :

"class": "net.minecraft.world.level.block.SlimeBlock"

Here we create a block which will behave like a slime, so players will be able to bounce on it and it will stick other blocks.

chevron-rightπŸ–ΌοΈ Render Typehashtag

Name : renderType

Default : solid

Description :

The render type defines what behaviour the game renderer should apply for the block The available values for this property are

  • solid : Used for fully solid blocks, such as stone.

  • cutout : Used for blocks where any pixel is either fully solid or fully transparent, i.e. with either full or no transparency, for example glass.

  • cutout_mipped :Variant of cutout that will scale down textures at large distances to avoid visual artifacts.

  • translucent : Used for blocks where any pixel may be partially transparent, for example stained glass.

Example :

chevron-rightπŸ› οΈ Push Reactionhashtag

Name : pushReaction

Default : normal

Description :

Defines which behaviour will have the block when pushed by a piston. The available values are

  • normal : The block will be pushed and retracted normally

  • destroy : The block will be destroyed when pushed, such as shulker boxes

  • block : The block won't be pushed by the piston, such as obsidian

  • push_only : The block will only be pushed by the piston but not retracted, such as glazed terracota

Example :

Here, when pushed by a piston, the compressed block will be destroyed

chevron-rightπŸ‘οΈ No Occlusionhashtag

Name : noOcclusion

Default : false

Description :

Defines if the game should render faces even if there is a block next to it. If set to true , the game will always render all faces of the block.

Example :

chevron-rightπŸ’‘ Lighthashtag

Name : light

Default : 0

Description :

Defines what light level should emit the block This value goes from 1 to 15

Example :

chevron-rightπŸ“’ Sound Type (1.21.1 only)hashtag

Name : soundType

Default : empty

Description :

Defines what sounds should emit the block when placed, broken, stepped on, etc... The available values are available on the Minecraft Wikiarrow-up-right

Warning : You can't use modded sound types in this field

Example :

chevron-rightπŸ“‹Tagshashtag

Name : tags

Default : {}

Description :

Defines custom tags that will be applied on compressed blocks. This property is a java object defined with 2 sub objects : These objects are both a list of string which corresponds to a tag. These two list are named item and block

Note: Each compressed block is by default generated with 3 tags :

  • compressed:compressed

  • compressed:compressed/<type>

  • compressed:compressed/<type>/<tier>

Example :

Here we add the tag minecraft:mineable/pickaxe to the compressed blocks and the tag c:cobblestones to the items linked to these blocks.

Example

Here we create compressed block for stone. These blocks will look like stone block but with the layer. They will behave like a slime block, sound like it, destroyed when pushed by a piston, emit light, and they can be broken by a pickaxe

Last updated