mirror of
https://github.com/GTNewHorizons/ForgeRelocation.git
synced 2026-11-13 00:47:36 +00:00
Fix WorldClient memory leak (#9)
Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
This commit is contained in:
1 parent
c75c509fda
commit
e58530f587
2 files changed
+10
-1
No files matched your search
@@ -52,7 +52,9 @@ object RelocationClientEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
def clientTick(event: TickEvent.ClientTickEvent) {
|
||||
if (event.phase == TickEvent.Phase.END)
|
||||
if (event.phase == TickEvent.Phase.END) {
|
||||
MovementManager2.onTick(true)
|
||||
MovingRenderer.onTick()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,6 +106,13 @@ object MovingRenderer {
|
||||
render(b.x, b.y, b.z, renderPos(s, frame))
|
||||
}
|
||||
|
||||
def onTick() = {
|
||||
if (oldWorld != null && world == null) {
|
||||
oldWorld = null
|
||||
renderBlocks = null
|
||||
}
|
||||
}
|
||||
|
||||
def onPreRenderTick(time: Float) {
|
||||
isRendering = true
|
||||
frame = time
|
||||
|
||||
Reference in new issue
Block a user