Skip to content

A plugin for vanilla dynamic lighting in Minecraft although it's only for players since as it turns out random players + expensive lighting calculations = people lagging your server :D

License

Notifications You must be signed in to change notification settings

RandomGamingDev/MCDynamicLighting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCDynamicLighting

A plugin for vanilla dynamic lighting in Minecraft although it's only for players since as it turns out random players + expensive lighting calculations = people lagging your server :D

The plugin works by simply using the new Minecraft invisible Light block and placing it where the player is and then removing the old ones. This plugin can place the Light blocks as long as the block at the player's head location is either air or a source block of water so that no adverse side effects other than lighting are effected by the player's head being in anything else, while still allowing this system to function decently properly.
Now you might wonder why I chose for this approach and whether it's all just lazy design, and while I will admit that it is for a large chunk lazy design, I also like making my code readable, easy to understand, decent performant, and also more general. Not only is this system easier to understand, but any improvements or changes made to the game's lighting engine, like perhaps better more circular lighting for example, carries over perfectly in a way that a plugin doing the lighting calculations manually simply couldn't do and in a super readable, short and concise style that again, a plugin of that sort simply wouldn't be able to achieve.

About

A plugin for vanilla dynamic lighting in Minecraft although it's only for players since as it turns out random players + expensive lighting calculations = people lagging your server :D

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages