aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project.gradle2
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoChunk.java6
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoRenderer.java44
-rw-r--r--src/main/resources/META-INF/neodymium_at.cfg (renamed from src/main/resources/META-INF/LODMod_at.cfg)0
4 files changed, 26 insertions, 26 deletions
diff --git a/project.gradle b/project.gradle
index ed0b64a..769901e 100644
--- a/project.gradle
+++ b/project.gradle
@@ -1,7 +1,7 @@
jar {
manifest {
attributes (
- 'FMLAT': "LODMod_at.cfg"
+ 'FMLAT': "neodymium_at.cfg"
)
}
}
diff --git a/src/main/java/makamys/neodymium/renderer/NeoChunk.java b/src/main/java/makamys/neodymium/renderer/NeoChunk.java
index e1d76a8..c95b2bb 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoChunk.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoChunk.java
@@ -28,7 +28,7 @@ public class NeoChunk {
@Override
public String toString() {
- return "LODChunk(" + x + ", " + z + ")";
+ return "NeoChunk(" + x + ", " + z + ")";
}
public double distSq(Entity entity) {
@@ -51,7 +51,7 @@ public class NeoChunk {
}
chunkMeshes[cy * 2 + i] = newChunkMesh;
}
- Neodymium.renderer.lodChunkChanged(this);
+ Neodymium.renderer.neoChunkChanged(this);
dirty = true;
}
@@ -72,7 +72,7 @@ public class NeoChunk {
if(lod == this.lod) return;
this.lod = lod;
- Neodymium.renderer.lodChunkChanged(this);
+ Neodymium.renderer.neoChunkChanged(this);
if(!dirty) {
if(lod < 2) {
for(int i = 0; i < chunkMeshes.length; i++) {
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
index aae651a..802a715 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
@@ -451,18 +451,18 @@ public class NeoRenderer {
int x = Math.floorDiv(wr.posX, 16);
int y = Math.floorDiv(wr.posY, 16);
int z = Math.floorDiv(wr.posZ, 16);
- NeoChunk lodChunk = getLODChunk(x, z);
+ NeoChunk neoChunk = getNeoChunk(x, z);
- lodChunk.isSectionVisible[y] = change == WorldRendererChange.VISIBLE;
+ neoChunk.isSectionVisible[y] = change == WorldRendererChange.VISIBLE;
if(change == WorldRendererChange.DELETED) {
- removeMesh(lodChunk.chunkMeshes[y]);
- if(lodChunk.chunkMeshes[y] != null) {
- lodChunk.chunkMeshes[y].destroy();
- lodChunk.chunkMeshes[y] = null;
- lodChunk.region.meshes--;
+ removeMesh(neoChunk.chunkMeshes[y]);
+ if(neoChunk.chunkMeshes[y] != null) {
+ neoChunk.chunkMeshes[y].destroy();
+ neoChunk.chunkMeshes[y] = null;
+ neoChunk.region.meshes--;
}
}
- lodChunkChanged(lodChunk);
+ neoChunkChanged(neoChunk);
}
public void onWorldRendererPost(WorldRenderer wr) {
@@ -471,13 +471,13 @@ public class NeoRenderer {
int z = Math.floorDiv(wr.posZ, 16);
if(Minecraft.getMinecraft().theWorld.getChunkFromChunkCoords(x, z).isChunkLoaded) {
- NeoChunk lodChunk = getLODChunk(x, z);
- lodChunk.isSectionVisible[y] = ((IWorldRenderer)wr).isDrawn();
- lodChunk.putChunkMeshes(y, ((IWorldRenderer)wr).getChunkMeshes());
+ NeoChunk neoChunk = getNeoChunk(x, z);
+ neoChunk.isSectionVisible[y] = ((IWorldRenderer)wr).isDrawn();
+ neoChunk.putChunkMeshes(y, ((IWorldRenderer)wr).getChunkMeshes());
}
}
- private NeoChunk getLODChunk(int chunkX, int chunkZ) {
+ private NeoChunk getNeoChunk(int chunkX, int chunkZ) {
return getRegionContaining(chunkX, chunkZ).getChunkAbsolute(chunkX, chunkZ);
}
@@ -495,20 +495,20 @@ public class NeoRenderer {
setVisible(chunk, visible, false);
}
- public void setVisible(NeoChunk lodChunk, boolean visible, boolean forceCheck) {
- if(!forceCheck && visible == lodChunk.visible) return;
+ public void setVisible(NeoChunk neoChunk, boolean visible, boolean forceCheck) {
+ if(!forceCheck && visible == neoChunk.visible) return;
- lodChunk.visible = visible;
- lodChunkChanged(lodChunk);
+ neoChunk.visible = visible;
+ neoChunkChanged(neoChunk);
}
- public void lodChunkChanged(NeoChunk lodChunk) {
- int newLOD = lodChunk.hasChunkMeshes() ? 2 : 0;
+ public void neoChunkChanged(NeoChunk neoChunk) {
+ int newLOD = neoChunk.hasChunkMeshes() ? 2 : 0;
for(int y = 0; y < 16; y++) {
for(int pass = 0; pass < 2; pass++) {
- ChunkMesh cm = lodChunk.chunkMeshes[y * 2 + pass];
+ ChunkMesh cm = neoChunk.chunkMeshes[y * 2 + pass];
if(cm != null) {
- if(lodChunk.isSectionVisible[y] && newLOD == 2) {
+ if(neoChunk.isSectionVisible[y] && newLOD == 2) {
if(!cm.visible) {
setMeshVisible(cm, true);
}
@@ -569,10 +569,10 @@ public class NeoRenderer {
return world != null && !world.provider.isHellWorld;
}
- public static class LODChunkComparator implements Comparator<NeoChunk> {
+ public static class NeoChunkComparator implements Comparator<NeoChunk> {
Entity player;
- public LODChunkComparator(Entity player) {
+ public NeoChunkComparator(Entity player) {
this.player = player;
}
diff --git a/src/main/resources/META-INF/LODMod_at.cfg b/src/main/resources/META-INF/neodymium_at.cfg
index 27879f5..27879f5 100644
--- a/src/main/resources/META-INF/LODMod_at.cfg
+++ b/src/main/resources/META-INF/neodymium_at.cfg