MattCzyr / RealisticTorches

A Minecraft mod that causes torches to burn out after a configurable amount of time.
https://www.curseforge.com/minecraft/mc-mods/realistic-torches
Other
26 stars 12 forks source link

Use of a tile entity #8

Closed elifoster closed 8 years ago

elifoster commented 8 years ago

Why is the torch a tile entity? It looks like what you're using it for could be better handled with block updates (which you actually are doing) than a TE, and it would have better performance.

matshou commented 8 years ago

@elifoster It's not possible to get updates each tick from the block class. Best way to get an update (on both client and server side) each tick is to use tile entities. However, if getting random updates (not guaranteed to happen each tick) is not a problem, then using the block class update is preferable from a performance perspective.

MattCzyr commented 8 years ago

@elifoster Seems like you are correct. The TE is only used to extinguish the torch during rainfall, which could certainly be handled via random ticks. I'll implement this when I have time later today.

MattCzyr commented 8 years ago

Fixed in version 1.10.2-1.6.4.