#Does anyone know how to fix this error?

1 messages · Page 1 of 1 (latest)

dense stump
#

[Scripting][error]-Plugin [Server BP - 1.0.0] - [main.js] ran with error: [SyntaxError: Could not find export 'BlockLocation' in module '@minecraft/server']

tiny carbon
crude ingot
#

ChatGPT 💀

tiny carbon
#

Oh yea

crude ingot
tiny carbon
#

Ik

#

it took me a sec

urban geode
#

BlockLocation doesn't exist anymore

crude ingot
#

There isn't a console

dry ginkgo
dry ginkgo
crude ingot
dry ginkgo
dense stump
shut star
#

Importing everything is unnecessary for it to work. All you need is world and system, and most of the stuff will branch out from their property and methods.

In this case, world.dimension.getBlock() will return a Block Class instance, even if you did not import the Block class from "@minecraft/server", the method and property will still be usable.

Importing it is only necessary if you use TypeScript where the data type is strict, or when you need to create a new instance of that class (BlockPermutation, ItemStack, Server Forms), or you just do it for instanceof keyword

#

For your issue, just import what is necessary, Vector doesn't need to be imported, and you still be able to access the block.location property

(In the first place, Vector Class is just a fancier way to do Math with Vector3. Vector Class is not Vector3 )