Data fixer enhancements, new textures
|
@ -33,11 +33,8 @@ public class ServerWorldMixin {
|
|||
private void be_onServerWorldInit(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey<World> registryKey, DimensionType dimensionType, WorldGenerationProgressListener worldGenerationProgressListener, ChunkGenerator chunkGenerator, boolean debugWorld, long l, List<Spawner> list, boolean bl, CallbackInfo info) {
|
||||
File beData = new File(FabricLoader.getInstance().getGameDir().getParent().toString(), "saves/" + properties.getLevelName() + "/betterend_data.nbt");
|
||||
ModMetadata meta = FabricLoader.getInstance().getModContainer(BetterEnd.MOD_ID).get().getMetadata();
|
||||
String version = meta.getVersion().toString();
|
||||
String version = BetterEnd.isDevEnvironment() ? "development" : meta.getVersion().toString();
|
||||
boolean fix = false;
|
||||
if (version.equals("${version}")) {
|
||||
version = "development";
|
||||
}
|
||||
if (beData.exists()) {
|
||||
CompoundTag root;
|
||||
try {
|
||||
|
|
|
@ -19,12 +19,16 @@ public class DataFixerUtil {
|
|||
private static final Map<String, String> REPLACEMENT = Maps.newHashMap();
|
||||
|
||||
public static void init() {
|
||||
addFix("minecraft:stone", "minecraft:glowstone");
|
||||
//addFix("minecraft:stone", "minecraft:glowstone"); // Example
|
||||
}
|
||||
|
||||
public static void fixData(File dir) {
|
||||
if (REPLACEMENT.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<File> regions = getAllRegions(dir, null);
|
||||
regions.forEach((file) -> {
|
||||
regions.parallelStream().forEach((file) -> {
|
||||
try {
|
||||
System.out.println("Fixing " + file);
|
||||
boolean[] changed = new boolean[1];
|
||||
|
|
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 431 B |