aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-19 20:49:05 +0200
committermakamys <makamys@outlook.com>2022-06-19 21:08:11 +0200
commit2873cbc1adf5fbdbc526d623cc992c4214482af8 (patch)
treecb4a13212dcca81f0d29743721ec8182112a427b /src/main/java
parent8131a2c49dfcad48e5bfaa08f29b84065e9ceaf6 (diff)
downloadNeodymium-2873cbc1adf5fbdbc526d623cc992c4214482af8.tar.gz
Neodymium-2873cbc1adf5fbdbc526d623cc992c4214482af8.tar.bz2
Neodymium-2873cbc1adf5fbdbc526d623cc992c4214482af8.zip
Move renderer initialization to render tick event handler
Seems to fix the first few chunks to get rendered after world load sometimes being missing
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/makamys/neodymium/Neodymium.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/makamys/neodymium/Neodymium.java b/src/main/java/makamys/neodymium/Neodymium.java
index b61e08c..a20dc7c 100644
--- a/src/main/java/makamys/neodymium/Neodymium.java
+++ b/src/main/java/makamys/neodymium/Neodymium.java
@@ -112,12 +112,6 @@ public class Neodymium
}
}
}
-
- EntityPlayer player = Minecraft.getMinecraft().thePlayer;
- World world = player != null ? player.worldObj : null;
- if(world != getRendererWorld()) {
- onPlayerWorldChanged(world);
- }
if(MixinConfigPlugin.isOptiFinePresent()) {
try {
@@ -141,7 +135,13 @@ public class Neodymium
@SubscribeEvent
public void onRenderTick(TickEvent.RenderTickEvent event) {
- if(event.phase == TickEvent.Phase.END) {
+ if(event.phase == TickEvent.Phase.START) {
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+ World world = player != null ? player.worldObj : null;
+ if(world != getRendererWorld()) {
+ onPlayerWorldChanged(world);
+ }
+ } else if(event.phase == TickEvent.Phase.END) {
if(isActive()) {
renderer.onRenderTickEnd();
}