#A function not loading when far from other entities

1 messages · Page 1 of 1 (latest)

ashen lance
#

i am not even sure if this is the correct cause, but when using my datapack to make appear a "head" from my weapon, with a fishing rod, it works everywhere for every weapon material except the diamond one, and it seems its when i get to far from entites like item frames, i am not even sure if this is the reason, i don't understand

little oysterBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1205075937419329626

sly shuttle
#

very cool

#

but i have no idea on how to fix this

little oysterBOT
#

Oops, something went wrong. 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.description: Must be 4096 or fewer in length.

sly shuttle
#

waht-

ashen lance
chrome crowBOT
#
📂 Datapack Folderstructure
                .
                ├── pack.mcmeta
                ├── pack.png
                └── data
                    └── <namespace>
                        ├── advancements
                        ├── functions
                        ├── item_modifiers
                        ├── loot_tables
                        ├── predicates
                        ├── recipes
                        ├── structures
                        ├── chat_type
                        ├── damage_type
                        ├── tags 
                        │   ├── blocks
                        │   ├── entity_types
                        │   ├── fluids
                        │   ├── functions
                        │   ├── game_events
                        │   ├── items
                        │   ├── chat_type
                        │   └── damage_type
                        ├── dimension
                        ├── dimension_type
                        └── worldgen
                            ├── biome
                            ├── configured_carver
                            ├── configured_feature
                            ├── density_function
                            ├── noise
                            ├── noise_settings
                            ├── placed_feature
                            ├── processor_list
                            ├── structure
                            ├── structure_set
                            ├── template_pool
                            ├── world_preset
                            └── flat_level_generator_preset
                        ```
#
:information_source: Default Launcher Logs

The logs are where Minecraft displays errors when something goes wrong and can thus help you gain information about why something isn't working for you!
To open the logs:

  1. Enable logs in the Minecraft Launcher
  2. Start your game (or restart it if you already have an open instance)
  3. Enjoy spotting errors getting much easier!
limber oriole
#

first can you send the code and explain how youre doing this?

#

i assume youre just making an item display ride the bobber when you use a specially tagged fishing rod

ashen lance
limber oriole
#

nevermind it does, i found it

#

first thing i can think of is just typos of course..

#

since its only diamond not working

#

rather than being far from entities

#

it might be that youre not spawning it executed from the player, or something like that

#

in which case it would immediately kill the display from what i understand

#

when youre not next to world spawn

ashen lance
#

because when tweaking the code and when i augmented the range, i had the same issue but i had to go farther to trigger it

limber oriole
median igloo
#

@ashen lance How about this one?

ashen lance
#

😅

#

i resolved the other one i got it working

#

sorry for spamming

#

this one still not for now

median igloo
#

You're not spamming, I'm just going through and checking on quiet threads

median igloo
ashen lance
#

as showed in the video

#

i tried to search in my commands but didn't find anything concluant

median igloo
#

Hmm yeah, by all accounts your location should have no bearing. Are you running anything from command blocks or all data pack?

ashen lance
#

i have command block to give the items thats all

ashen lance
median igloo
#

Can you show the function that is running the spawn function, as well as the spawn function itself?

#

(assuming the spawn is in a function and not just the command)

ashen lance
#

and the function for the spawn itself


execute at @s positioned ^ ^1.8 ^0.5 run summon minecraft:item_display ~ ~ ~ {item:{id:"carrot_on_a_stick",Count:1,tag:{CustomModelData:50127}},item_display:ground,Tags:["DiamondHeadDisplay"],transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]}}

ride @e[type=minecraft:item_display,tag=DiamondHeadDisplay,limit=1,sort=nearest] mount @e[type=minecraft:fishing_bobber,tag=DiamondHead,limit=1,sort=nearest]```
median igloo
median igloo
ashen lance
median igloo
#

If you start and end a section of text with ```

format
like this```
Which makes it a bit easier to differentiate different functions, or just what is all one function. Also slightly easier to read
median igloo
#

Like what entity?

ashen lance
#

wdym

#

oohh i get it

#

the player

median igloo
#

Okay, why is the player running a command with @a instead of @s?

#

Additionally, is this function already being run at the player, too?

ashen lance
median igloo
median igloo
# ashen lance normally yes

Ok, well besides the first command needing to use an @s instead of an @a and some minor optimization choices, that function looks fine. So it may be the other one causing problems which I'm not in a position to be able to download and look at right now