More upstream compatibility fixes

This commit is contained in:
MattBDev
2019-09-03 13:40:20 -04:00
parent e88adea066
commit cafb4120ef
8 changed files with 232 additions and 207 deletions

View File

@ -61,7 +61,7 @@ public interface Clipboard extends Extent {
/**
* Returns true if the clipboard has biome data. This can be checked since {@link Extent#getBiome(BlockVector2)}
* strongly suggests returning {@link com.sk89q.worldedit.world.biome.BiomeTypes.OCEAN} instead of {@code null}
* strongly suggests returning {@link com.sk89q.worldedit.world.biome.BiomeTypes#OCEAN} instead of {@code null}
* if biomes aren't present. However, it might not be desired to set areas to ocean if the clipboard is defaulting
* to ocean, instead of having biomes explicitly set.
*

View File

@ -61,6 +61,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
import java.util.function.BiConsumer;
import net.jpountz.lz4.LZ4BlockInputStream;
@ -303,7 +304,7 @@ public class SpongeSchematicReader extends NBTSchematicReader {
throw new IOException("Biome palette size does not match expected size.");
}
for (Map.Entry<String, Tag> palettePart : paletteTag.getValue().entrySet()) {
for (Entry<String, Tag> palettePart : paletteTag.getValue().entrySet()) {
String key = palettePart.getKey();
if (fixer != null) {
key = fixer.fixUp(DataFixer.FixTypes.BIOME, key, dataVersion);