Started by
franekniemiec
on
Topic category: Help with Minecraft modding (Java Edition)
I want someone to explain to me step by step how to make an animated overlay using the base texture thingie because idk how to do that ( i want portal like animation to apear after player eats smth )
Edited by franekniemiec on Sun, 06/29/2025 - 16:57
Hello, I’ll tell you how to do it using a custom effect:
Create a timer:
Global trigger: On player tick update
if - "get event/target entity custom number NBT tag 'frame' > 1" do - "set event/target entity custom number NBT tag 'frame' to (get current frame - 1)" else - "set event/target entity custom number NBT tag 'frame' to 32"
Create an overlay and where it says "Display overlay in-game", use a procedure with this logic:
if - "not has event/target entity active potion (your custom effect)" do -
set event/target entity custom number NBT tag "frame" to (number of frames your animation will use)
return logic: false return logic: true
If they’re not aligned, the animation will look jittery—unless that’s the visual effect you want.
You must assign the tick range where the frame should appear (usually 4–5 ticks per frame).
You count from highest to lowest.
If you have 8 frames, that’s about 32 ticks total. Example:
if - AND:
get event/target entity custom number NBT tag "frame" >= 29
get event/target entity custom number NBT tag "frame" <= 32 do - return logic: true else - return logic: false
(This would be for frame 1.
For frame 2, use
>= 25
and<= 28
, and keep decreasing the range for each next image.)If you’re still unsure, you can search the following video:
MCREATOR: Animated GUIs and Overlays | 2022.2
There, you’ll see everything clearly step by step.
It can be done without using an effect, but well, I was just applying it like that and what I did happened to you :v