#(aaronaneha) item display orientation
39 messages · Page 1 of 1 (latest)
(aaronaneha) item display orientation
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.
so when i place the item, it literally points the other direction like this
spawndynamicdisplay:
type: task
definitions: location | item | size | uniqueid
script:
# Spawn the custom flat_item_display entity
- define origin <def[location]>
# Y-axis for horizontal rotation
- define spawn_location <[origin].face[<player.location.with_y[null]>]>
- spawn entity:flat_item_display <[spawn_location]> save:display_entity
- flag <entry[display_entity].spawned_entity> eco_display_entity:true
# Adjust the specific item and scale for this instance
- adjust <entry[display_entity].spawned_entity> item:<def[item]>
- adjust <entry[display_entity].spawned_entity> scale:<def[size]>
# The rest of your script for the text entity and flags
- spawn <entity[text_entity]> <def[location].above[0.3]> save:textEntry
- flag <entry[textEntry].spawned_entity> uniqueid:<[uniqueid]>
- flag <entry[display_entity].spawned_entity> uniqueid:<[uniqueid]>
- adjust <entry[textEntry].spawned_entity> text:<&l>test
flat_item_display:
type: entity
debug: false
entity_type: item_display
EcoDisplayRemove:
type: world
name: wtf
events:
on entity dies:
- define uid <context.entity.flag[uniqueid]>
- foreach <context.entity.location.find_entities.within[5]> as:ent:
- if <[ent].has_flag[uniqueid]> && <[ent].flag[uniqueid]> == <[uid]>:
- remove <[ent]>
text_entity:
type: entity
debug: false
entity_type: text_display
mechanisms:
text: <&sp>
see_through: false
text_shadowed: true
pivot: center
background_color: TRANSPARENT
translation: 0,0.3,-0.4
scale: 0.5,0.5,0.5
euh, what about just subtracting or adding 180 to the yaw?
Should flip it, as long as the item is flat. Otherwise trying messing with the rotate command, and specify the yaw and pitch via that, but I think .with_yaw would theoretically do the same
Also, I recommend defining <entry[display_entity].spawned_entity>, so that you can just use <[my_ent]> everywhere instead of that long text. Also makes it easier to read, and is probably more efficient
Ow! makes sense, thank you! For the moment the I did solve the problem by replacing <[origin].face[<player.location.with_y[null]>]> by <[origin].face[<player.location.forward[10].with_y[null]>]>
hm interesting, that would pretty much just put the player on the other side of the crafting table yeah, so it would rotate. Kinda hacky though
Well, i'm not an expert in denizen script so i just took the easy way ig
so i didn't had to rewrite everything
I mean, you don't have to rewrite anything with what I mentioned either
just add .with_yaw somewhere
so adding a 180 deg yaw would also solve the issue?
kinda makes sense, i was just affraid of it being like left_rotation
or using same mechanics
I appreciate your support btw
😄
Idk, maybe lol
Yeah, there's quite a few mechanics that sound like they can work but then they don't and you're left even more confused lol... I know how it feels
that's script based programming in a nutshell
Denizen is still amazing
Almost same power as codding your own plugin
Tbh is less organized
I do also code in Java, not the same in terms of readability
but words are more descriptive in denizen
I much prefer denizen over java though tbh. I tried making a java plugin and it took me way too long and it's kinda ass. Made the same plugin with denizen in way less time and it's a lot better. I do have a background in python and C#, but yeah no I don't like java lol. Denizen makes plugins very easy
yeah, i used to port forge mods for servers using Java and Oraxen
And i can do it also with denizen, which is less time consuming
We're also developping an app, so i'm trying to get used to denizen again so I can make our app generate denizen code
to add mechanics and such
not direct support to denizen, but using denizen to improve our service
as a dependency
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@maiden thorn