At the minute i execute execute as @e[tag=left-screen] run data merge entity @s {item:{id:"minecraft:red_dye",tag:{CustomModelData:3}}} execute as @e[tag=right-screen] run data merge entity @s {item:{id:"minecraft:lime_dye",tag:{CustomModelData:3}}} execute as @e[tag=screen] run data merge entity @s {item:{id:"minecraft:black_dye",tag:{CustomModelData:27}}} every tick to update three screens i have but it is very laggy can anyone help me to make the datapack not be as laggy?
#Datapack / Resourcepack Chaos
1 messages · Page 1 of 1 (latest)
<@&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
message is unreadable, please put your commands in a codeblock.
like this
```hs
your commands here
```
[0;35mexecute [0;39mas[0;36m @e[0;39m[0;39m[0;34m[[0;39mtag=left-screen[0;39m[0;34m][0;39m run [0;35mdata[0;39m merge entity[0;36m @s[0;39m [0;39m[0;34m{[0;39mitem:[0;34m{[0;39mid:[0;33m"minecraft:red_dye"[0;39m,tag:[0;34m{[0;39mCustomModelData:[0;36m3[0;39m[0;34m}[0;39m[0;34m}[0;39m[0;39m[0;34m}[0;39m
[0;35mexecute [0;39mas[0;36m @e[0;39m[0;39m[0;34m[[0;39mtag=right-screen[0;39m[0;34m][0;39m run [0;35mdata[0;39m merge entity[0;36m @s[0;39m [0;39m[0;34m{[0;39mitem:[0;34m{[0;39mid:[0;33m"minecraft:lime_dye"[0;39m,tag:[0;34m{[0;39mCustomModelData:[0;36m3[0;39m[0;34m}[0;39m[0;34m}[0;39m[0;39m[0;34m}[0;39m
[0;35mexecute [0;39mas[0;36m @e[0;39m[0;39m[0;34m[[0;39mtag=screen[0;39m[0;34m][0;39m run [0;35mdata[0;39m merge entity[0;36m @s[0;39m [0;39m[0;34m{[0;39mitem:[0;34m{[0;39mid:[0;33m"minecraft:black_dye"[0;39m,tag:[0;34m{[0;39mCustomModelData:[0;36m27[0;39m[0;34m}[0;39m[0;34m}[0;39m[0;39m[0;34m}[0;39m
What are the screens, wdym?
[35mexecute [34mas [36m@e[33m[[0mtag[34m=[32mleft-screen[33m] [34mrun [35mdata [34mmerge [34mentity [36m@s [33m{[0mitem[34m: [35m{[0mid[34m: [33m"minecraft:red_dye"[34m, [0mtag[34m: [34m{[0mCustomModelData[34m: [32m3[34m}[35m}[33m}
[35mexecute [34mas [36m@e[33m[[0mtag[34m=[32mright-screen[33m] [34mrun [35mdata [34mmerge [34mentity [36m@s [33m{[0mitem[34m: [35m{[0mid[34m: [33m"minecraft:lime_dye"[34m, [0mtag[34m: [34m{[0mCustomModelData[34m: [32m3[34m}[35m}[33m}
[35mexecute [34mas [36m@e[33m[[0mtag[34m=[32mscreen[33m] [34mrun [35mdata [34mmerge [34mentity [36m@s [33m{[0mitem[34m: [35m{[0mid[34m: [33m"minecraft:black_dye"[34m, [0mtag[34m: [34m{[0mCustomModelData[34m: [32m27[34m}[35m}[33m}
item displays which are scaled up to be 23x11 (center) and 10x11 (sides)
Why do you need to run it every tick? Surely you can just run this once, it won't lose the item. Or just summon the item display with the item already in it
Also, put a type= before the tag= in your target selectors, for example @e[type=item_display,tag=screen]. That helps optimise
...
Can you record a video?

Also, if you give all the screens a specific tag, then you can run the function as any screen with the tag, then in that function reference @s instead of @e - since you know that @s would be a screen, from there you only need to check which screen it is
do the cmds start at 1 and increase by 1 each time?
^^ or is it like an animated texture
yes
i have no idea how to do an animated texture with thousands of textures so its all individual
you basically put all of the different frames on top of each other in a very tall PNG, then add a .png.mcmeta file alongside it with details about the fps and to tell the game that it is indeed an animated texture
[35mexecute [34mas [36m@e[33m[[0mtype[34m=[32mitem_display[34m,[0mtag=screen[33m] [34mstore [34mresult [34mentity [36m@s [0mitem.tag.CustomModelData [0mint [32m-1 [34mrun [35mdata [34mget [34mentity [36m@s [0mitem.tag.CustomModelData [32m-1.0000001
it will auto repeat the animation when it ends (like a gif) but you can use a timer to stop that
this command will simply increment cmd by 1
if ur up for it i reccomend switching to the animated texture since it doesnt need to run any commands to work
give the left and right screens a screen tag so that you have three entities with the screen tag
will it make the resource pack load faster?
in theory yeah bcuz its only one PNG instead of loads of smaller ones
that one png will still be very big and itself take a while to load but it will deffo be faster
alright! i will give that a go!!
Defiantly faster
how long does the animation last, what is the width and height of the frame?
ive definitely jumped in the deep end a little too quickly xD
at the end it will last 3-4 hours...
Animated textures aren’t that difficult once you get the magic down good
what is the width and height of the frame
🤯
the center screen is 11 high and 23 wide
In pixels please
I mean the pixels of the texture
width and height
i dont think there's a limit to how big an animated texture can be
What's the fps?
20
i tried a larger resolution and minecraft kept saying resource reload failed so ive downsized it as much as i can without it being just pixels
what tool r u using?
bruh
id reccomend like
making a script to do it
you can always split it into different animated textures
like one for the first 10 seconds, then the next 10, etc
depends on how much it can load without breaking
if it does break, that is
yeah i made 5 scripts to do the resource and data pack stuff
good idea lul
doing that manually just for 2 minutes of video would destroy me
such an animated texture can fill most of the video memory.
thats why i said split it up
into many smaller animated textures
that way you aren't changing the custom model data every tick, only once every few ticks
if you can limit the amount of times you run something its much better
but what if tick rate falls behind the animation?
that issue is lessened by the fact we aren't running it as often
What
update: ive tried to make an animated texture and its not worked here is the model file
{
"credit": "Made with Blockbench",
"parent": "black_dye",
"texture_size": [32, 32],
"textures": {
"2": "item/black_dye",
"particle": "item/black_dye"
},
"elements": [
{
"from": [-7, 0, -0.1],
"to": [16, 11, -0.0375],
"faces": {
"north": {"uv": [0, 0, 16, 0.08], "texture": "#2"},
"east": {"uv": [11.5, 0, 11.5625, 5.5], "texture": "#missing"},
"south": {"uv": [0, 5.5, 11.5, 11], "texture": "#missing"},
"west": {"uv": [11.5, 5.5, 11.5625, 11], "texture": "#missing"},
"up": {"uv": [11.5, 11.0625, 0, 11], "texture": "#missing"},
"down": {"uv": [11.5, 11.5, 0, 11.5625], "texture": "#missing"}
}
}
]
}```
black_dye.png.mcmeta json { "animation": { } }
[18:25:03] [Worker-Main-21/ERROR] [minecraft/SpriteResourceLoader]: Image minecraft:item/black_dye size 184,8800 is not multiple of frame size 184,184```
the texture here is an error
#missing
maybe try and save it again
i changed it and nope nothing still a missing texture
note sure whats wrong with it
i think because the texture isnt square
ive made the height and width attribute in the mcmeta and now it work but it blinks black
<@&935561184806060073> <@&1202694677766348840>
**🙇 Helpers Arise!**
Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)
@harsh hearth What's the current problem?
hold on let me take a recording it's hard to explain
Lol
nevermind its my script numbering alphabetically instead of numerically also is there any way to control when the block animation starts and stops?
did you try reading the error message that you sent
it's currently working I just don't know how to start/stop the animation
you can't, it'll always be running the same
is there no way I can make it start the animation from the start instead of wherever the game decides?
Not that I'm aware of
oh...
so instead of that could i use that texture file ive created with all of the frames stacked up and make the first 184x88 CustomModelData:1 the second CustomModelData:2 etc?
like a texture atlas
Yes
how would I do that?
For each model file, change the UV to use the next frame from the same texture file
so will it need a model file for each frame?
Same as having different parts of a model use the same texture but different areas of it
Yep
But you were going to need to do that anyway with your old implementation, this just keeps the textures all in one file
okay thanks so much
i was just trying to find a way to completely get rid of the tens of thousands of model files
Yeah that is sort of the unfortunate thing about doing wildly convoluted things like this
If there's not an easy way to do it, then there's a bad way to do it
And believe me, we've all been there
I don't know either
let me restart it might be that
nope made it worse
Datapack / Resourcepack Chaos
deleted it and it fixed it i am not sure what the best way to convert a video into a format that can be played in minecraft
id just use a text display and a custom character for each frame generated by a script
aren't text displays very laggy?
Question Closed
Your question, #1203012091326496849 (Datapack / Resourcepack Chaos), was resolved!
Original Message
At the minute i execute execute as @e[tag=left-screen] run data merge entity @s {item:{id:"minecraft:red_dye",tag:{CustomModelData:3}}} execute as @e[tag=right-screen] run data merge entity @s {item:{id:"minecraft:lime_dye",tag:{CustomModelData:3}}} execute as @e[tag=screen] run data merge entity @s {item:{id:"minecraft:black_dye",tag:{CustomModelData:27}}} every tick to update three screens i have but it is very laggy can anyone help me to make the datapack not be as laggy?
Duration open
1d37m
🗑️ Recycling Thread
This thread has been inactive for some time, so I'm going to archive it.
If you're still using the thread, just send a message and it'll pop back on the thread list.
🗑️ Recycling Thread
This thread has been inactive for some time, so I'm going to archive it.
If you're still using the thread, just send a message and it'll pop back on the thread list.