Topic category: User side tutorials
Changes in V1.8.4
In v1.8.4, the vanilla sky, clouds, and weather are automatically removed on the event triggers. If you need to retain them, return false.
World Renderer
World Renderer can render sky, models, shapes, etc. using procedures and event triggers.
Here are the guides.
- How to render custom overlays
- How to render shapes
- How to render the sun and the moon
- How to render a skybox
- How to make custom weather
- How to set up dimensions
- Render Effects
Event Triggers
Graphics - Compute FOV
It can set FOV using the procedure "Viewport - Set FOV."
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- fov: It's the vanilla FOV value.
- partialTick: It's an interpolation factor between ticks.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Graphics - Compute camera angles
It can compute camera angles using the procedure "Viewport - Set camera angles."
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- yaw/pitch/roll: They're the vanilla camera angles.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Graphics - Compute fog color
It can set the fog color using the procedure "Viewport - Set fog color."
Note that the alpha values can't be changed.
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- red/green/blue: They're the RGB components of the vanilla fog color.
- partialTick: It's an interpolation factor between ticks.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Graphics - Compute light color
It can set the light colors using the procedures in the list "Lighting."
The event trigger "Graphics - Set up dimensions" is also required to make it work.
Note that the alpha values can't be changed.
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Here is the guide.
Graphics - Render clouds
It can render custom clouds using the procedures in the list "Clouds."
The event trigger "Graphics - Set up dimensions" is also required to make it work.
You can retain the vanilla clouds by returning a logical false.
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- ticks: It's the current tick of the client world.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Here is the guide. See the guide "Render Effects" on how to set textures.
Graphics - Render fog
It can set the fog distance and shape using the procedures "Viewport - Set fog distance" and "Viewport - Set fog shape."
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- start/end: They're the start/end distances of the vanilla fog.
- partialTick: It's an interpolation factor between ticks.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Graphics - Render overlays
It can render custom overlays using the procedures in the list "Overlay."
Dependencies
- mouseX/mouseY: They're the mouse positions
- partialTick: It's an interpolation factor between ticks.
Here is the guide. See the guide "Render Effects" on how to set textures.
Graphics - Render shapes
It can render shapes like triangles, quads, etc., using the procedures in the list "Shape."
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- ticks: It's the current tick of the client world.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Here is the guide. See the guide "Render Effects" on how to set textures.
Graphics - Render sky
It can render custom sky using the procedures in the list "Sky."
The event trigger "Graphics - Set up dimensions" is also required to make it work.
You can retain the vanilla sky by returning a logical false.
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- ticks: It's the current tick of the client world.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Here are the guides. See the guide "Render Effects" on how to set textures.
Graphics - Render weather
It can render custom weather using the procedures in the list "Weather."
The event trigger "Graphics - Set up dimensions" is also required to make it work.
You can retain vanilla weather by returning a logical false.
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- ticks: It's the current tick of the client world.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Here are the guides. See the guide "Render Effects" on how to set textures.
Graphics - Render world
It can render lines, texts, block, item and entity models using the procedures in the list "World."
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- ticks: It's the current tick of the client world.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Graphics - Set weather particles and sounds
It can set custom weather particles and sounds using the procedures in the list "Weather particles and sounds."
The event trigger "Graphics - Set up dimensions" is also required to make it work.
You can retain the vanilla particles and sounds by returning a logical false.
Dependencies
- dimension: It's the dimension that the camera entity is in.
- entity: It's the camera entity.
- partialTick: It's an interpolation factor between ticks.
- ticks: It's the current tick of the client world.
- x/y/z: They're the X/Y/Z positions of the camera entity.
- world: It's the client world that the camera entity is in.
Here are the guides.
Graphics - Set up dimensions
The event trigger is required to work some event triggers. You need to use the procedures in the list "Setup."
Dependencies
- None
Here is the guide.
Useful Procedures
Color
Those procedures can get various colors. They can be used on all rendering events.
Data
Those procedures can get game/world data. They can be used on all rendering events.
Others
They are can be used all rendering events.
Render effects
Those procedures is used for rendering. They can be used on the following events only.
- Graphics - Render clouds
- Graphics - Render overlays
- Graphics - Render shapes
- Graphics - Render sky
- Graphics - Render weather
Here is the guide.
Common Mistakes
If you get errors or bugs, try to check the following.
Dimension is not set up
The event trigger "Graphics - Set up dimension" is required to work some event triggers.
Use wrong event triggers or procedures
In order to render objects, you will need to use event triggers and procedures properly. See the above.
Call procedures from non-rendering events
If this example were run, your Minecraft would be crashed. It is not possible to call procedures and run rendering.
Modify game/world data on rendering events
Game/world data modifying should not be run on rendering events. That also includes block/entity/item modifying, NBT setting, etc.
However, it is possible to get and use data of blocks, entities, items, NBT, global variables, etc.
Alpha values can’t be used for fog colors, so you will need to interpolate colors.
outRGB = defaultRGB + (anyRGB - defaultRGB) * starLevel
Thank you for the help Sumeshi0216. Not to keep bugging you but is it possible to make fog slowly fade out instead of a instant off/on? I have a Sandstorm working now that only starts when its raining and it sets a biome fog when it starts raining however when it stops raining theres a pretty agressive change from the fog back to no fog.
Use rain level and interpolate the distance and color
Beautiful Plugin, have been experimenting with it and having a bit of trouble, but what is the number range for Day level? Is it a 0 - 2 or something?
I am essentially trying to get the exact time frame during sunrises and sunsets.
Day Level is the time of day and ranges from 0.0 to 1.0.
At noon (tick time = 6000), the value will be 0.0.
At midnight (tick time = 18000), the value will be 0.5.
Sumeshi, can you explain how to interpolate the distance and color based on rain level like you mentioned above? I have a neat weather system created but I'm hoping to have the fog gradually change rather than just a abrupt color change.
I've tried to do this myself but I'm not grasping the fog portion well.
It is now possible to interpolate the fog color in v1.8.3.
love u soooooo much! I'v been looking for a procedure that allow me to zoom in while aiming for a long time !
its not working for me i import the plugin and it won't work it said missing minversion
Is it possible to deactivate animations like running and head movement from world rendered entities? If not, it would be very useful! Thank you for this awesome plugin! :D
is it possible to render stars in the end but without the sun or moon?