Repository navigation
Lights
MC Engine's Lights system saves, loads, and sync light objects from the Veil Library by Foundry. Four different types of lights allow for the addition of heavily-customizable world lighting that is modifiable via MC Engine's custom Light Editor (based off of Veil's Light Editor with additional parameters for usability).
MC Engine's Lights are automatically saved to a .json file (lights.json - The world's default Light Profile) in the world save file when the world/server closes. When the world/server opens again, the lights are automatically loaded again from the same file, allowing them to stay persistent between server/world starts and stops. Lights can also be manually saved to a custom Light Profile to allow for extra dynamicism when using the world lights.
MC Engine's Lights are networked to work on multiplayer servers, so when a player joins the server, all Light data will be given to them so they are up to date and can see the light as they appear for everyone else. MC Engine's Lights also sync to all connected players as changes are made in the editor on the server. This means that all connected players can see edits made by other players in real time, and the editor will reflect those changes.
A source of light that emits outwards from a single point in the world.

The name of the Point Light shown in the Light Editor.
- Set via a text input.
- Can be any string of numbers/letters.
The Point Light's visual brightness, how much light the Point Light emits.
- Set via a text input
- Can be any positive or negative number (floating point values are allowed)
The Point Light's color.
- Set 3 separate R, G, and B text inputs.
- Can be any whole number from 0-255.
The Point Light’s location.
- Set via 3 separate X, Y, and Z inputs.
- Can be floating point values (decimals).
The Point Light's radius.
- Set via a text input
- Can be any positive or negative number whole number.
- Positive values are recommended.
Set the Point Light's position to the player's current view position.
- A clickable button.
Whether or not the Point Light casts shadows on blocks.
- Toggleable via a checkbox.
- Can be True or False.
The visibility of the Point Light in air.
- Set via a text input.
- Can be any positive or negative number (floating point values are allowed)
- Positive values are recommended.
Create a new Point Light with all the same parameters as the Point Light this is clicked on.
- A clickable button.
Remove the currently opened Point Light.
- A clickable button.
A source of light that emits outwards from a invisible flat plane in the world.

The name of the Area Light shown in the Light Editor.
- Set via a text input.
- Can be any string of numbers/letters.
The Area Light's visual brightness, how much light the Area Light emits.
- Set via a text input
- Can be any positive or negative number (floating point values are allowed)
The Area Light's color.
- Set 3 separate R, G, and B text inputs.
- Can be any whole number from 0-255.
The Area Light’s location.
- Set via 3 separate X, Y, and Z inputs.
- Can be floating point values (decimals).
The size of the plane the Area Light emits light from.
- Set via 2 separate X and Y inputs.
- Can be any positive or negative number (floating point values are allowed)
The Area Light's orientation.
- Set via 4 separate X, Y, Z, and W inputs.
- Can be any positive or negative number number (floating point values are allowed).
Set the Area Light's position and orientation to the player's current view position and view orientation.
- A clickable button.
The angle at which light spreads from the Area Light's emitting plane.
- Set via a text input.
- Can be any positive or negative number (floating point values are allowed).
- Positive values are recommended.
Whether or not the Area Light casts shadows on blocks.
- Toggleable via a checkbox.
- Can be True or False.
The visibility of the Area Light in air.
- Set via a text input.
- Can be any positive or negative number (floating point values are allowed)
- Positive values are recommended.
Create a new Area Light with all the same parameters as the Area Light this is clicked on.
- A clickable button.
Remove the currently opened Area Light.
- A clickable button.
A source of light that emits globally, affecting all block in the world.

The name of the Directional Light shown in the Light Editor.
- Set via a text input.
- Can be any string of numbers/letters.
The Directional Light's visual brightness, how much light the Directional Light emits.
- Set via a text input
- Can be any positive or negative number (floating point values are allowed)
The Directional Light's color.
- Set 3 separate R, G, and B text inputs.
- Can be any whole number from 0-255.
The direction from which the Directional Light emits its light.
- Set via 3 separate X, Y, and Z inputs.
- Can be any positive or negative number (floating point values are allowed)
Whether or not the Point Light casts shadows on blocks.
- Toggleable via a checkbox.
- Can be True or False.
Create a new Directional Light with all the same parameters as the Directional Light this is clicked on.
- A clickable button.
Remove the currently opened Directional Light.
- A clickable button.
A source of light that emits outwards in a cone from a single point in the world.

The name of the Spot Light shown in the Light Editor.
- Set via a text input.
- Can be any string of numbers/letters.
The Spot Light's visual brightness, how much light the Spot Light emits.
- Set via a text input
- Can be any positive or negative number (floating point values are allowed)
The Spot Light's color.
- Set 3 separate R, G, and B text inputs.
- Can be any whole number from 0-255.
The Spot Light’s location.
- Set via 3 separate X, Y, and Z inputs.
- Can be floating point values (decimals).
The Sot Light's orientation.
- Set via 4 separate X, Y, Z, and W inputs.
- Can be any positive or negative number number (floating point values are allowed).
Set the Spot Light's position and orientation to the player's current view position and view orientation.
- A clickable button.
The Spot at which light spreads from the Spot Light's emitting point.
- Set via a text input.
- Can be any positive or negative number (floating point values are allowed).
- Positive values are recommended.
Whether or not the Spot Light casts shadows on blocks.
- Toggleable via a checkbox.
- Can be True or False.
The visibility of the Spot Light in air.
- Set via a text input.
- Can be any positive or negative number (floating point values are allowed)
- Positive values are recommended.
Create a new Spot Light with all the same parameters as the Spot Light this is clicked on.
- A clickable button.
Remove the currently opened Spot Light.
- A clickable button.