#(mrcrash) return location near player location
61 messages · Page 1 of 1 (latest)
(mrcrash) return location near player location
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Basically, i want to display a display_entity like inside a item frame but without item frame, to make a modded drawer look
yeah
i probably need to spawn it inside the block and .add to make it go littlely out the block
But idk how to ".add[1 on the side of the player loca]"
Sorry if i explain bad
you can make item frames invsible if that works for your situation
Nope because if i use item frame i can't place another block near to the first one
Hm, not really, i need to starting from a locatioon (the block center), and adding some values to it to go to the player
so basically, where an item would end up on an item frame, without the item frame attached?
exactly
!e places block
Player
player places block player places <item>
using:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher.
type:<material> to only process the event if the block placed matches the MaterialTag matcher input.
when a player places a block.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
on player places block:
after player places torch using:off_hand:
on player places cactus against:sand:
# This example process the event only if the player places any block that isn't tnt.
on player places block type:!tnt:
- announce "<player.name> has placed a block that isn't TNT. Lucky!"
should be able to use <context.against>
not sure if that gives a precise location but it seems to just give the block
Hm, I don't understand how this can help me, if I understand the meta correctly it will return to the block below my location if I put it on the ground?
do you want this custom block to be placable on any tile?
well
like any direction?
gotchas
What's mean return=normal ?
!t ray_trace
Multiple possible tags: <LocationTag.ray_trace[(range=<#.#>/{200});(return=<{precise}/block/normal>);(default=<{null}/air>);(fluids=<true/{false}>);(nonsolids=<true/{false}>);(entities=<matcher>);(ignore=<entity>|...);(raysize=<#.#>/{0})]>, <LocationTag.ray_trace_target[(range=<#.#>/{200});(blocks=<{true}/false>);(fluids=<true/{false}>);(nonsolids=<true/{false}>);(entities=<matcher>);(ignore=<entity>|...);(raysize=<#.#>/{0})]>.
basically returns a flat, non angled direction
Oh okay
this angle is perpendicular to the surface it hits
Look like rlly usefull
definitely has its use cases
i use it in my bounce ball script in order for the ball to stay out of the wall
I eat, try and if it's okay resolve 🫡
Okayyy
work pretty well
just can i slightly adjust the position of the item? like moving back/forward a little in/out of the block ?
yes
How? like how can i get back frowad relative to the player location
sorr i'm bas with raytrace
you can use that normal as a vector as well
as vector??
like
<player.cursor_on_solid.add[<player.eye_location.ray_trace[return=normal].add[something]>]>
no
- define vector <player.eye_location.ray_trace[return=normal].mul[0.5]>
- define loc <context.location.center.add[<[vector]>]>
- fakespawn item_display[item=carrot] <[loc]> d:5s```
Nice !
now, step 2
can i do that to all direction excluding up/down ?
i mean, this one is perfect for what i want to do, but 4 faces display item can be usefull for a second drawer type
founded !