#Doesnt run my command
1 messages · Page 1 of 1 (latest)
Anyone?
try putting a random say command in your tick function to see if it's set up correctly
when you reload the chat should spam whatever you put in the say command
if not, then your tick function isn't set up correctly
execute as name runs only if there is a player with that name.. if you are trying it for randomentity named bot it will not work
that too
carpet mode fake player
also you dont need @e in that situation.. you can use @n and it will have exactly the sane effect but it will be a lot more efficient
then confirm that functions exists/runs properly before trying to connect them
@n still has to search through all entities to find the nearest one
you could write @e[limit=1] to increase efficiency but that's not the problem here
but it stops at that one.. adding limit 1 will also work
it doesnt?
alrighty then the problem is either that your tick function isn't being read by the game, or you haven't correctly set up the tick.json file to tell it to run every tick
{
"values": [
"trapessentials:tick"
]
}
does the function run when you manually run it in chat with /function?
is my tick.json
The hit one does
what about tick
its minecraft/tags/functions right
s
function should be singular ;)
man i feel dumb
nahhh we've all been there :P
dw it was with s it got changed in update
yea it was super annoying lol
I had this question too that
item replace block ~ ~ ~ container.0 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.1 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.2 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.3 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.4 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.5 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.6 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.7 with minecraft:armor_stand 16
item replace block ~ ~ ~ container.8 with minecraft:armor_stand 16
doesnt work? i call it from here: execute as @s at @s anchored eyes positioned ^ ^ ^ if block ~ ~ ~ minecraft:dispenser run function trapessentials:fill/nine
doesnt put anythin inside
what are you trying to do with this command? check the block directly in front of the players eyes?
or like the current position, or like whatever block they are looking at?
if the block is dispenser fill it with armor stands
but which block in particular
the one your looking at
ahh okay
this is harder than you'd expect - in order to get the block that the player is looking at you have to do a raycast
bruh
the concept isn't too difficult but it is a lil bit of work for something that you would expect to be quite easy
if you follow the guide you should be able to manage it :P
yeah. in your case, instead of checking for hitting an entity hitbox you can literally just check for the block at ~ ~ ~
So i paste in start and raycast
How do I use it? Do i put start in the execute
Orrr
-# sorry for the stupid questions
id reccomend you read through the guide first so you understand what it does and how it works :P
but basically it runs a function, checks if there is something there, and if not then it runs the function again but this time slightly in front of last time
and it does this until it hits something
to run it, just run the start function as the player :P
So execute as @s run function <namespace>:start?
execute as @s does nothing, but yeah
uhh how do i change so it runs when it hits a block
basically you swap out the line in the raycast function that checks for an entity hitbox with a similar command that just checks for a block at ~ ~ ~
execute positioned ~-.99 ~-.99 ~-.99 as @e[dx=0,tag=!raycaster] positioned ~.99 ~.99 ~.99 as @s[dx=0] run return run function <namespace>:hit
Imma be honest this isnt telling me anythinh
yep, that's the one - it's a confusing command but it basically just checks for any entities which intersect that point
you don't need it, so instead you can literally just do execute if block ~ ~ ~ dispenser run ... or something
Is there any or?
execute if block ~ ~ ~ dispenser run ...
execute if block ~ ~ ~ #shulker_box run ...
execute if block ~ ~ ~ hopper run ...
execute if block ~ ~ ~ barrel run ...
Would that be laggy orr
you can add these all to a block tag and check for the block tag, if you want
The thing is i need to call seperate function for each
then your method is fine :P
Btw is there any way to know which version a pack works on?
Or do i need to manually check
Maybe a website or sum
i don't know of any tools for that
yea manual check is probably faster than searching for a tool
-# although if you end up finding one, please let me know :P
Uhh is there a list of when stuff was added?
If i get a list of when stuff was added i can probably make a tool for that
i saw one datapack that does exactly that while i was browsing modrinth..
found it..
https://modrinth.com/datapack/version-detector
this?
hmm wait.. i might read that wrong..
sry
Minecraft changelog (always up to date)
https://misode.github.io/changelog/ (idk if it's always up to date)
https://datapack.wiki/wiki/info/breaking-changes (definitely not always up to date)