@@ -102,7 +102,7 @@ public class SeedCracker implements ModInitializer {
|
||||
this.pillarSeeds = null;
|
||||
this.structureCache.clear();
|
||||
this.biomeCache.clear();
|
||||
this.populationCache.clear();
|
||||
this.decoratorCache.clear();
|
||||
}
|
||||
|
||||
public synchronized boolean onPillarData(PillarData pillarData) {
|
||||
@@ -134,21 +134,21 @@ public class SeedCracker implements ModInitializer {
|
||||
|
||||
if(this.structureSeeds == null && this.pillarSeeds != null && this.structureCache.size() + this.populationCache.size() >= 5) {
|
||||
this.structureSeeds = new ArrayList<>();
|
||||
Log.warn("Looking for structure seeds with " + this.structureCache.size() + " structure features.");
|
||||
Log.warn("Looking for structure seeds with " + this.populationCache.size() + " population features.");
|
||||
LOG.warn("Looking for structure seeds with " + this.structureCache.size() + " structure features.");
|
||||
LOG.warn("Looking for structure seeds with " + this.populationCache.size() + " population features.");
|
||||
|
||||
this.pillarSeeds.forEach(pillarSeed -> {
|
||||
timeMachine.buildStructureSeeds(pillarSeed, this.structureCache, this.populationCache, this.structureSeeds);
|
||||
timeMachine.buildStructureSeeds(pillarSeed, this.structureCache, this.decoratorCache, this.structureSeeds);
|
||||
});
|
||||
|
||||
if(this.structureSeeds.size() > 0) {
|
||||
Log.warn("Finished search with " + this.structureSeeds.size() + (this.structureSeeds.size() == 1 ? " seed." : " seeds."));
|
||||
LOG.warn("Finished search with " + this.structureSeeds.size() + (this.structureSeeds.size() == 1 ? " seed." : " seeds."));
|
||||
} else {
|
||||
Log.error("Finished search with no seeds.");
|
||||
}
|
||||
|
||||
this.structureCache.clear();
|
||||
this.onPopulationData(null);
|
||||
this.onDecoratorData(null);
|
||||
this.onBiomeData(null);
|
||||
} else if(this.structureSeeds != null && structureData != null) {
|
||||
this.structureSeeds.removeIf(structureSeed -> {
|
||||
@@ -188,7 +188,7 @@ public class SeedCracker implements ModInitializer {
|
||||
Log.warn("Looking for world seeds with " + this.biomeCache.size() + " biomes.");
|
||||
|
||||
for(int i = 0; i < this.structureSeeds.size(); i++) {
|
||||
Log.warn("Progress " + (i * 100.0f) / this.structureSeeds.size() + "%...");
|
||||
SeedCracker.LOG.warn("Progress " + (i * 100.0f) / this.structureSeeds.size() + "%...");
|
||||
|
||||
long structureSeed = this.structureSeeds.get(i);
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package kaptainwutax.seedcracker.cracker;
|
||||
|
||||
import kaptainwutax.seedcracker.SeedCracker;
|
||||
import kaptainwutax.seedcracker.cracker.population.PopulationData;
|
||||
import kaptainwutax.seedcracker.util.Log;
|
||||
import kaptainwutax.seedcracker.util.Rand;
|
||||
import kaptainwutax.seedcracker.util.math.LCG;
|
||||
import net.minecraft.world.gen.ChunkRandom;
|
||||
@@ -22,7 +21,7 @@ public class TimeMachine {
|
||||
|
||||
for(long i = 0; i < (1L << 32); i++) {
|
||||
if((i & ((1L << 28) - 1)) == 0) {
|
||||
Log.warn("Progress " + (i * 100.0f) / (1L << 32) + "%...");
|
||||
SeedCracker.LOG.warn("Progress " + (i * 100.0f) / (1L << 32) + "%...");
|
||||
}
|
||||
|
||||
long structureSeed = this.timeMachine(i, pillarSeed);
|
||||
|
||||
@@ -24,9 +24,8 @@ public abstract class Finder {
|
||||
|
||||
static {
|
||||
for(int x = 0; x < 16; x++) {
|
||||
for(int y = 0; y < 256; y++) {
|
||||
for(int z = 0; z < 16; z++) {
|
||||
|
||||
for(int z = 0; z < 16; z++) {
|
||||
for(int y = 0; y < 256; y++) {
|
||||
BlockPos pos = new BlockPos(x, y, z);
|
||||
if(y < 16)SUB_CHUNK_POSITIONS.add(pos);
|
||||
CHUNK_POSITIONS.add(pos);
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
package kaptainwutax.seedcracker.util;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.util.TextComponentUtil;
|
||||
import net.minecraft.text.Texts;
|
||||
import net.minecraft.client.util.TextFormat;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.text.LiteralText;
|
||||
|
||||
import static net.minecraft.util.Formatting.RED;
|
||||
import static net.minecraft.util.Formatting.YELLOW;
|
||||
|
||||
public class Log {
|
||||
|
||||
public static void debug(String message) {
|
||||
@@ -23,7 +19,7 @@ public class Log {
|
||||
PlayerEntity player = getPlayer();
|
||||
|
||||
if(player != null) {
|
||||
player.addChatMessage(new LiteralText(YELLOW + message), false);
|
||||
player.addChatMessage(new LiteralText(TextFormat.YELLOW + message), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +27,7 @@ public class Log {
|
||||
PlayerEntity player = getPlayer();
|
||||
|
||||
if(player != null) {
|
||||
player.addChatMessage(new LiteralText(RED + message), false);
|
||||
player.addChatMessage(new LiteralText(TextFormat.RED + message), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,11 @@ public class PosIterator {
|
||||
Set<BlockPos> result = new HashSet<>();
|
||||
|
||||
for(int x = start.getX(); x <= end.getX(); x++) {
|
||||
|
||||
for(int y = start.getY(); y <= end.getY(); y++) {
|
||||
for(int z = start.getZ(); z <= end.getZ(); z++) {
|
||||
result.add(new BlockPos(x, y, z));
|
||||
}
|
||||
for(int z = start.getZ(); z <= end.getZ(); z++) {
|
||||
for(int y = start.getY(); y <= end.getY(); y++) {
|
||||
result.add(new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user