#How to give custom block a BlockBehavior like ignitedByLava on KubeJS NeoForge 1.21.1
5 messages · Page 1 of 1 (latest)
You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes
```js :arrow_left:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
This example will look like this:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes
```js :arrow_left:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
This example will look like this:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes
```js :arrow_left:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
This example will look like this:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
StartupEvents.registry('block', event => {
event.create('black_wooden_planks') // Create a new block
.displayName('Black Wooden Planks') // Set a custom name
.soundType('wood') // Set a material (affects the sounds and some properties)
.hardness(2) // Set hardness (affects mining time)
.resistance(3) // Set resistance (to explosions, etc)
.tagBlock('minecraft:planks') // Tag the block with `#my_namespace:my_other_tag`
.tagBlock('minecraft:mineable/axe') //can be mined faster with an axe
})
BlockEvents.modification(event => {
Blocks.FIRE.setFlammable("kubejs:black_wooden_planks", 5, 20)
})