#Anyone got Block::isSolid/isAir/isLiquid working?

1 messages · Page 1 of 1 (latest)

coarse magnet
#

I'd need the support for Block::isSolid for my extension. I can never seem to make it work. I updated by dependencies to :

        "@minecraft/server": "^1.14.0-beta.1.21.20-preview.22",
        "@minecraft/server-admin": "^1.0.0-beta.1.21.20-preview.22",
        "@minecraft/server-gametest": "^1.0.0-beta.1.21.20-preview.22",
        "@minecraft/server-net": "^1.0.0-beta.1.21.20-preview.22",
        "@minecraft/server-ui": "^1.3.0-beta.1.21.20-preview.22"

I also switched from stable to preview in the minecraft launcher. My code is rebuilt but I keep getting undefined when I access isSolid. For example, i'm trying to output the block's solidity to work with it but I keep getting this:

`Nearest input block is ${nearestInputBlock.x}, ${nearestInputBlock.y}, ${nearestInputBlock.z} with solidity ${nearestInputBlock.isSolid}`

outputs: Nearest input block is -6, 64, -91 with solidity undefined

tawny stone
#

what you've sent there is just the typings versions, which are only responsible for the autocomplete in your editor. The version in your manifest is what controls the version the game uses

coarse magnet
#

That could also be it, I also realize that I forgot to enable beta apis and holiday creator in the preview world

#

That could be it

tawny stone
#

holiday creator isn't needed and shouldn't be used

#

that will be getting removed next update

coarse magnet
#

Ok i seem to have 1.5.0 for server version which is probably the problem. Should i put something similar to the type definition?

"dependencies": [
        {
            "uuid": "6a90778b-4707-498d-8381-d10b2bad8cfa",
            "version": [1,0,0]
        },
        {
          "module_name": "@minecraft/server",
          "version": "1.5.0"
        }
    ],
    "header": {
        "name": "Electronics BP",
        "description": "This addon adds multiple blocks all related to basic electronics such as gates, you can use red stone or wires to transmit power.",
        "min_engine_version": [
            1,
            20,
            60
        ],
        "uuid": "e3228c67-d60a-4f87-9ce9-27044caa0b0c",
        "version": [
            1,
            0,
            0
        ]
    },
tawny stone
#

what version of the game are you on?

#

are you working within the Preview edition of the game or release version?

coarse magnet
#

preview

#

I just moved my BP and RP to the preview folder, recreated a world, reactivated the holiday creator switch (Even if useless) and beta apis

tawny stone
#
        "@minecraft/server": "^1.14.0-beta.1.21.20-preview.22", // 1.14.0-beta
        "@minecraft/server-admin": "^1.0.0-beta.1.21.20-preview.22", // 1.0.0-beta
        "@minecraft/server-gametest": "^1.0.0-beta.1.21.20-preview.22", // 1.0.0-beta
        "@minecraft/server-net": "^1.0.0-beta.1.21.20-preview.22", // 1.0.0-beta
        "@minecraft/server-ui": "^1.3.0-beta.1.21.20-preview.22" // 1.3.0-beta
#

you can see what version you need by the beginning of the string in the package.json file

coarse magnet
#

ok lol, so i'm like 9 minor versions behind

tawny stone
#

like if you want to use custom components for items and blocks, holiday creator features will cause errors

coarse magnet
#

ok, so i really don't need it at all then

tawny stone
coarse magnet
#

No worries there

#

Thanks a lot, i hope it'll work

tawny stone
coarse magnet
#

Yay it works

#

Thanks for the link too

#

Works really well, thanks, look at that:

#

Allowed me to do this