mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-10-27 06:44:00 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c62d0d864a | ||
|
|
8bc00f94fd | ||
|
|
12cc231224 | ||
|
|
7612571e97 | ||
|
|
c7c82407ef | ||
|
|
d90fcdc40c | ||
|
|
edc0e689b1 | ||
|
|
dff048466b |
@@ -24,10 +24,13 @@ public class WorldOverlayRenderer implements IKeyStateTracker {
|
||||
public static int mobOverlay = 0;
|
||||
private static byte[] mobSpawnCache;
|
||||
private static long mobOverlayUpdateTime;
|
||||
private static String oregenPatternName;
|
||||
private static boolean hasOregenPatternBeenSet = false;
|
||||
|
||||
public static void reset() {
|
||||
mobOverlay = 0;
|
||||
chunkOverlay = 0;
|
||||
hasOregenPatternBeenSet = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -279,15 +282,33 @@ public class WorldOverlayRenderer implements IKeyStateTracker {
|
||||
GL11.glVertex3d(x2, y2, z1 + h);
|
||||
}
|
||||
} else if (chunkOverlay == 3) {
|
||||
int gx1 = (((entity.chunkCoordX < 0 ? entity.chunkCoordX - 3 : entity.chunkCoordX) / 3 * 3) << 4)
|
||||
- intOffsetX;
|
||||
int gz1 = (((entity.chunkCoordZ < 0 ? entity.chunkCoordZ - 3 : entity.chunkCoordZ) / 3 * 3) << 4)
|
||||
- intOffsetZ;
|
||||
if (entity.chunkCoordX < 0) {
|
||||
gx1 += 16;
|
||||
if (!hasOregenPatternBeenSet) {
|
||||
try {
|
||||
oregenPatternName = ((Enum<?>) Class.forName("gregtech.common.GT_Worldgenerator")
|
||||
.getDeclaredField("oregenPattern").get(null)).name();
|
||||
} catch (Exception ignored) {
|
||||
oregenPatternName = "AXISSYMMETRICAL";
|
||||
}
|
||||
hasOregenPatternBeenSet = true;
|
||||
}
|
||||
if (entity.chunkCoordZ < 0) {
|
||||
gz1 += 16;
|
||||
int gx1;
|
||||
int gz1;
|
||||
if (oregenPatternName.equals("EQUAL_SPACING")) {
|
||||
// gt oregen uses new regular pattern
|
||||
gx1 = ((Math.floorDiv(entity.chunkCoordX, 3) * 3) << 4) - intOffsetX;
|
||||
gz1 = ((Math.floorDiv(entity.chunkCoordZ, 3) * 3) << 4) - intOffsetZ;
|
||||
} else {
|
||||
// gt oregen uses old bugged pattern
|
||||
gx1 = (((entity.chunkCoordX < 0 ? entity.chunkCoordX - 3 : entity.chunkCoordX) / 3 * 3) << 4)
|
||||
- intOffsetX;
|
||||
gz1 = (((entity.chunkCoordZ < 0 ? entity.chunkCoordZ - 3 : entity.chunkCoordZ) / 3 * 3) << 4)
|
||||
- intOffsetZ;
|
||||
if (entity.chunkCoordX < 0) {
|
||||
gx1 += 16;
|
||||
}
|
||||
if (entity.chunkCoordZ < 0) {
|
||||
gz1 += 16;
|
||||
}
|
||||
}
|
||||
int gx2 = gx1 + 48;
|
||||
int gz2 = gz1 + 48;
|
||||
|
||||
Reference in new issue
Block a user