#(aaronaneha) item display orientation

39 messages · Page 1 of 1 (latest)

maiden thorn
#

I've been trying of for a while get that lay down position oriented to the player, but so far the best i got is inversed

thick schoonerBOT
#

(aaronaneha) item display orientation

thick schoonerBOT
#

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.

maiden thorn
#

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
jovial dragon
#

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

maiden thorn
jovial dragon
#

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

maiden thorn
#

so i didn't had to rewrite everything

jovial dragon
#

I mean, you don't have to rewrite anything with what I mentioned either

#

just add .with_yaw somewhere

maiden thorn
#

kinda makes sense, i was just affraid of it being like left_rotation

#

or using same mechanics

#

I appreciate your support btw

#

😄

jovial dragon
jovial dragon
maiden thorn
#

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

jovial dragon
#

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

maiden thorn
#

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

jovial dragon
#

Hm interesting

#

Anyways lmk if what I mentioned works

signal hamletBOT
#
Thread Closing Reminder

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