Topic category: User side tutorials
Before I start, I want to say thank you to Tbroski and Klemen for helping me create this tutorial.
First, have a video ready, best if short and low-res.
Convert it to a PNG image sequence, you can use any service you so desire. (if you have photoshop, follow this tutorial https://ihatetomatoes.net/convert-video-image-sequence)
Then, you get a folder full of your images and name them accordingly. If you have 100 frames for example, name them from 0 to 99.
Go to the "Import Other Textures" section in MCR, and import all of them clicking the first and shift-clicking the last texture
Now to the code part, create a procedure element, and set the trigger to on player tick update.
Go to the code, and add the following:
Entity entity = (Entity) dependencies.get("entity");
entity.getPersistentData().putDouble("Frame", ((entity.getPersistentData().getDouble("Frame")) + 1));
entity.getPersistentData().putString("Location",
(("yourmodid:textures/") + (Math.round((entity.getPersistentData().getDouble("Frame")))) + (".png")));
if (((entity.getPersistentData().getDouble("Frame")) >= maxframe)) {
entity.getPersistentData().putDouble("Frame", 0);
}
Replace yourmodid with your mod Id and maxframe with your max frame number.
This code snippet will create a Frame variable that increases per tick, and get the location of a frame with that variable.
Next, create an overlay element, select a dummy base texture, lock the code, and change the line of code that binds your base texture to this:
Minecraft.getInstance().getTextureManager().bindTexture(new ResourceLocation((entity.getPersistentData().getString("Location"))));
Run your mod and you should be seeing a silky smooth video playing, the video will repeat once it reaches the end.
Add sound and customize the code any way you want.
Would you update this for 1.17? I think some methods have changed.
Hello so im getting this error when i try to Run Client
Can this be updated to 1.18 please? I could really use this
the "Entity entity" line is making me problems
im new in mcreator and stuff so pls tell me how this works
(yes i created an account just to ask this=
hey, i need some help... im trying to update it to 1.20.1, this is my procedural code by now
but it gives this error:
can you help me fix it?
Wait I want a cutscene to play at a certain point in my story mode mod how can I do that , Do I have to just change the trigger