#What value am i supposed to set after .opaque()

45 messages · Page 1 of 1 (latest)

craggy tangle
#

Hi, i'm very new to this (started today) i also have no experience in coding in any language whatsoever. What value is expected for those variables ?

zealous burrowBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

raw roost
#

it takes a boolean directly, not strings

craggy tangle
#

does that mean i dont need the "

raw roost
#
.opaque(false)
.fullBlock(false)
.waterlogged()
craggy tangle
#

ohhhhh

#

splendid

#

thank you very much

#

I'll boot it back up to make sure it works and close teh ticket

raw roost
craggy tangle
#

I saw you capitalizing the L so i did just that and uh

#

could that be the issue ?

raw roost
#

seems to be just this

    @Info("Makes the block can be waterlogged.")
    public BlockBuilder waterlogged() {
        return property(BlockStateProperties.WATERLOGGED);
    }
#

lwoercase L and no params

craggy tangle
#

ohhhh

#

got it

#

thank you

raw roost
craggy tangle
#

That's weird

#

i'm hashtag puzzled

raw roost
#

copy the code here

craggy tangle
#

sure

#

StartupEvents.registry('block', event => { event.create('iron_grate') .displayName('Iron Grate') .soundType('COPPER_GRATE') .hardness(3.0) .resistance(6.0) .tagBlock('my_custom_tag') .requiresTool(true) .tagBlock('waterloggable') .tagBlock('minecraft:mineable/pickaxe') .tagBlock('minecraft:needs_stone_tool') .renderType('cutout') .opaque(false) .fullBlock(false) .waterlogged() })

#

that's not how i do a code block on discord

#

oops

raw roost
#

try this

StartupEvents.registry('block', event => {
  event.create('iron_grate')
    .soundType('COPPER_GRATE')
    .hardness(3.0)
    .resistance(6.0)
    .tagBlock('my_custom_tag')
    .requiresTool(true)
    .tagBlock('waterloggable')
    .tagBlock('minecraft:mineable/pickaxe')
    .tagBlock('minecraft:needs_stone_tool')
    .defaultTranslucent()
    .opaque(false)
    .fullBlock(false)
    .waterlogged()
})
#

for codeblocks

river sailBOT
#

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)
})
craggy tangle
#

oh thank you

#

Also just making sure but i do have to restart my game right

raw roost
#

yes you do

craggy tangle
#

i've heard some kubejs things like recipes can just be refreshed with /kubejs reload

raw roost
#

thats because /reload is reloading datapacks, which happen after you start the game
registry happens when you start the game

#

must be restarted

craggy tangle
#

Okay

#

thank you you're of great help

#

Understanding goes a long way it's not just about fixing

raw roost
#

:D

#

always happy to help when someone wants to learn

craggy tangle
#

YAHOOEY !!!

#

Thank you

#

🙏

craggy tangle