#Datapack / Resourcepack Chaos

1 messages · Page 1 of 1 (latest)

harsh hearth
#

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?

lost fieldBOT
#

<@&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
uncut hazel
stark palmBOT
#
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}}} 

buoyant lichen
# stark palm
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}}}
harsh hearth
#

item displays which are scaled up to be 23x11 (center) and 10x11 (sides)

tender nova
#

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

buoyant lichen
harsh hearth
buoyant lichen
tender nova
#

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

buoyant lichen
tender nova
#

^^ or is it like an animated texture

harsh hearth
#

i have no idea how to do an animated texture with thousands of textures so its all individual

tender nova
#

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

buoyant lichen
tender nova
#

it will auto repeat the animation when it ends (like a gif) but you can use a timer to stop that

buoyant lichen
tender nova
#

if ur up for it i reccomend switching to the animated texture since it doesnt need to run any commands to work

buoyant lichen
#

give the left and right screens a screen tag so that you have three entities with the screen tag

harsh hearth
tender nova
#

that one png will still be very big and itself take a while to load but it will deffo be faster

harsh hearth
#

alright! i will give that a go!!

buoyant lichen
harsh hearth
#

ive definitely jumped in the deep end a little too quickly xD

harsh hearth
nova birch
#

Animated textures aren’t that difficult once you get the magic down good

buoyant lichen
nova birch
harsh hearth
#

the center screen is 11 high and 23 wide

nova birch
#

In pixels please

buoyant lichen
#

width and height

harsh hearth
#

184x88

#

my bad

tender nova
#

i dont think there's a limit to how big an animated texture can be

buoyant lichen
harsh hearth
#

20

harsh hearth
tender nova
buoyant lichen
tender nova
#

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

buoyant lichen
#

It's better to leave it as it is

#

just change the cmd

harsh hearth
tender nova
#

good idea lul

harsh hearth
#

doing that manually just for 2 minutes of video would destroy me

buoyant lichen
#

such an animated texture can fill most of the video memory.

tender nova
#

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

buoyant lichen
tender nova
#

that issue is lessened by the fact we aren't running it as often

nova birch
#

What

harsh hearth
#

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```
tender nova
#

#missing

#

maybe try and save it again

harsh hearth
#

i changed it and nope nothing still a missing texture

harsh hearth
#

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

lost fieldBOT
# lost field <@&1201956957406109788>

<@&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)

slate lake
#

nah

#

too stupid for this shite

tender nova
#

jeferwalg stop being unhelpful

#

I will literally ban you from the help channels

void lynx
#

@harsh hearth What's the current problem?

harsh hearth
#

hold on let me take a recording it's hard to explain

solar mirage
#

Lol

harsh hearth
#

nevermind its my script numbering alphabetically instead of numerically also is there any way to control when the block animation starts and stops?

pale oyster
#

did you try reading the error message that you sent

harsh hearth
#

it's currently working I just don't know how to start/stop the animation

pale oyster
#

you can't, it'll always be running the same

harsh hearth
#

is there no way I can make it start the animation from the start instead of wherever the game decides?

void lynx
#

Not that I'm aware of

harsh hearth
#

oh...

harsh hearth
#

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

void lynx
#

Yes

harsh hearth
#

how would I do that?

void lynx
#

For each model file, change the UV to use the next frame from the same texture file

harsh hearth
#

so will it need a model file for each frame?

void lynx
#

Same as having different parts of a model use the same texture but different areas of it

void lynx
#

But you were going to need to do that anyway with your old implementation, this just keeps the textures all in one file

harsh hearth
#

okay thanks so much

#

i was just trying to find a way to completely get rid of the tens of thousands of model files

void lynx
#

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

harsh hearth
#

yeah that's fair enough

#

but I'll try that!

harsh hearth
#

I dont know what happened....

#

i loaded it up and my entire world is just black

void lynx
#

I don't know either

harsh hearth
#

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

slate lake
#

id just use a text display and a custom character for each frame generated by a script

harsh hearth
#

aren't text displays very laggy?

lost fieldBOT
#
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

lost fieldBOT
#
🗑️ 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.

lost fieldBOT
#
🗑️ 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.