#Replicate spawn egg in script
1 messages · Page 1 of 1 (latest)
I've also tried getting blocks from the player's view direction, with FaceLocation, but it gives the same error. if what im trying to do is incorrect, can someone help me replicate a spawn egg?
I guess you could say im also trying to replicate minecraft:entity_placer aswell
block face is the distance from the northwest corner
so you are trying to spawn a creeper at 0,0,0
oh, in that case
how would I replicate entity_placer
const DirectionToVector = {
[Direction.Down]: Vector.down,
[Direction.Up]: Vector.up,
[Direction.North]: Vector.forward,
[Direction.South]: Vector.back,
[Direction.West]: Vector.left,
[Direction.East]: Vector.right,
};```
Just use blockFace
Vector.add(DirectionToVector[blockFace],block.location);
you might need to switch the vector value for north and south
placeLocation is a better name but ya
Make sure the creeper spawns correctly in every direction
...
oh so do I test for the direction in the if statement?
Why would you test for direction
I said Im confused.
oh, ill import Direction.
You have to import Direction and Vector from server with world
Ya and Vector
DirectionToVector needs to be initaized
yeah idk what im doing, nothings working.
is this even helping me replicate entity_placer
does this even look right
I tried it in game and there's this error.
const blockFace = data.blockFace