diff --git a/BlueMapCore/build.gradle b/BlueMapCore/build.gradle index ebecdb25..7c70cf45 100644 --- a/BlueMapCore/build.gradle +++ b/BlueMapCore/build.gradle @@ -34,13 +34,27 @@ license { } //resource Extensions +String[] resourceIds = [ + "1_12", "1_13", "1_15", "1_16", "1_18" +]; + task zipResourceExtensions { - dependsOn 'zipResourceExtensions1_12' - dependsOn 'zipResourceExtensions1_13' - dependsOn 'zipResourceExtensions1_15' - dependsOn 'zipResourceExtensions1_16' + for (String id : resourceIds) { + dependsOn "zipResourceExtensions$id" + } } +for (String id : resourceIds) zipResourcesTask(id) +void zipResourcesTask(String resourceId) { + task ("zipResourceExtensions$resourceId", type: Zip) { + from fileTree("src/main/resourceExtensions/mc$resourceId") + archiveName 'resourceExtensions.zip' + destinationDir(file("src/main/resources/de/bluecolored/bluemap/mc$resourceId/")) + outputs.upToDateWhen{ false } + } +} + +/* task zipResourceExtensions1_12(type: Zip) { from fileTree('src/main/resourceExtensions/mc1_12') archiveName 'resourceExtensions.zip' @@ -68,6 +82,7 @@ task zipResourceExtensions1_16(type: Zip) { destinationDir(file('src/main/resources/de/bluecolored/bluemap/mc1_16/')) outputs.upToDateWhen { false } } +*/ //always update the zip before build processResources.dependsOn(zipResourceExtensions) diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/MinecraftVersion.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/MinecraftVersion.java index 1f7263fe..02d33cfd 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/MinecraftVersion.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/MinecraftVersion.java @@ -148,7 +148,8 @@ public class MinecraftVersion implements Comparable { MC_1_15 (new MinecraftVersion(1, 15), "mc1_15", "https://launcher.mojang.com/v1/objects/e3f78cd16f9eb9a52307ed96ebec64241cc5b32d/client.jar"), MC_1_16 (new MinecraftVersion(1, 16), "mc1_16", "https://launcher.mojang.com/v1/objects/228fdf45541c4c2fe8aec4f20e880cb8fcd46621/client.jar"), MC_1_16_2 (new MinecraftVersion(1, 16, 2), "mc1_16", "https://launcher.mojang.com/v1/objects/653e97a2d1d76f87653f02242d243cdee48a5144/client.jar"), - MC_1_17 (new MinecraftVersion(1, 17), "mc1_16", "https://launcher.mojang.com/v1/objects/1cf89c77ed5e72401b869f66410934804f3d6f52/client.jar"); + MC_1_17 (new MinecraftVersion(1, 17), "mc1_16", "https://launcher.mojang.com/v1/objects/1cf89c77ed5e72401b869f66410934804f3d6f52/client.jar"), + MC_1_18 (new MinecraftVersion(1, 18), "mc1_18", "https://launcher.mojang.com/v1/objects/020aa79e63a7aab5d6f30e5ec7a6c08baee6b64c/client.jar"); private final MinecraftVersion version; private final String resourcePrefix; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil113.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil113.java index 1e2b867c..a9b81010 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil113.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil113.java @@ -61,6 +61,8 @@ public class ChunkAnvil113 extends MCAChunk { Section section = new Section(sectionTag); if (section.getSectionY() >= 0 && section.getSectionY() < sections.length) sections[section.getSectionY()] = section; } + } else { + sections = new Section[0]; } Tag tag = levelData.get("Biomes"); //tag can be byte-array or int-array @@ -116,14 +118,14 @@ public class ChunkAnvil113 extends MCAChunk { } @Override - public int getBiome(int x, int y, int z) { + public String getBiome(int x, int y, int z) { x = x & 0xF; // Math.floorMod(pos.getX(), 16) z = z & 0xF; int biomeIntIndex = z * 16 + x; - if (biomeIntIndex >= this.biomes.length) return Biome.DEFAULT.getNumeralId(); + if (biomeIntIndex >= this.biomes.length) return Biome.DEFAULT.getFullId(); - return biomes[biomeIntIndex]; + return LegacyBiomes.idFor(biomes[biomeIntIndex]); } private class Section { diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil115.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil115.java index e9b9efc1..c8ed9a2b 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil115.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil115.java @@ -61,6 +61,8 @@ public class ChunkAnvil115 extends MCAChunk { Section section = new Section(sectionTag); if (section.getSectionY() >= 0 && section.getSectionY() < sections.length) sections[section.getSectionY()] = section; } + } else { + sections = new Section[0]; } Tag tag = levelData.get("Biomes"); //tag can be byte-array or int-array @@ -116,16 +118,16 @@ public class ChunkAnvil115 extends MCAChunk { } @Override - public int getBiome(int x, int y, int z) { + public String getBiome(int x, int y, int z) { x = (x & 0xF) / 4; // Math.floorMod(pos.getX(), 16) z = (z & 0xF) / 4; y = y / 4; int biomeIntIndex = y * 16 + z * 4 + x; - if (biomeIntIndex < 0) return Biome.DEFAULT.getNumeralId(); - if (biomeIntIndex >= this.biomes.length) return Biome.DEFAULT.getNumeralId(); + if (biomeIntIndex < 0) return Biome.DEFAULT.getFullId(); + if (biomeIntIndex >= this.biomes.length) return Biome.DEFAULT.getFullId(); - return biomes[biomeIntIndex]; + return LegacyBiomes.idFor(biomes[biomeIntIndex]); } private static class Section { diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil116.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil116.java index ba07499a..95dc8bd1 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil116.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil116.java @@ -82,6 +82,8 @@ public class ChunkAnvil116 extends MCAChunk { for (Section section : sectionList) { sections[section.sectionY - sectionMin] = section; } + } else { + sections = new Section[0]; } Tag tag = levelData.get("Biomes"); //tag can be byte-array or int-array @@ -130,8 +132,8 @@ public class ChunkAnvil116 extends MCAChunk { } @Override - public int getBiome(int x, int y, int z) { - if (biomes.length < 16) return Biome.DEFAULT.getNumeralId(); + public String getBiome(int x, int y, int z) { + if (biomes.length < 16) return Biome.DEFAULT.getFullId(); x = (x & 0xF) / 4; // Math.floorMod(pos.getX(), 16) z = (z & 0xF) / 4; @@ -142,7 +144,7 @@ public class ChunkAnvil116 extends MCAChunk { if (biomeIntIndex >= biomes.length) biomeIntIndex -= (((biomeIntIndex - biomes.length) >> 4) + 1) * 16; if (biomeIntIndex < 0) biomeIntIndex -= (biomeIntIndex >> 4) * 16; - return biomes[biomeIntIndex]; + return LegacyBiomes.idFor(biomes[biomeIntIndex]); } @Override diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil118.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil118.java new file mode 100644 index 00000000..c4ff5f91 --- /dev/null +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil118.java @@ -0,0 +1,281 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.mca; + +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.world.Biome; +import de.bluecolored.bluemap.core.world.BlockState; +import de.bluecolored.bluemap.core.world.LightData; +import net.querz.nbt.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +@SuppressWarnings("FieldMayBeFinal") +public class ChunkAnvil118 extends MCAChunk { + private static final String AIR_ID = "minecraft:air"; + + private boolean isGenerated; + private boolean hasLight; + + private int sectionMin, sectionMax; + private Section[] sections; + + @SuppressWarnings("unchecked") + public ChunkAnvil118(MCAWorld world, CompoundTag chunkTag) { + super(world, chunkTag); + + String status = chunkTag.getString("Status"); + this.isGenerated = status.equals("full"); + this.hasLight = isGenerated; + + if (!isGenerated && getWorld().isIgnoreMissingLightData()) { + isGenerated = !status.equals("empty"); + } + + if (chunkTag.containsKey("sections")) { + this.sectionMin = Integer.MAX_VALUE; + this.sectionMax = Integer.MIN_VALUE; + + ListTag sectionsTag = (ListTag) chunkTag.getListTag("sections"); + ArrayList
sectionList = new ArrayList<>(sectionsTag.size()); + + for (CompoundTag sectionTag : sectionsTag) { + + // skip empty sections + CompoundTag blockStatesTag = sectionTag.getCompoundTag("block_states"); + if (blockStatesTag == null) continue; + ListTag paletteTag = (ListTag) blockStatesTag.getListTag("palette"); + if (paletteTag == null) continue; + if (paletteTag.size() == 0) continue; + if (paletteTag.size() == 1 && AIR_ID.equals(paletteTag.get(0).getString("Name"))) continue; + + Section section = new Section(sectionTag); + int y = section.getSectionY(); + + if (sectionMin > y) sectionMin = y; + if (sectionMax < y) sectionMax = y; + + sectionList.add(section); + } + + sections = new Section[1 + sectionMax - sectionMin]; + for (Section section : sectionList) { + sections[section.sectionY - sectionMin] = section; + } + } else { + sections = new Section[0]; + } + } + + @Override + public boolean isGenerated() { + return isGenerated; + } + + @Override + public BlockState getBlockState(int x, int y, int z) { + int sectionY = y >> 4; + + Section section = getSection(sectionY); + if (section == null) return BlockState.AIR; + + return section.getBlockState(x, y, z); + } + + @Override + public LightData getLightData(int x, int y, int z, LightData target) { + if (!hasLight) return target.set(getWorld().getSkyLight(), 0); + + int sectionY = y >> 4; + + Section section = getSection(sectionY); + if (section == null) return (sectionY < sectionMin) ? target.set(0, 0) : target.set(getWorld().getSkyLight(), 0); + + return section.getLightData(x, y, z, target); + } + + @Override + public String getBiome(int x, int y, int z) { + int sectionY = y >> 4; + + Section section = getSection(sectionY); + if (section == null) return Biome.DEFAULT.getFullId(); + + return section.getBiome(x, y, z); + } + + @Override + public int getMinY(int x, int z) { + return sectionMin * 16; + } + + @Override + public int getMaxY(int x, int z) { + return sectionMax * 16 + 15; + } + + private Section getSection(int y) { + y -= sectionMin; + if (y < 0 || y >= this.sections.length) return null; + return this.sections[y]; + } + + private static class Section { + private static final long[] EMPTY_LONG_ARRAY = new long[0]; + private static final BlockState[] EMPTY_BLOCK_STATE_ARRAY = new BlockState[0]; + private static final String[] EMPTY_STRING_ARRAY = new String[0]; + + private int sectionY; + private byte[] blockLight; + private byte[] skyLight; + private long[] blocks = EMPTY_LONG_ARRAY; + private long[] biomes = EMPTY_LONG_ARRAY; + private BlockState[] blockPalette = EMPTY_BLOCK_STATE_ARRAY; + private String[] biomePalette = EMPTY_STRING_ARRAY; + + private int bitsPerBlock, bitsPerBiome; + + @SuppressWarnings("unchecked") + public Section(CompoundTag sectionData) { + this.sectionY = sectionData.get("Y", NumberTag.class).asInt(); + this.blockLight = sectionData.getByteArray("BlockLight"); + this.skyLight = sectionData.getByteArray("SkyLight"); + + // blocks + CompoundTag blockStatesTag = sectionData.getCompoundTag("block_states"); + if (blockStatesTag != null) { + // block data + this.blocks = blockStatesTag.getLongArray("data"); + + // block palette + ListTag paletteTag = (ListTag) blockStatesTag.getListTag("palette"); + if (paletteTag != null) { + this.blockPalette = new BlockState[paletteTag.size()]; + for (int i = 0; i < this.blockPalette.length; i++) { + blockPalette[i] = readBlockStatePaletteEntry(paletteTag.get(i)); + } + } + } + + // biomes + CompoundTag biomesTag = sectionData.getCompoundTag("biomes"); + if (biomesTag != null) { + // biomes data + this.biomes = biomesTag.getLongArray("data"); + + // biomes palette + ListTag paletteTag = (ListTag) biomesTag.getListTag("palette"); + if (paletteTag != null) { + this.biomePalette = new String[paletteTag.size()]; + for (int i = 0; i < this.biomePalette.length; i++) { + biomePalette[i] = paletteTag.get(i).getValue(); + } + } + } + + if (blocks.length < 256 && blocks.length > 0) blocks = Arrays.copyOf(blocks, 256); + if (blockLight.length < 2048 && blockLight.length > 0) blockLight = Arrays.copyOf(blockLight, 2048); + if (skyLight.length < 2048 && skyLight.length > 0) skyLight = Arrays.copyOf(skyLight, 2048); + + this.bitsPerBlock = this.blocks.length >> 6; // available longs * 64 (bits per long) / 4096 (blocks per section) (floored result) + this.bitsPerBiome = Integer.SIZE - Integer.numberOfLeadingZeros(this.biomePalette.length - 1); + } + + private BlockState readBlockStatePaletteEntry(CompoundTag paletteEntry) { + String id = paletteEntry.getString("Name"); //shortcut to save time and memory + if (AIR_ID.equals(id)) return BlockState.AIR; + + Map properties = new HashMap<>(); + + if (paletteEntry.containsKey("Properties")) { + CompoundTag propertiesTag = paletteEntry.getCompoundTag("Properties"); + for (Entry> property : propertiesTag) { + properties.put(property.getKey().toLowerCase(), ((StringTag) property.getValue()).getValue().toLowerCase()); + } + } + + return new BlockState(id, properties); + } + + public int getSectionY() { + return sectionY; + } + + public BlockState getBlockState(int x, int y, int z) { + if (blocks.length == 0) return BlockState.AIR; + + x &= 0xF; y &= 0xF; z &= 0xF; // Math.floorMod(pos.getX(), 16) + + int blockIndex = y * 256 + z * 16 + x; + + long value = MCAMath.getValueFromLongArray(blocks, blockIndex, bitsPerBlock); + if (value >= blockPalette.length) { + Logger.global.noFloodWarning("palettewarning", "Got block-palette value " + value + " but palette has size of " + blockPalette.length + "! (Future occasions of this error will not be logged)"); + return BlockState.MISSING; + } + + return blockPalette[(int) value]; + } + + public LightData getLightData(int x, int y, int z, LightData target) { + if (blockLight.length == 0 && skyLight.length == 0) return target.set(0, 0); + + x &= 0xF; y &= 0xF; z &= 0xF; // Math.floorMod(pos.getX(), 16) + + int blockByteIndex = y * 256 + z * 16 + x; + int blockHalfByteIndex = blockByteIndex >> 1; // blockByteIndex / 2 + boolean largeHalf = (blockByteIndex & 0x1) != 0; // (blockByteIndex % 2) == 0 + + return target.set( + this.skyLight.length > 0 ? MCAMath.getByteHalf(this.skyLight[blockHalfByteIndex], largeHalf) : 0, + this.blockLight.length > 0 ? MCAMath.getByteHalf(this.blockLight[blockHalfByteIndex], largeHalf) : 0 + ); + } + + public String getBiome(int x, int y, int z) { + if (biomePalette.length == 0) return Biome.DEFAULT.getId(); + if (biomes.length == 0) return biomePalette[0]; + + x = (x & 0xF) / 4; // Math.floorMod(pos.getX(), 16) / 4 + z = (z & 0xF) / 4; + y = (y & 0xF) / 4; + int biomeIndex = y * 16 + z * 4 + x; + + // this.biomes.length == bits per biome -- because -> available longs * 64 (bits per long) / 64 (biomes per section, 4*4*4) + long value = MCAMath.getValueFromLongArray(biomes, biomeIndex, bitsPerBiome); + if (value >= biomePalette.length) { + Logger.global.noFloodWarning("biomepalettewarning", "Got biome-palette value " + value + " but palette has size of " + biomePalette.length + "! (Future occasions of this error will not be logged)"); + return Biome.DEFAULT.getId(); + } + + return biomePalette[(int) value]; + } + } + +} diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/EmptyChunk.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/EmptyChunk.java index b64a5c6c..12e979e2 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/EmptyChunk.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/EmptyChunk.java @@ -48,8 +48,8 @@ public class EmptyChunk extends MCAChunk { } @Override - public int getBiome(int x, int y, int z) { - return Biome.DEFAULT.getNumeralId(); + public String getBiome(int x, int y, int z) { + return Biome.DEFAULT.getFullId(); } } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/LegacyBiomes.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/LegacyBiomes.java new file mode 100644 index 00000000..902a8562 --- /dev/null +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/LegacyBiomes.java @@ -0,0 +1,116 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.mca; + +import java.util.Arrays; + +public class LegacyBiomes { + + private static final String[] BIOME_IDS = new String[170]; + static { + Arrays.fill(BIOME_IDS, "minecraft:ocean"); + BIOME_IDS[0] = "minecraft:ocean"; + BIOME_IDS[1] = "minecraft:plains"; + BIOME_IDS[2] = "minecraft:desert"; + BIOME_IDS[3] = "minecraft:mountains"; + BIOME_IDS[4] = "minecraft:forest"; + BIOME_IDS[5] = "minecraft:taiga"; + BIOME_IDS[6] = "minecraft:swamp"; + BIOME_IDS[7] = "minecraft:river"; + BIOME_IDS[8] = "minecraft:nether"; + BIOME_IDS[9] = "minecraft:the_end"; + BIOME_IDS[10] = "minecraft:frozen_ocean"; + BIOME_IDS[11] = "minecraft:frozen_river"; + BIOME_IDS[12] = "minecraft:snowy_tundra"; + BIOME_IDS[13] = "minecraft:snowy_mountains"; + BIOME_IDS[14] = "minecraft:mushroom_fields"; + BIOME_IDS[15] = "minecraft:mushroom_field_shore"; + BIOME_IDS[16] = "minecraft:beach"; + BIOME_IDS[17] = "minecraft:desert_hills"; + BIOME_IDS[18] = "minecraft:wooded_hills"; + BIOME_IDS[19] = "minecraft:taiga_hills"; + BIOME_IDS[20] = "minecraft:mountain_edge"; + BIOME_IDS[21] = "minecraft:jungle"; + BIOME_IDS[22] = "minecraft:jungle_hills"; + BIOME_IDS[23] = "minecraft:jungle_edge"; + BIOME_IDS[24] = "minecraft:deep_ocean"; + BIOME_IDS[25] = "minecraft:stone_shore"; + BIOME_IDS[26] = "minecraft:snowy_beach"; + BIOME_IDS[27] = "minecraft:birch_forest"; + BIOME_IDS[28] = "minecraft:birch_forest_hills"; + BIOME_IDS[29] = "minecraft:dark_forest"; + BIOME_IDS[30] = "minecraft:snowy_taiga"; + BIOME_IDS[31] = "minecraft:snowy_taiga_hills"; + BIOME_IDS[32] = "minecraft:giant_tree_taiga"; + BIOME_IDS[33] = "minecraft:giant_tree_taiga_hills"; + BIOME_IDS[34] = "minecraft:wooded_mountains"; + BIOME_IDS[35] = "minecraft:savanna"; + BIOME_IDS[36] = "minecraft:savanna_plateau"; + BIOME_IDS[37] = "minecraft:badlands"; + BIOME_IDS[38] = "minecraft:wooded_badlands_plateau"; + BIOME_IDS[39] = "minecraft:badlands_plateau"; + BIOME_IDS[40] = "minecraft:small_end_islands"; + BIOME_IDS[41] = "minecraft:end_midlands"; + BIOME_IDS[42] = "minecraft:end_highlands"; + BIOME_IDS[43] = "minecraft:end_barrens"; + BIOME_IDS[44] = "minecraft:warm_ocean"; + BIOME_IDS[45] = "minecraft:lukewarm_ocean"; + BIOME_IDS[46] = "minecraft:cold_ocean"; + BIOME_IDS[47] = "minecraft:deep_warm_ocean"; + BIOME_IDS[48] = "minecraft:deep_lukewarm_ocean"; + BIOME_IDS[49] = "minecraft:deep_cold_ocean"; + BIOME_IDS[50] = "minecraft:deep_frozen_ocean"; + BIOME_IDS[127] = "minecraft:the_void"; + BIOME_IDS[129] = "minecraft:sunflower_plains"; + BIOME_IDS[130] = "minecraft:desert_lakes"; + BIOME_IDS[131] = "minecraft:gravelly_mountains"; + BIOME_IDS[132] = "minecraft:flower_forest"; + BIOME_IDS[133] = "minecraft:taiga_mountains"; + BIOME_IDS[134] = "minecraft:swamp_hills"; + BIOME_IDS[140] = "minecraft:ice_spikes"; + BIOME_IDS[149] = "minecraft:modified_jungle"; + BIOME_IDS[151] = "minecraft:modified_jungle_edge"; + BIOME_IDS[155] = "minecraft:tall_birch_forest"; + BIOME_IDS[156] = "minecraft:tall_birch_hills"; + BIOME_IDS[157] = "minecraft:dark_forest_hills"; + BIOME_IDS[158] = "minecraft:snowy_taiga_mountains"; + BIOME_IDS[160] = "minecraft:giant_spruce_taiga"; + BIOME_IDS[161] = "minecraft:giant_spruce_taiga_hills"; + BIOME_IDS[162] = "minecraft:modified_gravelly_mountains"; + BIOME_IDS[163] = "minecraft:shattered_savanna"; + BIOME_IDS[164] = "minecraft:shattered_savanna_plateau"; + BIOME_IDS[165] = "minecraft:eroded_badlands"; + BIOME_IDS[166] = "minecraft:modified_wooded_badlands_plateau"; + BIOME_IDS[167] = "minecraft:modified_badlands_plateau"; + BIOME_IDS[168] = "minecraft:bamboo_jungle"; + BIOME_IDS[169] = "minecraft:bamboo_jungle_hills"; + } + + public static String idFor(int legacyId) { + if (legacyId < 0 || legacyId > BIOME_IDS.length) legacyId = 0; + return BIOME_IDS[legacyId]; + } + +} diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/MCAChunk.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/MCAChunk.java index d6708f95..c78760b3 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/MCAChunk.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/MCAChunk.java @@ -66,7 +66,7 @@ public abstract class MCAChunk implements Chunk { public abstract LightData getLightData(int x, int y, int z, LightData target); @Override - public abstract int getBiome(int x, int y, int z); + public abstract String getBiome(int x, int y, int z); @Override public int getMaxY(int x, int z) { @@ -87,7 +87,8 @@ public abstract class MCAChunk implements Chunk { if (version < 2200) return new ChunkAnvil113(world, chunkTag); if (version < 2500) return new ChunkAnvil115(world, chunkTag); - return new ChunkAnvil116(world, chunkTag); + if (version < 2844) return new ChunkAnvil116(world, chunkTag); + return new ChunkAnvil118(world, chunkTag); } public static MCAChunk empty() { diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BiomeConfig.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BiomeConfig.java index 804ac7dc..b64a48d2 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BiomeConfig.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BiomeConfig.java @@ -24,50 +24,33 @@ */ package de.bluecolored.bluemap.core.resourcepack; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.world.Biome; import org.spongepowered.configurate.ConfigurationNode; +import java.util.HashMap; +import java.util.Map; import java.util.Map.Entry; +@DebugDump public class BiomeConfig { - private Biome[] biomes; + private final Map biomes; public BiomeConfig() { - biomes = new Biome[10]; + biomes = new HashMap<>(); } public void load(ConfigurationNode node) { for (Entry e : node.childrenMap().entrySet()){ String id = e.getKey().toString(); Biome biome = Biome.create(id, e.getValue()); - - int numeralId = biome.getNumeralId(); - ensureAvailability(numeralId); - biomes[numeralId] = biome; + biomes.put(id, biome); } } - public Biome getBiome(int id) { - if (id > 0 && id < biomes.length) { - Biome biome = biomes[id]; - return biome != null ? biome : Biome.DEFAULT; - } - - return Biome.DEFAULT; - } - - private void ensureAvailability(int id) { - if (id >= biomes.length) { - int newSize = biomes.length; - do { - newSize = (int) (newSize * 1.5) + 1; - } while (id >= newSize); - - Biome[] newArray = new Biome[newSize]; - System.arraycopy(biomes, 0, newArray, 0, biomes.length); - biomes = newArray; - } + public Biome getBiome(String id) { + return biomes.getOrDefault(id, Biome.DEFAULT); } } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockColorCalculatorFactory.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockColorCalculatorFactory.java index 88d56b4b..731149ec 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockColorCalculatorFactory.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockColorCalculatorFactory.java @@ -26,6 +26,7 @@ package de.bluecolored.bluemap.core.resourcepack; import com.flowpowered.math.GenericMath; import de.bluecolored.bluemap.core.debug.DebugDump; +import de.bluecolored.bluemap.core.logger.Logger; import de.bluecolored.bluemap.core.util.ConfigUtils; import de.bluecolored.bluemap.core.util.math.Color; import de.bluecolored.bluemap.core.world.Biome; @@ -207,8 +208,10 @@ public class BlockColorCalculatorFactory { } private void getColorFromMap(Biome biome, int[] colorMap, int defaultColor, Color target) { - double temperature = GenericMath.clamp(biome.getTemp(), 0, 1); - double humidity = GenericMath.clamp(biome.getHumidity(), 0, 1) * temperature; + double temperature = GenericMath.clamp(biome.getTemp(), 0.0, 1.0); + double humidity = GenericMath.clamp(biome.getHumidity(), 0.0, 1.0); + + humidity *= temperature; int x = (int) ((1.0 - temperature) * 255.0); int y = (int) ((1.0 - humidity) * 255.0); diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockPropertiesConfig.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockPropertiesConfig.java index 84c7162d..34bb9d6f 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockPropertiesConfig.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockPropertiesConfig.java @@ -24,6 +24,7 @@ */ package de.bluecolored.bluemap.core.resourcepack; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.logger.Logger; import de.bluecolored.bluemap.core.world.BlockProperties; import de.bluecolored.bluemap.core.world.BlockState; @@ -37,6 +38,7 @@ import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; +@DebugDump public class BlockPropertiesConfig { private final Map>> mappings; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockStateMapping.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockStateMapping.java index ce508b6a..8c0d2259 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockStateMapping.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/BlockStateMapping.java @@ -24,10 +24,12 @@ */ package de.bluecolored.bluemap.core.resourcepack; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.world.BlockState; import java.util.Map.Entry; +@DebugDump class BlockStateMapping { private BlockState blockState; private T mapping; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/ResourcePack.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/ResourcePack.java index e9e65e64..ed03623e 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/ResourcePack.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/ResourcePack.java @@ -252,7 +252,7 @@ public class ResourcePack { return props.build(); } - public Biome getBiome(int id) { + public Biome getBiome(String id) { return biomeConfig.getBiome(id); } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/Texture.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/Texture.java index 87533a3e..3df03b72 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/Texture.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/Texture.java @@ -24,8 +24,10 @@ */ package de.bluecolored.bluemap.core.resourcepack.texture; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.util.math.Color; +@DebugDump public class Texture { private final int id; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/TextureGallery.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/TextureGallery.java index 17508f79..f9f53449 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/TextureGallery.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resourcepack/texture/TextureGallery.java @@ -25,6 +25,7 @@ package de.bluecolored.bluemap.core.resourcepack.texture; import com.google.gson.*; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.logger.Logger; import de.bluecolored.bluemap.core.resourcepack.ParseResourceException; import de.bluecolored.bluemap.core.resourcepack.fileaccess.FileAccess; @@ -40,6 +41,7 @@ import java.util.*; * A {@link TextureGallery} is managing {@link Texture}s and their id's and path's.
* I can also load and generate the texture.json file, or load new {@link Texture}s from a {@link FileAccess}. */ +@DebugDump public class TextureGallery { private static final String EMPTY_BASE64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAEUlEQVR42mNkIAAYRxWMJAUAE5gAEdz4t9QAAAAASUVORK5CYII="; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java index 3f50c819..3d6579d9 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java @@ -24,6 +24,9 @@ */ package de.bluecolored.bluemap.core.util.math; +import de.bluecolored.bluemap.core.debug.DebugDump; + +@DebugDump public class Color { public float r, g, b, a; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Biome.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Biome.java index f3f37fad..f51094b4 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Biome.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Biome.java @@ -24,46 +24,63 @@ */ package de.bluecolored.bluemap.core.world; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.util.ConfigUtils; import de.bluecolored.bluemap.core.util.math.Color; import org.spongepowered.configurate.ConfigurationNode; +@DebugDump public class Biome { - public static final Biome DEFAULT = new Biome(); + public static final Biome DEFAULT = new Biome("minecraft:ocean"); - private String id = "ocean"; - private int numeralId = 0; + private final String namespace; + private final String id; + private final String fullId; private float humidity = 0.5f; private float temp = 0.5f; - private Color waterColor = new Color().set(4159204).premultiplied(); + private final Color waterColor = new Color().set(4159204).premultiplied(); - private Color overlayFoliageColor = new Color().premultiplied(); - private Color overlayGrassColor = new Color().premultiplied(); + private final Color overlayFoliageColor = new Color().premultiplied(); + private final Color overlayGrassColor = new Color().premultiplied(); - private Biome() {} + public Biome(String id) { + //resolve namespace + String namespace = "minecraft"; + int namespaceSeperator = id.indexOf(':'); + if (namespaceSeperator > 0) { + namespace = id.substring(0, namespaceSeperator); + id = id.substring(namespaceSeperator + 1); + } - public Biome(String id, int numeralId, float humidity, float temp, Color waterColor) { this.id = id; - this.numeralId = numeralId; - this.humidity = humidity; - this.temp = temp; - this.waterColor = waterColor; + this.namespace = namespace; + this.fullId = namespace + ":" + id; } - public Biome(String id, int numeralId, float humidity, float temp, Color waterColor, Color overlayFoliageColor, Color overlayGrassColor) { - this (id, numeralId, humidity, temp, waterColor); + public Biome(String id, float humidity, float temp, Color waterColor) { + this(id); + this.humidity = humidity; + this.temp = temp; + this.waterColor.set(waterColor); + } - this.overlayFoliageColor = overlayFoliageColor; - this.overlayGrassColor = overlayGrassColor; + public Biome(String id, float humidity, float temp, Color waterColor, Color overlayFoliageColor, Color overlayGrassColor) { + this (id, humidity, temp, waterColor); + this.overlayFoliageColor.set(overlayFoliageColor); + this.overlayGrassColor.set(overlayGrassColor); + } + + public String getNamespace() { + return namespace; } public String getId() { return id; } - public int getNumeralId() { - return numeralId; + public String getFullId() { + return fullId; } public float getHumidity() { @@ -87,15 +104,12 @@ public class Biome { } public static Biome create(String id, ConfigurationNode node) { - Biome biome = new Biome(); - - biome.id = id; - biome.numeralId = node.node("id").getInt(biome.numeralId); - biome.humidity = node.node("humidity").getFloat(biome.humidity); - biome.temp = node.node("temp").getFloat(biome.temp); - try { biome.waterColor = new Color().set(ConfigUtils.readColorInt(node.node("watercolor"))).premultiplied(); } catch (NumberFormatException ignored) {} - try { biome.overlayFoliageColor = new Color().set(ConfigUtils.readColorInt(node.node("foliagecolor"))).premultiplied(); } catch (NumberFormatException ignored) {} - try { biome.overlayGrassColor = new Color().set(ConfigUtils.readColorInt(node.node("grasscolor"))).premultiplied(); } catch (NumberFormatException ignored) {} + Biome biome = new Biome(id); + biome.humidity = (float) node.node("humidity").getDouble(biome.humidity); + biome.temp = (float) node.node("temp").getDouble(biome.temp); + try { biome.waterColor.set(ConfigUtils.readColorInt(node.node("watercolor"))).premultiplied(); } catch (NumberFormatException ignored) {} + try { biome.overlayFoliageColor.set(ConfigUtils.readColorInt(node.node("foliagecolor"))).premultiplied(); } catch (NumberFormatException ignored) {} + try { biome.overlayGrassColor.set(ConfigUtils.readColorInt(node.node("grasscolor"))).premultiplied(); } catch (NumberFormatException ignored) {} return biome; } @@ -104,7 +118,8 @@ public class Biome { public String toString() { return "Biome{" + "id='" + id + '\'' + - ", numeralId=" + numeralId + + ", namespace=" + namespace + + ", fullId=" + fullId + ", humidity=" + humidity + ", temp=" + temp + ", waterColor=" + waterColor + diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Block.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Block.java index adea11b7..b48467f1 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Block.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Block.java @@ -33,7 +33,7 @@ public class Block> { private BlockState blockState; private final LightData lightData = new LightData(-1, -1); - private int biomeId; + private String biomeId; public Block(World world, int x, int y, int z) { set(world, x, y, z); @@ -75,7 +75,7 @@ public class Block> { protected void reset() { this.blockState = null; this.lightData.set(-1, -1); - this.biomeId = -1; + this.biomeId = null; } public T add(int dx, int dy, int dz) { @@ -145,8 +145,8 @@ public class Block> { return lightData; } - public int getBiomeId() { - if (biomeId == -1) biomeId = getChunk().getBiome(x, y, z); + public String getBiomeId() { + if (biomeId == null) biomeId = getChunk().getBiome(x, y, z); return biomeId; } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java index b89effd6..0dcc8ba2 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java @@ -24,8 +24,10 @@ */ package de.bluecolored.bluemap.core.world; +import de.bluecolored.bluemap.core.debug.DebugDump; import de.bluecolored.bluemap.core.util.Tristate; +@DebugDump public class BlockProperties { public static final BlockProperties DEFAULT = new BlockProperties(); diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java index af359ac9..a41ec48d 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java @@ -24,6 +24,8 @@ */ package de.bluecolored.bluemap.core.world; +import de.bluecolored.bluemap.core.debug.DebugDump; + import java.util.*; import java.util.Map.Entry; import java.util.regex.Matcher; @@ -35,6 +37,7 @@ import java.util.regex.Pattern; *
* The implementation of this class has to be thread-save!
*/ +@DebugDump public class BlockState { private static final Pattern BLOCKSTATE_SERIALIZATION_PATTERN = Pattern.compile("^(.+?)(?:\\[(.*)])?$"); diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java index ff71426f..bcbabd28 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java @@ -34,7 +34,7 @@ public interface Chunk { LightData getLightData(int x, int y, int z, LightData target); - int getBiome(int x, int y, int z); + String getBiome(int x, int y, int z); int getMaxY(int x, int z); diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/blockstates/missing.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/blockstates/missing.json new file mode 100644 index 00000000..d917d257 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/blockstates/missing.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "bluemap:block/missing" } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/models/block/missing.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/models/block/missing.json new file mode 100644 index 00000000..5995c0c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/models/block/missing.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "bluemap:block/missing" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/textures/block/missing.png b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/textures/block/missing.png new file mode 100644 index 00000000..bbfd3944 Binary files /dev/null and b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/bluemap/textures/block/missing.png differ diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/biomes.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/biomes.json new file mode 100644 index 00000000..7f502091 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/biomes.json @@ -0,0 +1,316 @@ +{ + "minecraft:the_void": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:plains": { + "humidity": 0.4, + "temp": 0.8, + "watercolor": 4159204 + }, + "minecraft:sunflower_plains": { + "humidity": 0.4, + "temp": 0.8, + "watercolor": 4159204 + }, + "minecraft:snowy_plains": { + "humidity": 0.5, + "temp": 0.0, + "watercolor": 4159204 + }, + "minecraft:ice_spikes": { + "humidity": 0.5, + "temp": 0.0, + "watercolor": 4159204 + }, + "minecraft:desert": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204 + }, + "minecraft:swamp": { + "humidity": 0.9, + "temp": 0.8, + "watercolor": 6388580, + "foliagecolor": 6975545 + }, + "minecraft:forest": { + "humidity": 0.8, + "temp": 0.7, + "watercolor": 4159204 + }, + "minecraft:flower_forest": { + "humidity": 0.8, + "temp": 0.7, + "watercolor": 4159204 + }, + "minecraft:birch_forest": { + "humidity": 0.6, + "temp": 0.6, + "watercolor": 4159204 + }, + "minecraft:dark_forest": { + "humidity": 0.8, + "temp": 0.7, + "watercolor": 4159204, + "foliagecolor": "#5528340a", + "grasscolor": "#8828340a" + }, + "minecraft:old_growth_birch_forest": { + "humidity": 0.6, + "temp": 0.6, + "watercolor": 4159204 + }, + "minecraft:old_growth_pine_taiga": { + "humidity": 0.8, + "temp": 0.3, + "watercolor": 4159204 + }, + "minecraft:old_growth_spruce_taiga": { + "humidity": 0.8, + "temp": 0.25, + "watercolor": 4159204 + }, + "minecraft:taiga": { + "humidity": 0.8, + "temp": 0.25, + "watercolor": 4159204 + }, + "minecraft:snowy_taiga": { + "humidity": 0.4, + "temp": -0.5, + "watercolor": 4020182 + }, + "minecraft:savanna": { + "humidity": 0.0, + "temp": 1.2, + "watercolor": 4159204 + }, + "minecraft:savanna_plateau": { + "humidity": 0.0, + "temp": 1.0, + "watercolor": 4159204 + }, + "minecraft:windswept_hills": { + "humidity": 0.3, + "temp": 0.2, + "watercolor": 4159204 + }, + "minecraft:windswept_gravelly_hills": { + "humidity": 0.3, + "temp": 0.2, + "watercolor": 4159204 + }, + "minecraft:windswept_forest": { + "humidity": 0.3, + "temp": 0.2, + "watercolor": 4159204 + }, + "minecraft:windswept_savanna": { + "humidity": 0.0, + "temp": 1.1, + "watercolor": 4159204 + }, + "minecraft:jungle": { + "humidity": 0.9, + "temp": 0.95, + "watercolor": 4159204 + }, + "minecraft:sparse_jungle": { + "humidity": 0.8, + "temp": 0.95, + "watercolor": 4159204 + }, + "minecraft:bamboo_jungle": { + "humidity": 0.9, + "temp": 0.95, + "watercolor": 4159204 + }, + "minecraft:badlands": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204, + "foliagecolor": 10387789, + "grasscolor": 9470285 + }, + "minecraft:eroded_badlands": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204, + "foliagecolor": 10387789, + "grasscolor": 9470285 + }, + "minecraft:wooded_badlands": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204, + "foliagecolor": 10387789, + "grasscolor": 9470285 + }, + "minecraft:meadow": { + "humidity": 0.8, + "temp": 0.5, + "watercolor": 937679 + }, + "minecraft:grove": { + "humidity": 0.8, + "temp": -0.2, + "watercolor": 4159204 + }, + "minecraft:snowy_slopes": { + "humidity": 0.9, + "temp": -0.3, + "watercolor": 4159204 + }, + "minecraft:frozen_peaks": { + "humidity": 0.9, + "temp": -0.7, + "watercolor": 4159204 + }, + "minecraft:jagged_peaks": { + "humidity": 0.9, + "temp": -0.7, + "watercolor": 4159204 + }, + "minecraft:stony_peaks": { + "humidity": 0.3, + "temp": 1.0, + "watercolor": 4159204 + }, + "minecraft:river": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:frozen_river": { + "humidity": 0.5, + "temp": 0.0, + "watercolor": 3750089 + }, + "minecraft:beach": { + "humidity": 0.4, + "temp": 0.8, + "watercolor": 4159204 + }, + "minecraft:snowy_beach": { + "humidity": 0.3, + "temp": 0.05, + "watercolor": 4020182 + }, + "minecraft:stony_shore": { + "humidity": 0.3, + "temp": 0.2, + "watercolor": 4159204 + }, + "minecraft:warm_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4445678 + }, + "minecraft:lukewarm_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4566514 + }, + "minecraft:deep_lukewarm_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4566514 + }, + "minecraft:ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:deep_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:cold_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4020182 + }, + "minecraft:deep_cold_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4020182 + }, + "minecraft:frozen_ocean": { + "humidity": 0.5, + "temp": 0.0, + "watercolor": 3750089 + }, + "minecraft:deep_frozen_ocean": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 3750089 + }, + "minecraft:mushroom_fields": { + "humidity": 1.0, + "temp": 0.9, + "watercolor": 4159204 + }, + "minecraft:dripstone_caves": { + "humidity": 0.4, + "temp": 0.8, + "watercolor": 4159204 + }, + "minecraft:lush_caves": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:nether_wastes": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204 + }, + "minecraft:warped_forest": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204 + }, + "minecraft:crimson_forest": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204 + }, + "minecraft:soul_sand_valley": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204 + }, + "minecraft:basalt_deltas": { + "humidity": 0.0, + "temp": 2.0, + "watercolor": 4159204 + }, + "minecraft:the_end": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:end_highlands": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:end_midlands": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:small_end_islands": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + }, + "minecraft:end_barrens": { + "humidity": 0.5, + "temp": 0.5, + "watercolor": 4159204 + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json new file mode 100644 index 00000000..6a01c30d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json @@ -0,0 +1,17 @@ +{ + "default": "@foliage", + "minecraft:water": "@water", + "minecraft:cauldron": "@water", + "minecraft:water_cauldron": "@water", + "minecraft:powder_snow_cauldron": "#ffffff", + "minecraft:lava_cauldron": "#ffffff", + "minecraft:grass_block": "@grass", + "minecraft:grass": "@grass", + "minecraft:tall_grass": "@grass", + "minecraft:fern": "@grass", + "minecraft:large_fern": "@grass", + "minecraft:redstone_wire": "@redstone", + "minecraft:birch_leaves": 8431445, + "minecraft:spruce_leaves": 6396257, + "minecraft:stonecutter": "#ffffff" +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json new file mode 100644 index 00000000..b7395bdc --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json @@ -0,0 +1,52 @@ +{ + "minecraft:seagrass": { "alwaysWaterlogged": true }, + "minecraft:tall_seagrass": { "alwaysWaterlogged": true }, + "minecraft:kelp": { "alwaysWaterlogged": true }, + "minecraft:kelp_plant": { "alwaysWaterlogged": true }, + "minecraft:bubble_column": { "alwaysWaterlogged": true }, + + "minecraft:grass": { "randomOffset": true }, + "minecraft:tall_grass": { "randomOffset": true }, + "minecraft:fern": { "randomOffset": true }, + "minecraft:dandelion": { "randomOffset": true }, + "minecraft:cornflower": { "randomOffset": true }, + "minecraft:poppy": { "randomOffset": true }, + "minecraft:blue_orchid": { "randomOffset": true }, + "minecraft:allium": { "randomOffset": true }, + "minecraft:azure_bluet": { "randomOffset": true }, + "minecraft:red_tulip": { "randomOffset": true }, + "minecraft:orange_tulip": { "randomOffset": true }, + "minecraft:white_tulip": { "randomOffset": true }, + "minecraft:pink_tulip": { "randomOffset": true }, + "minecraft:oxeye_daisy": { "randomOffset": true }, + "minecraft:lily_of_the_valley": { "randomOffset": true }, + "minecraft:wither_rose": { "randomOffset": true }, + "minecraft:crimson_roots": { "randomOffset": true }, + "minecraft:warped_roots": { "randomOffset": true }, + "minecraft:nether_sprouts": { "randomOffset": true }, + "minecraft:rose_bush": { "randomOffset": true }, + "minecraft:peony": { "randomOffset": true }, + "minecraft:lilac": { "randomOffset": true }, + "minecraft:sunflower": { "randomOffset": true }, + "minecraft:hanging_roots": { "randomOffset": true }, + "minecraft:small_dripleaf": { "randomOffset": true }, + + "minecraft:glass": { "occluding": false }, + "minecraft:tinted_glass": { "occluding": false }, + "minecraft:white_stained_glass": { "occluding": false }, + "minecraft:orange_stained_glass": { "occluding": false }, + "minecraft:magenta_stained_glass": { "occluding": false }, + "minecraft:light_blue_stained_glass": { "occluding": false }, + "minecraft:yellow_stained_glass": { "occluding": false }, + "minecraft:lime_stained_glass": { "occluding": false }, + "minecraft:pink_stained_glass": { "occluding": false }, + "minecraft:gray_stained_glass": { "occluding": false }, + "minecraft:light_gray_stained_glass": { "occluding": false }, + "minecraft:cyan_stained_glass": { "occluding": false }, + "minecraft:purple_stained_glass": { "occluding": false }, + "minecraft:blue_stained_glass": { "occluding": false }, + "minecraft:brown_stained_glass": { "occluding": false }, + "minecraft:green_stained_glass": { "occluding": false }, + "minecraft:red_stained_glass": { "occluding": false }, + "minecraft:black_stained_glass": { "occluding": false } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/acacia_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/acacia_sign.json new file mode 100644 index 00000000..7bde7036 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/acacia_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/acacia" }, + "rotation=1": { "model": "block/sign/acacia", "y": 22.5 }, + "rotation=2": { "model": "block/sign/acacia", "y": 45 }, + "rotation=3": { "model": "block/sign/acacia", "y": 67.5 }, + "rotation=4": { "model": "block/sign/acacia", "y": 90 }, + "rotation=5": { "model": "block/sign/acacia", "y": 112.5 }, + "rotation=6": { "model": "block/sign/acacia", "y": 135 }, + "rotation=7": { "model": "block/sign/acacia", "y": 157.5 }, + "rotation=8": { "model": "block/sign/acacia", "y": 180 }, + "rotation=9": { "model": "block/sign/acacia", "y": 202.5 }, + "rotation=10": { "model": "block/sign/acacia", "y": 225 }, + "rotation=11": { "model": "block/sign/acacia", "y": 247.5 }, + "rotation=12": { "model": "block/sign/acacia", "y": 270 }, + "rotation=13": { "model": "block/sign/acacia", "y": 292.5 }, + "rotation=14": { "model": "block/sign/acacia", "y": 315 }, + "rotation=15": { "model": "block/sign/acacia", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/acacia_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/acacia_wall_sign.json new file mode 100644 index 00000000..3c93859c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/acacia_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_acacia" }, + "facing=west": { "model": "block/sign/wall_acacia", "y": 90 }, + "facing=north": { "model": "block/sign/wall_acacia", "y": 180 }, + "facing=east": { "model": "block/sign/wall_acacia", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/birch_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/birch_sign.json new file mode 100644 index 00000000..3aff1cba --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/birch_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/birch" }, + "rotation=1": { "model": "block/sign/birch", "y": 22.5 }, + "rotation=2": { "model": "block/sign/birch", "y": 45 }, + "rotation=3": { "model": "block/sign/birch", "y": 67.5 }, + "rotation=4": { "model": "block/sign/birch", "y": 90 }, + "rotation=5": { "model": "block/sign/birch", "y": 112.5 }, + "rotation=6": { "model": "block/sign/birch", "y": 135 }, + "rotation=7": { "model": "block/sign/birch", "y": 157.5 }, + "rotation=8": { "model": "block/sign/birch", "y": 180 }, + "rotation=9": { "model": "block/sign/birch", "y": 202.5 }, + "rotation=10": { "model": "block/sign/birch", "y": 225 }, + "rotation=11": { "model": "block/sign/birch", "y": 247.5 }, + "rotation=12": { "model": "block/sign/birch", "y": 270 }, + "rotation=13": { "model": "block/sign/birch", "y": 292.5 }, + "rotation=14": { "model": "block/sign/birch", "y": 315 }, + "rotation=15": { "model": "block/sign/birch", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/birch_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/birch_wall_sign.json new file mode 100644 index 00000000..488d0d85 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/birch_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_birch" }, + "facing=west": { "model": "block/sign/wall_birch", "y": 90 }, + "facing=north": { "model": "block/sign/wall_birch", "y": 180 }, + "facing=east": { "model": "block/sign/wall_birch", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/black_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/black_bed.json new file mode 100644 index 00000000..c475b18c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/black_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/black_head" }, + "part=head,facing=east": { "model": "block/bed/black_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/black_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/black_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/black_foot" }, + "part=foot,facing=east": { "model": "block/bed/black_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/black_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/black_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/blue_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/blue_bed.json new file mode 100644 index 00000000..e16bf131 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/blue_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/blue_head" }, + "part=head,facing=east": { "model": "block/bed/blue_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/blue_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/blue_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/blue_foot" }, + "part=foot,facing=east": { "model": "block/bed/blue_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/blue_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/blue_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/brown_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/brown_bed.json new file mode 100644 index 00000000..44c1ab9c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/brown_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/brown_head" }, + "part=head,facing=east": { "model": "block/bed/brown_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/brown_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/brown_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/brown_foot" }, + "part=foot,facing=east": { "model": "block/bed/brown_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/brown_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/brown_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/bubble_column.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/bubble_column.json new file mode 100644 index 00000000..f047e558 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/bubble_column.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "block/bubble_column" } + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/chest.json new file mode 100644 index 00000000..93853057 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/chest.json @@ -0,0 +1,16 @@ +{ + "variants": { + "type=single,facing=north": { "model": "block/chest/normal", "y": 90 }, + "type=single,facing=east": { "model": "block/chest/normal", "y": 180 }, + "type=single,facing=south": { "model": "block/chest/normal", "y": 270 }, + "type=single,facing=west": { "model": "block/chest/normal"}, + "type=right,facing=north": { "model": "block/chest/normal_double_right", "y": 90 }, + "type=right,facing=east": { "model": "block/chest/normal_double_right", "y": 180 }, + "type=right,facing=south": { "model": "block/chest/normal_double_right", "y": 270 }, + "type=right,facing=west": { "model": "block/chest/normal_double_right"}, + "type=left,facing=north": { "model": "block/chest/normal_double_left", "y": 90 }, + "type=left,facing=east": { "model": "block/chest/normal_double_left","y": 180 }, + "type=left,facing=south": { "model": "block/chest/normal_double_left", "y": 270 }, + "type=left,facing=west": { "model": "block/chest/normal_double_left"} + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/crimson_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/crimson_sign.json new file mode 100644 index 00000000..24b8e2e3 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/crimson_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/crimson" }, + "rotation=1": { "model": "block/sign/crimson", "y": 22.5 }, + "rotation=2": { "model": "block/sign/crimson", "y": 45 }, + "rotation=3": { "model": "block/sign/crimson", "y": 67.5 }, + "rotation=4": { "model": "block/sign/crimson", "y": 90 }, + "rotation=5": { "model": "block/sign/crimson", "y": 112.5 }, + "rotation=6": { "model": "block/sign/crimson", "y": 135 }, + "rotation=7": { "model": "block/sign/crimson", "y": 157.5 }, + "rotation=8": { "model": "block/sign/crimson", "y": 180 }, + "rotation=9": { "model": "block/sign/crimson", "y": 202.5 }, + "rotation=10": { "model": "block/sign/crimson", "y": 225 }, + "rotation=11": { "model": "block/sign/crimson", "y": 247.5 }, + "rotation=12": { "model": "block/sign/crimson", "y": 270 }, + "rotation=13": { "model": "block/sign/crimson", "y": 292.5 }, + "rotation=14": { "model": "block/sign/crimson", "y": 315 }, + "rotation=15": { "model": "block/sign/crimson", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/crimson_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/crimson_wall_sign.json new file mode 100644 index 00000000..a618d125 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/crimson_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_crimson" }, + "facing=west": { "model": "block/sign/wall_crimson", "y": 90 }, + "facing=north": { "model": "block/sign/wall_crimson", "y": 180 }, + "facing=east": { "model": "block/sign/wall_crimson", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/cyan_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/cyan_bed.json new file mode 100644 index 00000000..2b1f6b7c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/cyan_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/cyan_head" }, + "part=head,facing=east": { "model": "block/bed/cyan_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/cyan_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/cyan_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/cyan_foot" }, + "part=foot,facing=east": { "model": "block/bed/cyan_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/cyan_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/cyan_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/dark_oak_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/dark_oak_sign.json new file mode 100644 index 00000000..06e07f02 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/dark_oak_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/dark_oak" }, + "rotation=1": { "model": "block/sign/dark_oak", "y": 22.5 }, + "rotation=2": { "model": "block/sign/dark_oak", "y": 45 }, + "rotation=3": { "model": "block/sign/dark_oak", "y": 67.5 }, + "rotation=4": { "model": "block/sign/dark_oak", "y": 90 }, + "rotation=5": { "model": "block/sign/dark_oak", "y": 112.5 }, + "rotation=6": { "model": "block/sign/dark_oak", "y": 135 }, + "rotation=7": { "model": "block/sign/dark_oak", "y": 157.5 }, + "rotation=8": { "model": "block/sign/dark_oak", "y": 180 }, + "rotation=9": { "model": "block/sign/dark_oak", "y": 202.5 }, + "rotation=10": { "model": "block/sign/dark_oak", "y": 225 }, + "rotation=11": { "model": "block/sign/dark_oak", "y": 247.5 }, + "rotation=12": { "model": "block/sign/dark_oak", "y": 270 }, + "rotation=13": { "model": "block/sign/dark_oak", "y": 292.5 }, + "rotation=14": { "model": "block/sign/dark_oak", "y": 315 }, + "rotation=15": { "model": "block/sign/dark_oak", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/dark_oak_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/dark_oak_wall_sign.json new file mode 100644 index 00000000..3f0cac41 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/dark_oak_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_dark_oak" }, + "facing=west": { "model": "block/sign/wall_dark_oak", "y": 90 }, + "facing=north": { "model": "block/sign/wall_dark_oak", "y": 180 }, + "facing=east": { "model": "block/sign/wall_dark_oak", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/ender_chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/ender_chest.json new file mode 100644 index 00000000..9997264b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/ender_chest.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "block/chest/ender", "y": 90 }, + "facing=east": { "model": "block/chest/ender", "y": 180 }, + "facing=south": { "model": "block/chest/ender", "y":270 }, + "facing=west": { "model": "block/chest/ender"} + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/gray_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/gray_bed.json new file mode 100644 index 00000000..a731191d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/gray_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/gray_head" }, + "part=head,facing=east": { "model": "block/bed/gray_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/gray_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/gray_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/gray_foot" }, + "part=foot,facing=east": { "model": "block/bed/gray_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/gray_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/gray_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/green_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/green_bed.json new file mode 100644 index 00000000..2c26704b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/green_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/green_head" }, + "part=head,facing=east": { "model": "block/bed/green_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/green_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/green_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/green_foot" }, + "part=foot,facing=east": { "model": "block/bed/green_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/green_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/green_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/jungle_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/jungle_sign.json new file mode 100644 index 00000000..a2f96d3e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/jungle_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/jungle" }, + "rotation=1": { "model": "block/sign/jungle", "y": 22.5 }, + "rotation=2": { "model": "block/sign/jungle", "y": 45 }, + "rotation=3": { "model": "block/sign/jungle", "y": 67.5 }, + "rotation=4": { "model": "block/sign/jungle", "y": 90 }, + "rotation=5": { "model": "block/sign/jungle", "y": 112.5 }, + "rotation=6": { "model": "block/sign/jungle", "y": 135 }, + "rotation=7": { "model": "block/sign/jungle", "y": 157.5 }, + "rotation=8": { "model": "block/sign/jungle", "y": 180 }, + "rotation=9": { "model": "block/sign/jungle", "y": 202.5 }, + "rotation=10": { "model": "block/sign/jungle", "y": 225 }, + "rotation=11": { "model": "block/sign/jungle", "y": 247.5 }, + "rotation=12": { "model": "block/sign/jungle", "y": 270 }, + "rotation=13": { "model": "block/sign/jungle", "y": 292.5 }, + "rotation=14": { "model": "block/sign/jungle", "y": 315 }, + "rotation=15": { "model": "block/sign/jungle", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/jungle_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/jungle_wall_sign.json new file mode 100644 index 00000000..9eb47dcc --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/jungle_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_jungle" }, + "facing=west": { "model": "block/sign/wall_jungle", "y": 90 }, + "facing=north": { "model": "block/sign/wall_jungle", "y": 180 }, + "facing=east": { "model": "block/sign/wall_jungle", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/lava.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/lava.json new file mode 100644 index 00000000..d6adbba4 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/lava.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "block/lava" } + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/light_blue_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/light_blue_bed.json new file mode 100644 index 00000000..5dea0bc5 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/light_blue_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/light_blue_head" }, + "part=head,facing=east": { "model": "block/bed/light_blue_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/light_blue_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/light_blue_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/light_blue_foot" }, + "part=foot,facing=east": { "model": "block/bed/light_blue_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/light_blue_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/light_blue_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/light_gray_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/light_gray_bed.json new file mode 100644 index 00000000..f762127d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/light_gray_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/light_gray_head" }, + "part=head,facing=east": { "model": "block/bed/light_gray_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/light_gray_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/light_gray_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/light_gray_foot" }, + "part=foot,facing=east": { "model": "block/bed/light_gray_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/light_gray_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/light_gray_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/lime_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/lime_bed.json new file mode 100644 index 00000000..77dd6cc6 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/lime_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/lime_head" }, + "part=head,facing=east": { "model": "block/bed/lime_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/lime_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/lime_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/lime_foot" }, + "part=foot,facing=east": { "model": "block/bed/lime_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/lime_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/lime_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/magenta_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/magenta_bed.json new file mode 100644 index 00000000..717f1183 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/magenta_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/magenta_head" }, + "part=head,facing=east": { "model": "block/bed/magenta_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/magenta_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/magenta_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/magenta_foot" }, + "part=foot,facing=east": { "model": "block/bed/magenta_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/magenta_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/magenta_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/oak_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/oak_sign.json new file mode 100644 index 00000000..567ec778 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/oak_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/oak" }, + "rotation=1": { "model": "block/sign/oak", "y": 22.5 }, + "rotation=2": { "model": "block/sign/oak", "y": 45 }, + "rotation=3": { "model": "block/sign/oak", "y": 67.5 }, + "rotation=4": { "model": "block/sign/oak", "y": 90 }, + "rotation=5": { "model": "block/sign/oak", "y": 112.5 }, + "rotation=6": { "model": "block/sign/oak", "y": 135 }, + "rotation=7": { "model": "block/sign/oak", "y": 157.5 }, + "rotation=8": { "model": "block/sign/oak", "y": 180 }, + "rotation=9": { "model": "block/sign/oak", "y": 202.5 }, + "rotation=10": { "model": "block/sign/oak", "y": 225 }, + "rotation=11": { "model": "block/sign/oak", "y": 247.5 }, + "rotation=12": { "model": "block/sign/oak", "y": 270 }, + "rotation=13": { "model": "block/sign/oak", "y": 292.5 }, + "rotation=14": { "model": "block/sign/oak", "y": 315 }, + "rotation=15": { "model": "block/sign/oak", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/oak_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/oak_wall_sign.json new file mode 100644 index 00000000..c64ba4eb --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/oak_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_oak" }, + "facing=west": { "model": "block/sign/wall_oak", "y": 90 }, + "facing=north": { "model": "block/sign/wall_oak", "y": 180 }, + "facing=east": { "model": "block/sign/wall_oak", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/orange_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/orange_bed.json new file mode 100644 index 00000000..13bf33be --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/orange_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/orange_head" }, + "part=head,facing=east": { "model": "block/bed/orange_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/orange_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/orange_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/orange_foot" }, + "part=foot,facing=east": { "model": "block/bed/orange_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/orange_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/orange_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/pink_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/pink_bed.json new file mode 100644 index 00000000..9237c82f --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/pink_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/pink_head" }, + "part=head,facing=east": { "model": "block/bed/pink_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/pink_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/pink_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/pink_foot" }, + "part=foot,facing=east": { "model": "block/bed/pink_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/pink_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/pink_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/purple_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/purple_bed.json new file mode 100644 index 00000000..39bda4f0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/purple_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/purple_head" }, + "part=head,facing=east": { "model": "block/bed/purple_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/purple_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/purple_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/purple_foot" }, + "part=foot,facing=east": { "model": "block/bed/purple_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/purple_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/purple_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/red_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/red_bed.json new file mode 100644 index 00000000..ebb872d9 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/red_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/red_head" }, + "part=head,facing=east": { "model": "block/bed/red_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/red_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/red_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/red_foot" }, + "part=foot,facing=east": { "model": "block/bed/red_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/red_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/red_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/spruce_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/spruce_sign.json new file mode 100644 index 00000000..e592a699 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/spruce_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/spruce" }, + "rotation=1": { "model": "block/sign/spruce", "y": 22.5 }, + "rotation=2": { "model": "block/sign/spruce", "y": 45 }, + "rotation=3": { "model": "block/sign/spruce", "y": 67.5 }, + "rotation=4": { "model": "block/sign/spruce", "y": 90 }, + "rotation=5": { "model": "block/sign/spruce", "y": 112.5 }, + "rotation=6": { "model": "block/sign/spruce", "y": 135 }, + "rotation=7": { "model": "block/sign/spruce", "y": 157.5 }, + "rotation=8": { "model": "block/sign/spruce", "y": 180 }, + "rotation=9": { "model": "block/sign/spruce", "y": 202.5 }, + "rotation=10": { "model": "block/sign/spruce", "y": 225 }, + "rotation=11": { "model": "block/sign/spruce", "y": 247.5 }, + "rotation=12": { "model": "block/sign/spruce", "y": 270 }, + "rotation=13": { "model": "block/sign/spruce", "y": 292.5 }, + "rotation=14": { "model": "block/sign/spruce", "y": 315 }, + "rotation=15": { "model": "block/sign/spruce", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/spruce_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/spruce_wall_sign.json new file mode 100644 index 00000000..d405959f --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/spruce_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_spruce" }, + "facing=west": { "model": "block/sign/wall_spruce", "y": 90 }, + "facing=north": { "model": "block/sign/wall_spruce", "y": 180 }, + "facing=east": { "model": "block/sign/wall_spruce", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/trapped_chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/trapped_chest.json new file mode 100644 index 00000000..7ef695c6 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/trapped_chest.json @@ -0,0 +1,16 @@ +{ + "variants": { + "type=single,facing=north": { "model": "block/chest/trapped", "y": 90 }, + "type=single,facing=east": { "model": "block/chest/trapped", "y": 180 }, + "type=single,facing=south": { "model": "block/chest/trapped", "y":270 }, + "type=single,facing=west": { "model": "block/chest/trapped"}, + "type=right,facing=north": { "model": "block/chest/trapped_double_right", "y": 90 }, + "type=right,facing=east": { "model": "block/chest/trapped_double_right", "y": 180 }, + "type=right,facing=south": { "model": "block/chest/trapped_double_right", "y":270 }, + "type=right,facing=west": { "model": "block/chest/trapped_double_right"}, + "type=left,facing=north": { "model": "block/chest/trapped_double_left", "y": 90 }, + "type=left,facing=east": { "model": "block/chest/trapped_double_left", "y": 180 }, + "type=left,facing=south": { "model": "block/chest/trapped_double_left", "y":270 }, + "type=left,facing=west": { "model": "block/chest/trapped_double_left"} + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/warped_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/warped_sign.json new file mode 100644 index 00000000..56a3bbdf --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/warped_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/warped" }, + "rotation=1": { "model": "block/sign/warped", "y": 22.5 }, + "rotation=2": { "model": "block/sign/warped", "y": 45 }, + "rotation=3": { "model": "block/sign/warped", "y": 67.5 }, + "rotation=4": { "model": "block/sign/warped", "y": 90 }, + "rotation=5": { "model": "block/sign/warped", "y": 112.5 }, + "rotation=6": { "model": "block/sign/warped", "y": 135 }, + "rotation=7": { "model": "block/sign/warped", "y": 157.5 }, + "rotation=8": { "model": "block/sign/warped", "y": 180 }, + "rotation=9": { "model": "block/sign/warped", "y": 202.5 }, + "rotation=10": { "model": "block/sign/warped", "y": 225 }, + "rotation=11": { "model": "block/sign/warped", "y": 247.5 }, + "rotation=12": { "model": "block/sign/warped", "y": 270 }, + "rotation=13": { "model": "block/sign/warped", "y": 292.5 }, + "rotation=14": { "model": "block/sign/warped", "y": 315 }, + "rotation=15": { "model": "block/sign/warped", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/warped_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/warped_wall_sign.json new file mode 100644 index 00000000..16b35c36 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/warped_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_warped" }, + "facing=west": { "model": "block/sign/wall_warped", "y": 90 }, + "facing=north": { "model": "block/sign/wall_warped", "y": 180 }, + "facing=east": { "model": "block/sign/wall_warped", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/water.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/water.json new file mode 100644 index 00000000..48ff0ea4 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/water.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "block/water" } + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/white_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/white_bed.json new file mode 100644 index 00000000..133bd10d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/white_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/white_head" }, + "part=head,facing=east": { "model": "block/bed/white_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/white_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/white_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/white_foot" }, + "part=foot,facing=east": { "model": "block/bed/white_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/white_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/white_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/yellow_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/yellow_bed.json new file mode 100644 index 00000000..48ef5c14 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockstates/yellow_bed.json @@ -0,0 +1,12 @@ +{ + "variants": { + "part=head,facing=north": { "model": "block/bed/yellow_head" }, + "part=head,facing=east": { "model": "block/bed/yellow_head", "y": 90 }, + "part=head,facing=south": { "model": "block/bed/yellow_head", "y": 180 }, + "part=head,facing=west": { "model": "block/bed/yellow_head", "y": 270 }, + "part=foot,facing=north": { "model": "block/bed/yellow_foot" }, + "part=foot,facing=east": { "model": "block/bed/yellow_foot", "y": 90 }, + "part=foot,facing=south": { "model": "block/bed/yellow_foot", "y": 180 }, + "part=foot,facing=west": { "model": "block/bed/yellow_foot", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/bed_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/bed_foot.json new file mode 100644 index 00000000..b40ef14e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/bed_foot.json @@ -0,0 +1,39 @@ +{ + "elements": [ + { + "from": [0, 0, 13], + "to": [3, 3, 16], + "faces": { + "north": {"uv": [14.75, 0.75, 15.5, 1.5], "texture": "#bed"}, + "east": {"uv": [14, 0.75, 14.75, 1.5], "texture": "#bed"}, + "south": {"uv": [13.25, 0.75, 14, 1.5], "texture": "#bed"}, + "west": {"uv": [12.5, 0.75, 13.25, 1.5], "texture": "#bed"}, + "up": {"uv": [13.25, 0, 14, 0.75], "texture": "#bed"}, + "down": {"uv": [14, 0, 14.75, 0.75], "texture": "#bed"} + } + }, + { + "from": [13, 0, 13], + "to": [16, 3, 16], + "faces": { + "north": {"uv": [14, 3.75, 14.75, 4.5], "texture": "#bed"}, + "east": {"uv": [13.25, 3.75, 14, 4.5], "texture": "#bed"}, + "south": {"uv": [12.5, 3.75, 13.25, 4.5], "texture": "#bed"}, + "west": {"uv": [14.75, 3.75, 15.5, 4.5], "texture": "#bed"}, + "up": {"uv": [13.25, 3, 14, 3.75], "texture": "#bed"}, + "down": {"uv": [14, 3, 14.75, 3.75], "texture": "#bed"} + } + }, + { + "from": [0, 3, 0], + "to": [16, 9, 16], + "faces": { + "east": {"uv": [5.5, 7, 7, 11], "rotation": 90, "texture": "#bed"}, + "south": {"uv": [5.5, 7, 9.5, 5.5], "texture": "#bed"}, + "west": {"uv": [0, 7, 1.5, 11], "rotation": 270, "texture": "#bed"}, + "up": {"uv": [1.5, 7, 5.5, 11], "texture": "#bed"}, + "down": {"uv": [7, 7, 11, 11], "rotation": 180, "texture": "#bed"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/bed_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/bed_head.json new file mode 100644 index 00000000..f762847d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/bed_head.json @@ -0,0 +1,39 @@ +{ + "elements": [ + { + "from": [0, 0, 0], + "to": [3, 3, 3], + "faces": { + "north": {"uv": [12.5, 2.25, 13.25, 3], "texture": "#bed"}, + "east": {"uv": [14.75, 2.25, 15.5, 3], "texture": "#bed"}, + "south": {"uv": [14, 2.25, 14.75, 3], "texture": "#bed"}, + "west": {"uv": [13.25, 2.25, 14, 3], "texture": "#bed"}, + "up": {"uv": [13.25, 1.5, 14, 2.25], "texture": "#bed"}, + "down": {"uv": [14, 1.5, 14.75, 2.25], "texture": "#bed"} + } + }, + { + "from": [13, 0, 0], + "to": [16, 3, 3], + "faces": { + "north": {"uv": [13.25, 5.25, 14, 6], "texture": "#bed"}, + "east": {"uv": [12.5, 5.25, 13.25, 6], "texture": "#bed"}, + "south": {"uv": [14.75, 5.25, 15.5, 6], "texture": "#bed"}, + "west": {"uv": [14, 5.25, 14.75, 6], "texture": "#bed"}, + "up": {"uv": [13.25, 4.5, 14, 5.25], "texture": "#bed"}, + "down": {"uv": [14, 4.5, 14.75, 5.25], "texture": "#bed"} + } + }, + { + "from": [0, 3, 0], + "to": [16, 9, 16], + "faces": { + "north": {"uv": [1.5, 1.5, 5.5, 0], "texture": "#bed"}, + "east": {"uv": [5.5, 1.5, 7, 5.5], "rotation": 90, "texture": "#bed"}, + "west": {"uv": [0, 1.5, 1.5, 5.5], "rotation": 270, "texture": "#bed"}, + "up": {"uv": [1.5, 1.5, 5.5, 5.5], "texture": "#bed"}, + "down": {"uv": [7, 1.5, 11, 5.5], "rotation": 180, "texture": "#bed"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/black_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/black_foot.json new file mode 100644 index 00000000..4d7685bd --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/black_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/black" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/black_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/black_head.json new file mode 100644 index 00000000..d34fc61c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/black_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/black" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/blue_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/blue_foot.json new file mode 100644 index 00000000..04593839 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/blue_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/blue" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/blue_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/blue_head.json new file mode 100644 index 00000000..d1b6cb8a --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/blue_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/blue" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/brown_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/brown_foot.json new file mode 100644 index 00000000..cedb2e07 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/brown_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/brown" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/brown_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/brown_head.json new file mode 100644 index 00000000..b48bfdad --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/brown_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/brown" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/cyan_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/cyan_foot.json new file mode 100644 index 00000000..4000ca72 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/cyan_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/cyan" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/cyan_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/cyan_head.json new file mode 100644 index 00000000..e290aee8 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/cyan_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/cyan" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/gray_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/gray_foot.json new file mode 100644 index 00000000..57ad4f59 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/gray_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/gray" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/gray_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/gray_head.json new file mode 100644 index 00000000..500dac71 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/gray_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/gray" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/green_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/green_foot.json new file mode 100644 index 00000000..97e07cad --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/green_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/green" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/green_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/green_head.json new file mode 100644 index 00000000..53751269 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/green_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/green" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_blue_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_blue_foot.json new file mode 100644 index 00000000..80605904 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_blue_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/light_blue" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_blue_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_blue_head.json new file mode 100644 index 00000000..6acc0f3b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_blue_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/light_blue" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_gray_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_gray_foot.json new file mode 100644 index 00000000..573d7485 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_gray_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/light_gray" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_gray_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_gray_head.json new file mode 100644 index 00000000..9dafb5d9 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/light_gray_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/light_gray" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/lime_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/lime_foot.json new file mode 100644 index 00000000..0b58242a --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/lime_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/lime" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/lime_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/lime_head.json new file mode 100644 index 00000000..de8bb79f --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/lime_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/lime" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/magenta_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/magenta_foot.json new file mode 100644 index 00000000..c976ca69 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/magenta_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/magenta" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/magenta_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/magenta_head.json new file mode 100644 index 00000000..f86f337b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/magenta_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/magenta" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/orange_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/orange_foot.json new file mode 100644 index 00000000..8ab767d0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/orange_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/orange" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/orange_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/orange_head.json new file mode 100644 index 00000000..74ebcb93 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/orange_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/orange" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/pink_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/pink_foot.json new file mode 100644 index 00000000..3993c20e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/pink_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/pink" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/pink_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/pink_head.json new file mode 100644 index 00000000..af697548 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/pink_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/pink" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/purple_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/purple_foot.json new file mode 100644 index 00000000..96a0ec28 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/purple_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/purple" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/purple_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/purple_head.json new file mode 100644 index 00000000..3ddbd340 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/purple_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/purple" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/red_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/red_foot.json new file mode 100644 index 00000000..686d464e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/red_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/red" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/red_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/red_head.json new file mode 100644 index 00000000..21650b33 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/red_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/red" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/white_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/white_foot.json new file mode 100644 index 00000000..1ca1b531 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/white_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/white" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/white_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/white_head.json new file mode 100644 index 00000000..99894a58 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/white_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/white" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/yellow_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/yellow_foot.json new file mode 100644 index 00000000..ecfb0595 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/yellow_foot.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_foot", + "textures": { + "bed": "entity/bed/yellow" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/yellow_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/yellow_head.json new file mode 100644 index 00000000..6b3023ad --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bed/yellow_head.json @@ -0,0 +1,6 @@ +{ + "parent":"block/bed/bed_head", + "textures": { + "bed": "entity/bed/yellow" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bubble_column.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bubble_column.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/bubble_column.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest.json new file mode 100644 index 00000000..5a1ca023 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest.json @@ -0,0 +1,39 @@ +{ + "elements": [ + { + "from": [1, 0, 1], + "to": [15, 10, 15], + "faces": { + "north": {"uv": [0, 8.25, 3.5, 10.75], "rotation": 180, "texture": "#chest"}, + "east": {"uv": [3.5, 8.25, 7, 10.75], "rotation": 180, "texture": "#chest"}, + "south": {"uv": [7, 8.25, 10.5, 10.75], "rotation": 180, "texture": "#chest"}, + "west": {"uv": [10.5, 8.25, 14, 10.75], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [7, 8.25, 10.5, 4.75], "rotation": 90, "texture": "#chest"}, + "down": {"uv": [3.5, 4.75, 7, 8.25], "rotation": 270, "texture": "#chest"} + } + }, + { + "from": [1, 9, 1], + "to": [15, 14, 15], + "faces": { + "north": {"uv": [0, 3.5, 3.5, 4.75], "rotation": 180, "texture": "#chest"}, + "east": {"uv": [3.5, 3.5, 7, 4.75], "rotation": 180, "texture": "#chest"}, + "south": {"uv": [7, 3.5, 10.5, 4.75], "rotation": 180, "texture": "#chest"}, + "west": {"uv": [10.5, 3.5, 14, 4.75], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [10.5, 0, 7, 3.5], "rotation": 270, "texture": "#chest"}, + "down": {"uv": [3.5, 0, 7, 3.5], "rotation": 270, "texture": "#chest"} + } + }, + { + "from": [0, 7, 7], + "to": [1, 11, 9], + "faces": { + "north": {"uv": [0, 0.25, 0.25, 1.25], "rotation": 180, "texture": "#chest"}, + "south": {"uv": [0.75, 1.25, 1, 0.25], "texture": "#chest"}, + "west": {"uv": [0.25, 0.25, 0.75, 1.25], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [0.5, 0, 1, 0.25], "rotation": 90, "texture": "#chest"}, + "down": {"uv": [0.25, 0, 0.75, 0.25], "rotation": 270, "texture": "#chest"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest_double_left.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest_double_left.json new file mode 100644 index 00000000..bf96784b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest_double_left.json @@ -0,0 +1,37 @@ +{ + "elements": [ + { + "from": [1, 0, 0], + "to": [15, 10, 15], + "faces": { + "east": {"uv": [3.5, 8.25, 7.25, 10.75], "rotation": 180, "texture": "#chest"}, + "south": {"uv": [7.25, 8.25, 10.75, 10.75], "rotation": 180, "texture": "#chest"}, + "west": {"uv": [10.75, 8.25, 14.5, 10.75], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [7.25, 8.25, 11, 4.75], "rotation": 90, "texture": "#chest"}, + "down": {"uv": [3.5, 4.75, 7.25, 8.25], "rotation": 270, "texture": "#chest"} + } + }, + { + "from": [1, 9, 0], + "to": [15, 14, 15], + "faces": { + "east": {"uv": [3.5, 3.5, 7.25, 4.75], "rotation": 180, "texture": "#chest"}, + "south": {"uv": [7.25, 3.5, 10.75, 4.75], "rotation": 180, "texture": "#chest"}, + "west": {"uv": [10.75, 3.5, 14.5, 4.75], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [11, 0, 7.25, 3.5], "rotation": 270, "texture": "#chest"}, + "down": {"uv": [3.5, 0, 7.25, 3.5], "rotation": 270, "texture": "#chest"} + } + }, + { + "from": [0, 7, 0], + "to": [1, 11, 1], + "faces": { + "north": {"uv": [0, 1.25, 0.25, 0.25], "texture": "#chest"}, + "south": {"uv": [0.5, 1.25, 0.75, 0.25], "texture": "#chest"}, + "west": {"uv": [0.75, 1.25, 1, 0.25], "texture": "#chest"}, + "up": {"uv": [0.5, 0, 0.75, 0.25], "texture": "#chest"}, + "down": {"uv": [0.25, 0, 0.5, 0.25], "texture": "#chest"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest_double_right.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest_double_right.json new file mode 100644 index 00000000..62a76a41 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/chest_double_right.json @@ -0,0 +1,36 @@ +{ + "elements": [ + { + "from": [1, 0, 1], + "to": [15, 10, 16], + "faces": { + "north": {"uv": [0, 8.25, 3.5, 10.75], "rotation": 180, "texture": "#chest"}, + "east": {"uv": [3.5, 8.25, 7.25, 10.75], "rotation": 180, "texture": "#chest"}, + "west": {"uv": [10.75, 8.25, 14.5, 10.75], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [7.25, 4.75, 11, 8.25], "rotation": 90, "texture": "#chest"}, + "down": {"uv": [3.5, 4.75, 7.25, 8.25], "rotation": 270, "texture": "#chest"} + } + }, + { + "from": [1, 9, 1], + "to": [15, 14, 16], + "faces": { + "north": {"uv": [0, 3.5, 3.5, 4.75], "rotation": 180, "texture": "#chest"}, + "east": {"uv": [3.5, 3.5, 7.25, 4.75], "rotation": 180, "texture": "#chest"}, + "west": {"uv": [10.75, 3.5, 14.5, 4.75], "rotation": 180, "texture": "#chest"}, + "up": {"uv": [11, 0, 7.25, 3.5], "rotation": 270, "texture": "#chest"}, + "down": {"uv": [3.5, 0, 7.25, 3.5], "rotation": 270, "texture": "#chest"} + } + }, + { + "from": [0, 7, 15], + "to": [1, 11, 16], + "faces": { + "north": {"uv": [0, 1.25, 0.25, 0.25], "texture": "#chest"}, + "west": {"uv": [0.75, 1.25, 1, 0.25], "texture": "#chest"}, + "up": {"uv": [0.5, 0, 0.75, 0.25], "texture": "#chest"}, + "down": {"uv": [0.25, 0, 0.5, 0.25], "texture": "#chest"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/ender.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/ender.json new file mode 100644 index 00000000..e50bc420 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/ender.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest", + "textures": { + "chest": "entity/chest/ender" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal.json new file mode 100644 index 00000000..87da674d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest", + "textures": { + "chest": "entity/chest/normal" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal_double_left.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal_double_left.json new file mode 100644 index 00000000..1aaf047d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal_double_left.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest_double_left", + "textures": { + "chest": "entity/chest/normal_left" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal_double_right.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal_double_right.json new file mode 100644 index 00000000..a831aabf --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/normal_double_right.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest_double_right", + "textures": { + "chest": "entity/chest/normal_right" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped.json new file mode 100644 index 00000000..9d10f500 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest", + "textures": { + "chest": "entity/chest/trapped" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped_double_left.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped_double_left.json new file mode 100644 index 00000000..bf0fd65b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped_double_left.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest_double_left", + "textures": { + "chest": "entity/chest/trapped_left" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped_double_right.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped_double_right.json new file mode 100644 index 00000000..2ec66dcf --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/chest/trapped_double_right.json @@ -0,0 +1,6 @@ +{ + "parent":"block/chest/chest_double_right", + "textures": { + "chest": "entity/chest/trapped_right" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/lava.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/lava.json new file mode 100644 index 00000000..6ab3b5c3 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/lava.json @@ -0,0 +1,8 @@ +{ + "parent": "builtin/liquid", + "textures": { + "particle": "block/lava_still", + "still": "block/lava_still", + "flow": "block/lava_flow" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/acacia.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/acacia.json new file mode 100644 index 00000000..791c9f04 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/acacia.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/acacia" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/birch.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/birch.json new file mode 100644 index 00000000..8fda4984 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/birch.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/birch" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/crimson.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/crimson.json new file mode 100644 index 00000000..e4b76364 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/crimson.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/crimson" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/dark_oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/dark_oak.json new file mode 100644 index 00000000..25c324e1 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/dark_oak.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/dark_oak" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/jungle.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/jungle.json new file mode 100644 index 00000000..c1e44326 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/jungle.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/jungle" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/oak.json new file mode 100644 index 00000000..5fc2d920 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/oak.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/oak" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/sign.json new file mode 100644 index 00000000..14bc9644 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/sign.json @@ -0,0 +1,28 @@ +{ + "elements": [ + { + "from": [7.25, 0, 7.25], + "to": [8.75, 9.333, 8.75], + "faces": { + "north": {"uv": [1.5, 8, 2, 15], "texture": "#sign"}, + "east": {"uv": [1, 8, 1.5, 15], "texture": "#sign"}, + "south": {"uv": [0.5, 8, 1, 15], "texture": "#sign"}, + "west": {"uv": [0, 8, 0.5, 15], "texture": "#sign"}, + "up": {"uv": [0.5, 7, 1, 8], "texture": "#sign"}, + "down": {"uv": [1, 7, 1.5, 8], "texture": "#sign"} + } + }, + { + "from": [0, 9.333, 7.25], + "to": [16, 17.333, 8.75], + "faces": { + "north": {"uv": [7, 1, 13, 7], "texture": "#sign"}, + "east": {"uv": [6.5, 1, 7, 7], "texture": "#sign"}, + "south": {"uv": [0.5, 1, 6.5, 7], "texture": "#sign"}, + "west": {"uv": [0, 1, 0.5, 7], "texture": "#sign"}, + "up": {"uv": [0.5, 0, 6.5, 1], "texture": "#sign"}, + "down": {"uv": [6.5, 1, 12.5, 0], "texture": "#sign"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/spruce.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/spruce.json new file mode 100644 index 00000000..f30b6c48 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/spruce.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/spruce" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_acacia.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_acacia.json new file mode 100644 index 00000000..d2ba54c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_acacia.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/acacia" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_birch.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_birch.json new file mode 100644 index 00000000..d40e75a6 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_birch.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/birch" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_crimson.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_crimson.json new file mode 100644 index 00000000..54cbfd90 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_crimson.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/crimson" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_dark_oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_dark_oak.json new file mode 100644 index 00000000..9aa4dcf5 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_dark_oak.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/dark_oak" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_jungle.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_jungle.json new file mode 100644 index 00000000..c84ae16b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_jungle.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/jungle" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_oak.json new file mode 100644 index 00000000..d83903c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_oak.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/oak" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_sign.json new file mode 100644 index 00000000..d083952b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_sign.json @@ -0,0 +1,16 @@ +{ + "elements": [ + { + "from": [0, 4.333, 0.25], + "to": [16, 12.333, 1.75], + "faces": { + "north": {"uv": [7, 1, 13, 7], "texture": "#sign"}, + "east": {"uv": [6.5, 1, 7, 7], "texture": "#sign"}, + "south": {"uv": [0.5, 1, 6.5, 7], "texture": "#sign"}, + "west": {"uv": [0, 1, 0.5, 7], "texture": "#sign"}, + "up": {"uv": [0.5, 0, 6.5, 1], "texture": "#sign"}, + "down": {"uv": [6.5, 1, 12.5, 0], "texture": "#sign"} + } + } + ] +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_spruce.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_spruce.json new file mode 100644 index 00000000..61577291 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_spruce.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/spruce" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_warped.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_warped.json new file mode 100644 index 00000000..d72152c5 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/wall_warped.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/warped" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/warped.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/warped.json new file mode 100644 index 00000000..5754bdcb --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/sign/warped.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/warped" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/water.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/water.json new file mode 100644 index 00000000..a44af2f1 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/models/block/water.json @@ -0,0 +1,8 @@ +{ + "parent": "builtin/liquid", + "textures": { + "particle": "block/water_still", + "still": "block/water_still", + "flow": "block/water_flow" + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 13c21c3e..d86f3503 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -coreVersion=1.6.3 +coreVersion=1.7.0 diff --git a/implementations/fabric-1.18/build.gradle b/implementations/fabric-1.18/build.gradle new file mode 100644 index 00000000..45b17c86 --- /dev/null +++ b/implementations/fabric-1.18/build.gradle @@ -0,0 +1,64 @@ +import net.fabricmc.loom.task.RemapJarTask + +plugins { + id 'fabric-loom' version '0.8-SNAPSHOT' +} + +configurations { + implementation.extendsFrom shadowInclude +} + +dependencies { + minecraft "com.mojang:minecraft:1.18-pre1" + mappings "net.fabricmc:yarn:1.18-pre1+build.8:v2" + modImplementation "net.fabricmc:fabric-loader:0.11.3" + modImplementation "net.fabricmc.fabric-api:fabric-api:0.42.2+1.18" + + shadowInclude (project(':BlueMapCommon')) { + //exclude dependencies provided by fabric + exclude group: 'com.google.guava', module: 'guava' + exclude group: 'com.google.code.gson', module: 'gson' + exclude group: 'org.apache.commons', module: 'commons-lang3' + exclude group: 'commons-io', module: 'commons-io' + exclude group: 'com.mojang', module: 'brigadier' + } +} + +processResources { + inputs.property "version", project.version + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +shadowJar { + configurations = [project.configurations.shadowInclude] + + //relocate 'com.flowpowered.math', 'de.bluecolored.shadow.flowpowered.math' //DON'T relocate this, because the API depends on it + relocate 'com.typesafe.config', 'de.bluecolored.shadow.typesafe.config' + relocate 'net.querz.nbt', 'de.bluecolored.shadow.querz.nbt' + relocate 'org.spongepowered.configurate', 'de.bluecolored.shadow.configurate' + relocate 'com.github.benmanes.caffeine', 'de.bluecolored.shadow.benmanes.caffeine' + relocate 'com.google.errorprone', 'de.bluecolored.shadow.google.errorprone' + relocate 'org.aopalliance', 'de.bluecolored.shadow.aopalliance' + relocate 'javax.inject', 'de.bluecolored.shadow.javax.inject' + relocate 'com.google.inject', 'de.bluecolored.shadow.google.inject' + relocate 'org.checkerframework', 'de.bluecolored.shadow.checkerframework' + relocate 'org.codehaus', 'de.bluecolored.shadow.codehaus' + relocate 'io.leangen.geantyref', 'de.bluecolored.shadow.geantyref' +} + +task ramappedShadowJar(type: RemapJarTask) { + destinationDirectory = file '../../build/release' + dependsOn tasks.shadowJar + input.set(tasks.shadowJar.archiveFile.get()) + addNestedDependencies.set(true) + archiveFileName.set("BlueMap-${archiveVersion.get()}-fabric-1.18.jar") +} +build.dependsOn ramappedShadowJar + +task sourcesJar(type: Jar, dependsOn: classes) { + archiveClassifier.set("sources") + from sourceSets.main.allSource +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java new file mode 100644 index 00000000..5739bbd1 --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java @@ -0,0 +1,84 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric; + +import java.io.IOException; +import java.util.Optional; + +import com.flowpowered.math.vector.Vector3d; + +import de.bluecolored.bluemap.common.plugin.Plugin; +import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource; +import de.bluecolored.bluemap.common.plugin.text.Text; +import de.bluecolored.bluemap.core.world.World; +import net.minecraft.server.command.ServerCommandSource; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.Vec3d; + +public class FabricCommandSource implements CommandSource { + + private FabricMod mod; + private Plugin plugin; + private ServerCommandSource delegate; + + public FabricCommandSource(FabricMod mod, Plugin plugin, ServerCommandSource delegate) { + this.mod = mod; + this.plugin = plugin; + this.delegate = delegate; + } + + @Override + public void sendMessage(Text text) { + delegate.sendFeedback(net.minecraft.text.Text.Serializer.fromJson(text.toJSONString()), false); + } + + @Override + public boolean hasPermission(String permission) { + return delegate.hasPermissionLevel(1); + } + + @Override + public Optional getPosition() { + Vec3d pos = delegate.getPosition(); + if (pos != null) { + return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); + } + + return Optional.empty(); + } + + @Override + public Optional getWorld() { + try { + ServerWorld world = delegate.getWorld(); + if (world != null) { + return Optional.ofNullable(plugin.getWorld(mod.getUUIDForWorld(world))); + } + } catch (IOException ignore) {} + + return Optional.empty(); + } + +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java new file mode 100644 index 00000000..89a0b91a --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java @@ -0,0 +1,72 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric; + +import de.bluecolored.bluemap.common.plugin.serverinterface.ServerEventListener; +import de.bluecolored.bluemap.fabric.events.PlayerJoinCallback; +import de.bluecolored.bluemap.fabric.events.PlayerLeaveCallback; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayerEntity; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.UUID; + +public class FabricEventForwarder { + + private FabricMod mod; + private Collection eventListeners; + + public FabricEventForwarder(FabricMod mod) { + this.mod = mod; + this.eventListeners = new ArrayList<>(1); + + PlayerJoinCallback.EVENT.register(this::onPlayerJoin); + PlayerLeaveCallback.EVENT.register(this::onPlayerLeave); + } + + public synchronized void addEventListener(ServerEventListener listener) { + this.eventListeners.add(listener); + } + + public synchronized void removeAllListeners() { + this.eventListeners.clear(); + } + + public synchronized void onPlayerJoin(MinecraftServer server, ServerPlayerEntity player) { + if (this.mod.getServer() != server) return; + + UUID uuid = player.getUuid(); + for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); + } + + public synchronized void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { + if (this.mod.getServer() != server) return; + + UUID uuid = player.getUuid(); + for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); + } + +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java new file mode 100644 index 00000000..e830154c --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java @@ -0,0 +1,271 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import com.google.gson.Gson; +import de.bluecolored.bluemap.common.plugin.Plugin; +import de.bluecolored.bluemap.common.plugin.commands.Commands; +import de.bluecolored.bluemap.common.plugin.serverinterface.Player; +import de.bluecolored.bluemap.common.plugin.serverinterface.ServerEventListener; +import de.bluecolored.bluemap.common.plugin.serverinterface.ServerInterface; +import de.bluecolored.bluemap.core.BlueMap; +import de.bluecolored.bluemap.core.MinecraftVersion; +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.resourcepack.ParseResourceException; +import de.bluecolored.bluemap.fabric.events.PlayerJoinCallback; +import de.bluecolored.bluemap.fabric.events.PlayerLeaveCallback; +import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback; +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; +import net.fabricmc.loom.configuration.FabricApiExtension; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.Identifier; +import net.minecraft.util.WorldSavePath; +import net.minecraft.util.registry.BuiltinRegistries; +import net.minecraft.util.registry.Registry; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeEffects; +import net.minecraft.world.biome.BiomeKeys; +import net.minecraft.world.biome.BuiltinBiomes; +import net.minecraft.world.dimension.DimensionType; +import org.apache.logging.log4j.LogManager; +import org.spongepowered.configurate.ConfigurateException; +import org.spongepowered.configurate.ConfigurationNode; +import org.spongepowered.configurate.gson.GsonConfigurationLoader; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Paths; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutionException; + +public class FabricMod implements ModInitializer, ServerInterface { + + private Plugin pluginInstance = null; + private MinecraftServer serverInstance = null; + + private Map worldUUIDs; + private FabricEventForwarder eventForwarder; + + private LoadingCache worldUuidCache; + + private int playerUpdateIndex = 0; + private Map onlinePlayerMap; + private List onlinePlayerList; + + public FabricMod() { + Logger.global = new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME)); + + this.onlinePlayerMap = new ConcurrentHashMap<>(); + this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); + + pluginInstance = new Plugin( + MinecraftVersion.of(net.minecraft.MinecraftVersion.CURRENT.getReleaseTarget()), + "fabric-1.17", this); + + this.worldUUIDs = new ConcurrentHashMap<>(); + this.eventForwarder = new FabricEventForwarder(this); + this.worldUuidCache = Caffeine.newBuilder() + .executor(BlueMap.THREAD_POOL) + .weakKeys() + .maximumSize(1000) + .build(this::loadUUIDForWorld); + } + + @Override + public void onInitialize() { + + //register commands + CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> { + new Commands<>(pluginInstance, dispatcher, fabricSource -> new FabricCommandSource(this, pluginInstance, fabricSource)); + }); + + ServerLifecycleEvents.SERVER_STARTED.register((MinecraftServer server) -> { + this.serverInstance = server; + + new Thread(()->{ + Logger.global.logInfo("Loading BlueMap..."); + + try { + pluginInstance.load(); + if (pluginInstance.isLoaded()) Logger.global.logInfo("BlueMap loaded!"); + } catch (IOException | ParseResourceException e) { + Logger.global.logError("Failed to load bluemap!", e); + pluginInstance.unload(); + } + }).start(); + }); + + ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> { + pluginInstance.unload(); + Logger.global.logInfo("BlueMap unloaded!"); + }); + + PlayerJoinCallback.EVENT.register(this::onPlayerJoin); + PlayerLeaveCallback.EVENT.register(this::onPlayerLeave); + + ServerTickEvents.END_SERVER_TICK.register((MinecraftServer server) -> { + if (server == this.serverInstance) this.updateSomePlayers(); + }); + } + + @Override + public void registerListener(ServerEventListener listener) { + eventForwarder.addEventListener(listener); + } + + @Override + public void unregisterAllListeners() { + eventForwarder.removeAllListeners(); + } + + @Override + public UUID getUUIDForWorld(File worldFolder) throws IOException { + worldFolder = worldFolder.getCanonicalFile(); + + UUID uuid = worldUUIDs.get(worldFolder); + if (uuid == null) { + uuid = UUID.randomUUID(); + worldUUIDs.put(worldFolder, uuid); + } + + return uuid; + } + + public UUID getUUIDForWorld(ServerWorld world) throws IOException { + try { + return worldUuidCache.get(world); + } catch (RuntimeException e) { + Throwable cause = e.getCause(); + if (cause instanceof IOException) throw (IOException) cause; + else throw new IOException(cause); + } + } + + private UUID loadUUIDForWorld(ServerWorld world) throws IOException { + MinecraftServer server = world.getServer(); + File worldFolder = world.getServer().getRunDirectory().toPath().resolve(server.getSavePath(WorldSavePath.ROOT)).toFile(); + File dimensionFolder = DimensionType.getSaveDirectory(world.getRegistryKey(), worldFolder); + File dimensionDir = dimensionFolder.getCanonicalFile(); + return getUUIDForWorld(dimensionDir); + } + + @Override + public boolean persistWorldChanges(UUID worldUUID) throws IOException, IllegalArgumentException { + final CompletableFuture taskResult = new CompletableFuture<>(); + + serverInstance.execute(() -> { + try { + for (ServerWorld world : serverInstance.getWorlds()) { + if (getUUIDForWorld(world).equals(worldUUID)) { + world.save(null, true, false); + } + } + + taskResult.complete(true); + } catch (Exception e) { + taskResult.completeExceptionally(e); + } + }); + + try { + return taskResult.get(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IOException(e); + } catch (ExecutionException e) { + Throwable t = e.getCause(); + if (t instanceof IOException) throw (IOException) t; + if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; + throw new IOException(t); + } + } + + @Override + public File getConfigFolder() { + return new File("config/bluemap"); + } + + public void onPlayerJoin(MinecraftServer server, ServerPlayerEntity playerInstance) { + if (this.serverInstance != server) return; + + FabricPlayer player = new FabricPlayer(this, playerInstance.getUuid()); + onlinePlayerMap.put(player.getUuid(), player); + onlinePlayerList.add(player); + } + + public void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { + if (this.serverInstance != server) return; + + UUID playerUUID = player.getUuid(); + onlinePlayerMap.remove(playerUUID); + synchronized (onlinePlayerList) { + onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); + } + } + + public MinecraftServer getServer() { + return this.serverInstance; + } + + @Override + public Collection getOnlinePlayers() { + return onlinePlayerMap.values(); + } + + @Override + public Optional getPlayer(UUID uuid) { + return Optional.ofNullable(onlinePlayerMap.get(uuid)); + } + + /** + * Only update some of the online players each tick to minimize performance impact on the server-thread. + * Only call this method on the server-thread. + */ + private void updateSomePlayers() { + int onlinePlayerCount = onlinePlayerList.size(); + if (onlinePlayerCount == 0) return; + + int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second + if (playersToBeUpdated == 0) playersToBeUpdated = 1; + + for (int i = 0; i < playersToBeUpdated; i++) { + playerUpdateIndex++; + if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; + + if (playerUpdateIndex < onlinePlayerCount) { + onlinePlayerList.get(playerUpdateIndex).update(); + } + } + } + +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java new file mode 100644 index 00000000..dcd33c61 --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java @@ -0,0 +1,149 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric; + +import com.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluemap.common.plugin.serverinterface.Gamemode; +import de.bluecolored.bluemap.common.plugin.serverinterface.Player; +import de.bluecolored.bluemap.common.plugin.text.Text; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.GameMode; + +import java.io.IOException; +import java.util.EnumMap; +import java.util.Map; +import java.util.UUID; + +public class FabricPlayer implements Player { + + private static final UUID UNKNOWN_WORLD_UUID = UUID.randomUUID(); + + private static final Map GAMEMODE_MAP = new EnumMap<>(GameMode.class); + static { + GAMEMODE_MAP.put(GameMode.ADVENTURE, Gamemode.ADVENTURE); + GAMEMODE_MAP.put(GameMode.SURVIVAL, Gamemode.SURVIVAL); + GAMEMODE_MAP.put(GameMode.CREATIVE, Gamemode.CREATIVE); + GAMEMODE_MAP.put(GameMode.SPECTATOR, Gamemode.SPECTATOR); + } + + private UUID uuid; + private Text name; + private UUID world; + private Vector3d position; + private boolean online; + private boolean sneaking; + private boolean invisible; + private Gamemode gamemode; + + private FabricMod mod; + + public FabricPlayer(FabricMod mod, UUID playerUuid) { + this.uuid = playerUuid; + this.mod = mod; + + update(); + } + + @Override + public UUID getUuid() { + return this.uuid; + } + + @Override + public Text getName() { + return this.name; + } + + @Override + public UUID getWorld() { + return this.world; + } + + @Override + public Vector3d getPosition() { + return this.position; + } + + @Override + public boolean isOnline() { + return this.online; + } + + @Override + public boolean isSneaking() { + return this.sneaking; + } + + @Override + public boolean isInvisible() { + return this.invisible; + } + + @Override + public Gamemode getGamemode() { + return this.gamemode; + } + + /** + * Only call on server thread! + */ + public void update() { + MinecraftServer server = mod.getServer(); + if (server == null) { + this.online = false; + return; + } + + ServerPlayerEntity player = server.getPlayerManager().getPlayer(uuid); + if (player == null) { + this.online = false; + return; + } + + this.gamemode = GAMEMODE_MAP.get(player.interactionManager.getGameMode()); + if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; + + StatusEffectInstance invis = player.getStatusEffect(StatusEffects.INVISIBILITY); + this.invisible = invis != null && invis.getDuration() > 0; + + this.name = Text.of(player.getName().getString()); + this.online = true; + + Vec3d pos = player.getPos(); + this.position = new Vector3d(pos.getX(), pos.getY(), pos.getZ()); + this.sneaking = player.isSneaking(); + + try { + this.world = mod.getUUIDForWorld(player.getWorld()); + } catch (IOException e) { + this.world = UNKNOWN_WORLD_UUID; + } + } + +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java new file mode 100644 index 00000000..3b868cae --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java @@ -0,0 +1,69 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric; + +import org.apache.logging.log4j.Logger; + +import de.bluecolored.bluemap.core.logger.AbstractLogger; + +public class Log4jLogger extends AbstractLogger { + + private Logger out; + + public Log4jLogger(Logger out) { + this.out = out; + } + + @Override + public void logError(String message, Throwable throwable) { + out.error(message, throwable); + } + + @Override + public void logWarning(String message) { + out.warn(message); + } + + @Override + public void logInfo(String message) { + out.info(message); + } + + @Override + public void logDebug(String message) { + if (out.isDebugEnabled()) out.debug(message); + } + + @Override + public void noFloodDebug(String message) { + if (out.isDebugEnabled()) super.noFloodDebug(message); + } + + @Override + public void noFloodDebug(String key, String message) { + if (out.isDebugEnabled()) super.noFloodDebug(key, message); + } + +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/events/PlayerJoinCallback.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/events/PlayerJoinCallback.java new file mode 100644 index 00000000..cb96a773 --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/events/PlayerJoinCallback.java @@ -0,0 +1,42 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric.events; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayerEntity; + +public interface PlayerJoinCallback { + Event EVENT = EventFactory.createArrayBacked(PlayerJoinCallback.class, + (listeners) -> (server, player) -> { + for (PlayerJoinCallback event : listeners) { + event.onPlayerJoin(server, player); + } + } + ); + + void onPlayerJoin(MinecraftServer server, ServerPlayerEntity player); +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/events/PlayerLeaveCallback.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/events/PlayerLeaveCallback.java new file mode 100644 index 00000000..d2746e35 --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/events/PlayerLeaveCallback.java @@ -0,0 +1,42 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric.events; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.network.ServerPlayerEntity; + +public interface PlayerLeaveCallback { + Event EVENT = EventFactory.createArrayBacked(PlayerLeaveCallback.class, + (listeners) -> (server, player) -> { + for (PlayerLeaveCallback event : listeners) { + event.onPlayerLeave(server, player); + } + } + ); + + void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player); +} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/mixin/MixinPlayerManager.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/mixin/MixinPlayerManager.java new file mode 100644 index 00000000..9c0641f8 --- /dev/null +++ b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/mixin/MixinPlayerManager.java @@ -0,0 +1,56 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.fabric.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import de.bluecolored.bluemap.fabric.events.PlayerJoinCallback; +import de.bluecolored.bluemap.fabric.events.PlayerLeaveCallback; +import net.minecraft.network.ClientConnection; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.PlayerManager; +import net.minecraft.server.network.ServerPlayerEntity; + +@Mixin(PlayerManager.class) +public abstract class MixinPlayerManager { + + @Shadow + public abstract MinecraftServer getServer(); + + @Inject(at = @At("RETURN"), method = "onPlayerConnect") + public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, CallbackInfo ci) { + PlayerJoinCallback.EVENT.invoker().onPlayerJoin(this.getServer(), player); + } + + @Inject(at = @At("HEAD"), method = "remove") + public void remove(ServerPlayerEntity player, CallbackInfo ci) { + PlayerLeaveCallback.EVENT.invoker().onPlayerLeave(this.getServer(), player); + } + +} diff --git a/implementations/fabric-1.18/src/main/resources/assets/bluemap/icon.png b/implementations/fabric-1.18/src/main/resources/assets/bluemap/icon.png new file mode 100644 index 00000000..65d56d7a Binary files /dev/null and b/implementations/fabric-1.18/src/main/resources/assets/bluemap/icon.png differ diff --git a/implementations/fabric-1.18/src/main/resources/bluemap.mixins.json b/implementations/fabric-1.18/src/main/resources/bluemap.mixins.json new file mode 100644 index 00000000..2bfdbf9e --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/bluemap.mixins.json @@ -0,0 +1,14 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "de.bluecolored.bluemap.fabric.mixin", + "compatibilityLevel": "JAVA_8", + "mixins": [], + "client": [], + "server": [ + "MixinPlayerManager" + ], + "injectors": { + "defaultRequire": 1 + } +} \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/core-defaults.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/core-defaults.conf new file mode 100644 index 00000000..ace808ab --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/core-defaults.conf @@ -0,0 +1,4 @@ +accept-download: false +renderThreadCount: -2 +metrics: true +data: "bluemap" \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/core.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/core.conf new file mode 100644 index 00000000..0be0b0a2 --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/core.conf @@ -0,0 +1,30 @@ +## ## +## BlueMap ## +## Core-Config ## +## ## + +# By changing the setting (accept-download) below to TRUE you are indicating that you have accepted mojang's EULA (https://account.mojang.com/documents/minecraft_eula), +# you confirm that you own a license to Minecraft (Java Edition) +# and you agree that BlueMap will download and use a minecraft-client file (depending on the minecraft-version) from mojangs servers (https://launcher.mojang.com/) for you. +# This file contains resources that belong to mojang and you must not redistribute it or do anything else that is not compliant with mojang's EULA. +# BlueMap uses resources in this file to generate the 3D-Models used for the map and texture them. (BlueMap will not work without those resources.) +# %datetime-iso% +accept-download: false + +# This changes the amount of threads that BlueMap will use to render the maps. +# A higher value can improve render-speed but could impact performance on the host machine. +# This should be always below or equal to the number of available processor-cores. +# Zero or a negative value means the amount of of available processor-cores subtracted by the value. +# (So a value of -2 with 6 cores results in 4 render-processes) +# Default is -2 +renderThreadCount: -2 + +# If this is true, BlueMap might send really basic metrics reports containg only the implementation-type and the version that is being used to https://metrics.bluecolored.de/bluemap/ +# This allows me to track the basic usage of BlueMap and helps me stay motivated to further develop this tool! Please leave it on :) +# An example report looks like this: {"implementation":"bukkit","version":"%version%"} +# Default is true +metrics: true + +# The folder where bluemap saves data-files it needs during runtime or to save e.g. the render-progress to resume it later. +# Default is "bluemap" +data: "bluemap" \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/plugin-defaults.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/plugin-defaults.conf new file mode 100644 index 00000000..eb00e77c --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/plugin-defaults.conf @@ -0,0 +1,7 @@ +liveUpdates: true +skinDownload: true +hiddenGameModes: [] +hideInvisible: true +hideSneaking: false +playerRenderLimit: -1 +fullUpdateInterval: 1440 \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/plugin.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/plugin.conf new file mode 100644 index 00000000..c4261219 --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/plugin.conf @@ -0,0 +1,39 @@ +## ## +## BlueMap ## +## Plugin-Config ## +## ## + +# If the server should send live-updates and player-positions. +# This only works if the integrated webserver is enabled. +# Default is true +liveUpdates: true + +# Download the skin from mojang-serves when a player joins your server, so it can be used for the player-markers. +# Default is true +skinDownload: true + +# A list of gamemodes that will prevent a player from appearing on the map. +# Possible values are: survival, creative, spectator, adventure +hiddenGameModes: [ + "spectator" +] + +# If this is true, players that have an invisibility (potion-)effect will be hidden on the map. +# Default is true +hideInvisible: true + +# If this is true, players that are sneaking will be hidden on the map. +# Default is false +hideSneaking: false + +# The amount of players that is needed to pause BlueMap's render-threads. +# -> If this amount of players or more is online, bluemap will stop rendering map-updates until enough players +# have logged off again +# Setting this to 0 or -1 will disable this feature -> bluemap will not pause rendering +# Default is -1 +playerRenderLimit: -1 + +# The interval in minutes in which a full map-update will be triggered. +# This is additionally!! to the normal map-update process (in case that fails to detect any file-changes). +# Default is 1440 (24 hours) +fullUpdateInterval: 1440 diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/render-defaults.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/render-defaults.conf new file mode 100644 index 00000000..3b775ae3 --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/render-defaults.conf @@ -0,0 +1,4 @@ +webroot: "bluemap/web" +useCookies: true +enableFreeFlight: true +maps: [] diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/render.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/render.conf new file mode 100644 index 00000000..0e7d8279 --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/render.conf @@ -0,0 +1,147 @@ +## ## +## BlueMap ## +## Render-Config ## +## ## + +# The folder (webroot) where the map-data and web-application files will be saved. +# Default is "bluemap/web" +webroot: "bluemap/web" + +# If the web-application should use cookies to save the configurations of a user. +# Default is true +useCookies: true + +# If the free-flight-mode in the web-application is enabled or not. +# Default is true +enableFreeFlight: true + +# This is an array with multiple configured maps. +# You can define multiple maps, for different worlds with different render-settings here +maps: [ + + { + # The id of this map + # Should only contain word-charactes: [a-zA-Z0-9_] + # Changing this value breaks your existing renders. + id: "world" + + # The name of this map + # This defines the display name of this map, you can change this at any time. + # Default is the id of this map + name: "World" + + # The path to the save-folder of the world to render. + world: "world" + + # The position on the world where the map will be centered if you open it. + # You can change this at any time. + # This defaults to the world-spawn if you don't set it. + #startPos: [500, -820] + + # The color of thy sky as a hex-color + # You can change this at any time. + # Default is "#7dabff" + skyColor: "#7dabff" + + # Defines the ambient light-strength that every block is recieving, regardless of the sunlight/blocklight. + # 0 is no ambient light, 1 is fully lighted. + # Changing this value requires a re-render of the map. + # Default is 0 + ambientLight: 0 + + # Defines the skylight level that the sky of the world is emitting. + # This should always be equivalent to the maximum ingame sky-light for that world! + # If this is a normal overworld dimension, set this to 15 (max). + # If this is a normal nether or end dimension, set this to 0 (min). + # Changing this value requires a re-render of the map. + # Default is 15 + worldSkyLight: 15 + + # BlueMap tries to omit all blocks that are below this Y-level and are not visible from above-ground. + # More specific: Block-Faces that have a sunlight/skylight value of 0 are removed. + # This improves the performance of the map on slower devices by a lot, but might cause some blocks to disappear that should normally be visible. + # Changing this value requires a re-render of the map. + # Set to a very high value to remove caves everywhere (e.g. 10000) + # Set to a very low value to remove nothing and render all caves (e.g. -10000) + # Default is 55 (slightly below water-level) + removeCavesBelowY: 55 + + # With this value set to true, BlueMap uses the block-light value instead of the sky-light value to "detect caves". + # (See: removeCavesBelowY) + # Default is false + caveDetectionUsesBlockLight: false + + # With the below values you can limit the map-render. + # This can be used to ignore the nethers ceiling or render only a certain part of a world. + # Changing this values might require a re-render of the map, already rendered tiles outside the limits will not be deleted. + # Default is no min or max value (= infinite bounds) + #minX: -4000 + #maxX: 4000 + #minZ: -4000 + #maxZ: 4000 + #minY: 50 + #maxY: 126 + + # Using this, BlueMap pretends that every Block out of the defined render-bounds is AIR, + # this means you can see the blocks where the world is cut (instead of having a see-through/xray view). + # This has only an effect if you set some render-bounds above. + # Changing this value requires a re-render of the map. + # Default is true + renderEdges: true + + # With this set to true, the generated files for this world are compressed using gzip to save A LOT of space. + # Files will be only 5% as big with compression! + # Note: If you are using NGINX or Apache to host your map, you can configure them to serve the compressed files directly. + # This is much better than disabling the compression. + # Changing this value requires a re-render of the map. + # Default is true + useCompression: true + + # Normally BlueMap detects if a chunk has not yet generated it's light-data and omits rendering those chunks. + # If this is set to true BlueMap will render Chunks even if there is no light-data! + # This can be usefull for example if some mod prevents light-data from being saved correctly. + # However, this also has a few drawbacks: + # - For those chunks, every block will always be fully lit + # - Night-mode might not work correctly + # - Caves will always be rendered (ignoring the 'renderCaves' setting) + # Default is false + ignoreMissingLightData: false + } + + # Here another example for the End-Map + # Things we don't want to change from default we can just omit + { + id: "end" + name: "End" + world: "world/DIM1" + + # We dont want a blue sky in the end + skyColor: "#080010" + + # In the end is no sky-light, so we need to set this or we won't see anything. + removeCavesBelowY: -10000 + worldSkyLight: 0 + + # Same here, we don't want a dark map. But not completely lighted, so we see the effect of e.g torches. + ambientLight: 0.6 + } + + # Here another example for the Nether-Map + { + id: "nether" + name: "Nether" + world: "world/DIM-1" + + skyColor: "#290000" + worldSkyLight: 0 + + removeCavesBelowY: -10000 + ambientLight: 0.6 + + # We slice the whole world at y:90 so every block above 90 will be air. + # This way we don't render the nethers ceiling. + maxY: 90 + renderEdges: true + } + +] diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/webserver-defaults.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/webserver-defaults.conf new file mode 100644 index 00000000..55e8c255 --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/webserver-defaults.conf @@ -0,0 +1,4 @@ +enabled: true +webroot: "bluemap/web" +port: 8100 +maxConnectionCount: 100 \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/webserver.conf b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/webserver.conf new file mode 100644 index 00000000..6af072df --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/de/bluecolored/bluemap/webserver.conf @@ -0,0 +1,29 @@ +## ## +## BlueMap ## +## Webserver-Config ## +## ## + +# With this setting you can disable the integrated web-server. +# This is usefull if you want to only render the map-data for later use, or if you setup your own webserver. +# Default is enabled +enabled: true + +# The webroot that the server will host to the web. +# Usually this should be set to the same directory like in the render.conf! +# Default is "bluemap/web" +webroot: "bluemap/web" + +# The IP-Adress that the webserver binds to. +# Use "0.0.0.0" to bind to all available local adresses. +# If you only want to access it locally use "localhost". +# Default is "0.0.0.0" +#ip: "localhost" +#ip: "123.45.6.78" + +# The port that the webserver listenes to. +# Default is 8100 +port: 8100 + +# Max number of simultaneous connections that the webserver allows +# Default is 100 +maxConnectionCount: 100 \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/resources/fabric.mod.json b/implementations/fabric-1.18/src/main/resources/fabric.mod.json new file mode 100644 index 00000000..f8f266a5 --- /dev/null +++ b/implementations/fabric-1.18/src/main/resources/fabric.mod.json @@ -0,0 +1,36 @@ +{ + "schemaVersion": 1, + "id": "bluemap", + "version": "${version}", + + "name": "BlueMap", + "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", + "authors": [ + "Blue (TBlueF, Lukas Rieger)" + ], + "contact": { + "homepage": "https://github.com/BlueMap-Minecraft", + "sources": "https://github.com/BlueMap-Minecraft/BlueMap" + }, + + "license": "MIT", + "icon": "assets/bluemap/icon.png", + + "environment": "*", + "entrypoints": { + "main": [ + "de.bluecolored.bluemap.fabric.FabricMod" + ] + }, + "mixins": [ + "bluemap.mixins.json" + ], + + "depends": { + "fabricloader": ">=0.11.3", + "fabric": "*", + "fabric-api-base": "*", + "minecraft": ">=1.18-alpha.21.37.a" + }, + "suggests": {} +} diff --git a/implementations/forge-1.17.1/build.gradle b/implementations/forge-1.17.1/build.gradle new file mode 100644 index 00000000..5cbfe556 --- /dev/null +++ b/implementations/forge-1.17.1/build.gradle @@ -0,0 +1,71 @@ +buildscript { + repositories { + maven { url = 'https://maven.minecraftforge.net' } + mavenCentral() + } + dependencies { + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true + } +} + +apply plugin: 'net.minecraftforge.gradle' + +minecraft { + mappings channel: 'official', version: '1.17.1' +} + +configurations { + implementation.extendsFrom include +} + +dependencies { + minecraft 'net.minecraftforge:forge:1.17.1-37.0.109' + + include (project(':BlueMapCommon')) { + //exclude dependencies provided by forge + exclude group: 'com.google.guava', module: 'guava' + exclude group: 'com.google.code.gson', module: 'gson' + exclude group: 'org.apache.commons', module: 'commons-lang3' + exclude group: 'commons-io', module: 'commons-io' + exclude group: 'com.mojang', module: 'brigadier' + } +} + +build.dependsOn shadowJar { + destinationDirectory = file '../../build/release' + archiveFileName.set("BlueMap-${archiveVersion.get()}-forge-1.16.4.jar") + + configurations = [project.configurations.include] + + //relocate 'com.flowpowered.math', 'de.bluecolored.shadow.flowpowered.math' //DON'T relocate this, because the API depends on it + relocate 'com.typesafe.config', 'de.bluecolored.shadow.typesafe.config' + relocate 'net.querz.nbt', 'de.bluecolored.shadow.querz.nbt' + relocate 'org.spongepowered.configurate', 'de.bluecolored.shadow.configurate' + relocate 'com.github.benmanes.caffeine', 'de.bluecolored.shadow.benmanes.caffeine' + relocate 'com.google.errorprone', 'de.bluecolored.shadow.google.errorprone' + relocate 'org.aopalliance', 'de.bluecolored.shadow.aopalliance' + relocate 'javax.inject', 'de.bluecolored.shadow.javax.inject' + relocate 'com.google.inject', 'de.bluecolored.shadow.google.inject' + relocate 'org.checkerframework', 'de.bluecolored.shadow.checkerframework' + relocate 'org.codehaus', 'de.bluecolored.shadow.codehaus' + relocate 'io.leangen.geantyref', 'de.bluecolored.shadow.geantyref' +} + +processResources { + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info','META-INF/mods.toml' + duplicatesStrategy = DuplicatesStrategy.WARN + + expand ( + version: project.version + ) + } +} + +afterEvaluate { + reobf { + shadowJar { + mappings = createMcpToSrg.output + } + } +} diff --git a/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java new file mode 100644 index 00000000..3fb23c26 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java @@ -0,0 +1,83 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.forge; + +import java.io.IOException; +import java.util.Optional; + +import com.flowpowered.math.vector.Vector3d; + +import de.bluecolored.bluemap.common.plugin.Plugin; +import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource; +import de.bluecolored.bluemap.common.plugin.text.Text; +import de.bluecolored.bluemap.core.world.World; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.server.ServerWorld; + +public class ForgeCommandSource implements CommandSource { + + private ForgeMod mod; + private Plugin plugin; + private net.minecraft.command.CommandSource delegate; + + public ForgeCommandSource(ForgeMod mod, Plugin plugin, net.minecraft.command.CommandSource delegate) { + this.mod = mod; + this.plugin = plugin; + this.delegate = delegate; + } + + @Override + public void sendMessage(Text text) { + delegate.sendFeedback(ITextComponent.Serializer.func_240643_a_(text.toJSONString()), false); + } + + @Override + public boolean hasPermission(String permission) { + return delegate.hasPermissionLevel(1); + } + + @Override + public Optional getPosition() { + net.minecraft.util.math.vector.Vector3d pos = delegate.getPos(); + if (pos != null) { + return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); + } + + return Optional.empty(); + } + + @Override + public Optional getWorld() { + try { + ServerWorld world = delegate.getWorld(); + if (world != null) { + return Optional.ofNullable(plugin.getWorld(mod.getUUIDForWorld(world))); + } + } catch (IOException ignore) {} + + return Optional.empty(); + } + +} diff --git a/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java new file mode 100644 index 00000000..0c852d52 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java @@ -0,0 +1,67 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.forge; + +import de.bluecolored.bluemap.common.plugin.serverinterface.ServerEventListener; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; +import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.UUID; + +public class ForgeEventForwarder { + + private final Collection eventListeners; + + public ForgeEventForwarder() { + this.eventListeners = new ArrayList<>(1); + + MinecraftForge.EVENT_BUS.register(this); + } + + public synchronized void addEventListener(ServerEventListener listener) { + this.eventListeners.add(listener); + } + + public synchronized void removeAllListeners() { + this.eventListeners.clear(); + } + + @SubscribeEvent + public synchronized void onPlayerJoin(PlayerLoggedInEvent evt) { + UUID uuid = evt.getPlayer().getUniqueID(); + for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); + } + + @SubscribeEvent + public synchronized void onPlayerLeave(PlayerLoggedOutEvent evt) { + UUID uuid = evt.getPlayer().getUniqueID(); + for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); + } + +} diff --git a/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java new file mode 100644 index 00000000..4941083d --- /dev/null +++ b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java @@ -0,0 +1,287 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.forge; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import de.bluecolored.bluemap.common.plugin.Plugin; +import de.bluecolored.bluemap.common.plugin.commands.Commands; +import de.bluecolored.bluemap.common.plugin.serverinterface.Player; +import de.bluecolored.bluemap.common.plugin.serverinterface.ServerEventListener; +import de.bluecolored.bluemap.common.plugin.serverinterface.ServerInterface; +import de.bluecolored.bluemap.core.BlueMap; +import de.bluecolored.bluemap.core.MinecraftVersion; +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.resourcepack.ParseResourceException; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.DimensionType; +import net.minecraft.world.server.ServerWorld; +import net.minecraft.world.storage.FolderName; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent.ServerTickEvent; +import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; +import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.ExtensionPoint; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.server.FMLServerStartedEvent; +import net.minecraftforge.fml.event.server.FMLServerStartingEvent; +import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; +import net.minecraftforge.fml.network.FMLNetworkConstants; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.logging.log4j.LogManager; + +import java.io.File; +import java.io.IOException; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutionException; + +@Mod(Plugin.PLUGIN_ID) +public class ForgeMod implements ServerInterface { + + private Plugin pluginInstance = null; + private MinecraftServer serverInstance = null; + + private Map worldUUIDs; + private ForgeEventForwarder eventForwarder; + + private LoadingCache worldUuidCache; + + private int playerUpdateIndex = 0; + private Map onlinePlayerMap; + private List onlinePlayerList; + + public ForgeMod() { + Logger.global = new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME)); + + this.onlinePlayerMap = new ConcurrentHashMap<>(); + this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); + + this.pluginInstance = new Plugin(new MinecraftVersion(1, 16, 2), "forge-1.16.2", this); + + this.worldUUIDs = new ConcurrentHashMap<>(); + this.eventForwarder = new ForgeEventForwarder(); + this.worldUuidCache = Caffeine.newBuilder() + .executor(BlueMap.THREAD_POOL) + .weakKeys() + .maximumSize(1000) + .build(this::loadUUIDForWorld); + + MinecraftForge.EVENT_BUS.register(this); + + //Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible + ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, () -> Pair.of(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true)); + } + + @SubscribeEvent + public void onServerStarting(FMLServerStartingEvent event) { + this.serverInstance = event.getServer(); + + //register commands + new Commands<>(pluginInstance, event.getServer().getCommandManager().getDispatcher(), forgeSource -> new ForgeCommandSource(this, pluginInstance, forgeSource)); + } + + @SubscribeEvent + public void onServerStarted(FMLServerStartedEvent event) { + //save worlds to generate level.dat files + serverInstance.save(false, true, true); + + new Thread(() -> { + Logger.global.logInfo("Loading..."); + + try { + pluginInstance.load(); + if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!"); + } catch (IOException | ParseResourceException e) { + Logger.global.logError("Failed to load bluemap!", e); + pluginInstance.unload(); + } + }).start(); + } + + @SubscribeEvent + public void onServerStopping(FMLServerStoppingEvent event) { + pluginInstance.unload(); + Logger.global.logInfo("BlueMap unloaded!"); + } + + @SubscribeEvent + public void onTick(ServerTickEvent evt) { + updateSomePlayers(); + } + + @Override + public void registerListener(ServerEventListener listener) { + eventForwarder.addEventListener(listener); + } + + @Override + public void unregisterAllListeners() { + eventForwarder.removeAllListeners(); + } + + @Override + public UUID getUUIDForWorld(File worldFolder) throws IOException { + worldFolder = worldFolder.getCanonicalFile(); + + UUID uuid = worldUUIDs.get(worldFolder); + if (uuid == null) { + uuid = UUID.randomUUID(); + worldUUIDs.put(worldFolder, uuid); + } + + return uuid; + } + + public UUID getUUIDForWorld(ServerWorld world) throws IOException { + try { + return worldUuidCache.get(world); + } catch (RuntimeException e) { + throw new IOException(e); + } + } + + private UUID loadUUIDForWorld(ServerWorld world) throws IOException { + File key = getFolderForWorld(world); + + UUID uuid = worldUUIDs.get(key); + if (uuid == null) { + uuid = UUID.randomUUID(); + worldUUIDs.put(key, uuid); + } + + return uuid; + } + + private File getFolderForWorld(ServerWorld world) throws IOException { + MinecraftServer server = world.getServer(); + File worldFolder = world.getServer().getDataDirectory().toPath().resolve(server.func_240776_a_(FolderName.field_237253_i_)).toFile(); + File dimensionFolder = DimensionType.func_236031_a_(world.func_234923_W_(), worldFolder); + return dimensionFolder.getCanonicalFile(); + } + + @Override + public boolean persistWorldChanges(UUID worldUUID) throws IOException, IllegalArgumentException { + final CompletableFuture taskResult = new CompletableFuture<>(); + + serverInstance.execute(() -> { + try { + for (ServerWorld world : serverInstance.getWorlds()) { + if (getUUIDForWorld(world).equals(worldUUID)) { + world.save(null, true, false); + } + } + + taskResult.complete(true); + } catch (Exception e) { + taskResult.completeExceptionally(e); + } + }); + + try { + return taskResult.get(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new IOException(e); + } catch (ExecutionException e) { + Throwable t = e.getCause(); + if (t instanceof IOException) throw (IOException) t; + if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; + throw new IOException(t); + } + } + + @Override + public File getConfigFolder() { + return new File("config/bluemap"); + } + + @SubscribeEvent + public void onPlayerJoin(PlayerLoggedInEvent evt) { + PlayerEntity playerInstance = evt.getPlayer(); + if (!(playerInstance instanceof ServerPlayerEntity)) return; + + ForgePlayer player = new ForgePlayer(this, playerInstance.getUniqueID()); + onlinePlayerMap.put(player.getUuid(), player); + onlinePlayerList.add(player); + } + + @SubscribeEvent + public void onPlayerLeave(PlayerLoggedOutEvent evt) { + PlayerEntity player = evt.getPlayer(); + if (!(player instanceof ServerPlayerEntity)) return; + + UUID playerUUID = player.getUniqueID(); + onlinePlayerMap.remove(playerUUID); + synchronized (onlinePlayerList) { + onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); + } + } + + public MinecraftServer getServer() { + return this.serverInstance; + } + + public Plugin getPlugin() { + return this.pluginInstance; + } + + @Override + public Collection getOnlinePlayers() { + return onlinePlayerMap.values(); + } + + @Override + public Optional getPlayer(UUID uuid) { + return Optional.ofNullable(onlinePlayerMap.get(uuid)); + } + + /** + * Only update some of the online players each tick to minimize performance impact on the server-thread. + * Only call this method on the server-thread. + */ + private void updateSomePlayers() { + int onlinePlayerCount = onlinePlayerList.size(); + if (onlinePlayerCount == 0) return; + + int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second + if (playersToBeUpdated == 0) playersToBeUpdated = 1; + + for (int i = 0; i < playersToBeUpdated; i++) { + playerUpdateIndex++; + if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; + + if (playerUpdateIndex < onlinePlayerCount) { + onlinePlayerList.get(playerUpdateIndex).update(); + } + } + } + +} diff --git a/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java new file mode 100644 index 00000000..3d04126d --- /dev/null +++ b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java @@ -0,0 +1,150 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.forge; + +import java.io.IOException; +import java.util.EnumMap; +import java.util.Map; +import java.util.UUID; + +import com.flowpowered.math.vector.Vector3d; + +import de.bluecolored.bluemap.common.plugin.serverinterface.Gamemode; +import de.bluecolored.bluemap.common.plugin.serverinterface.Player; +import de.bluecolored.bluemap.common.plugin.text.Text; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.potion.EffectInstance; +import net.minecraft.potion.Effects; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.GameType; + +public class ForgePlayer implements Player { + + private static final UUID UNKNOWN_WORLD_UUID = UUID.randomUUID(); + + private static final Map GAMEMODE_MAP = new EnumMap<>(GameType.class); + static { + GAMEMODE_MAP.put(GameType.ADVENTURE, Gamemode.ADVENTURE); + GAMEMODE_MAP.put(GameType.SURVIVAL, Gamemode.SURVIVAL); + GAMEMODE_MAP.put(GameType.CREATIVE, Gamemode.CREATIVE); + GAMEMODE_MAP.put(GameType.SPECTATOR, Gamemode.SPECTATOR); + GAMEMODE_MAP.put(GameType.NOT_SET, Gamemode.SURVIVAL); + } + + private UUID uuid; + private Text name; + private UUID world; + private Vector3d position; + private boolean online; + private boolean sneaking; + private boolean invisible; + private Gamemode gamemode; + + private ForgeMod mod; + + public ForgePlayer(ForgeMod mod, UUID playerUuid) { + this.uuid = playerUuid; + this.mod = mod; + + update(); + } + + @Override + public UUID getUuid() { + return this.uuid; + } + + @Override + public Text getName() { + return this.name; + } + + @Override + public UUID getWorld() { + return this.world; + } + + @Override + public Vector3d getPosition() { + return this.position; + } + + @Override + public boolean isOnline() { + return this.online; + } + + @Override + public boolean isSneaking() { + return this.sneaking; + } + + @Override + public boolean isInvisible() { + return this.invisible; + } + + @Override + public Gamemode getGamemode() { + return this.gamemode; + } + + /** + * Only call on server thread! + */ + public void update() { + MinecraftServer server = mod.getServer(); + if (server == null) { + this.online = false; + return; + } + + ServerPlayerEntity player = server.getPlayerList().getPlayerByUUID(uuid); + if (player == null) { + this.online = false; + return; + } + + this.gamemode = GAMEMODE_MAP.get(player.interactionManager.getGameType()); + if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; + + EffectInstance invis = player.getActivePotionEffect(Effects.INVISIBILITY); + this.invisible = invis != null && invis.getDuration() > 0; + + this.name = Text.of(player.getName().getString()); + this.online = true; + + net.minecraft.util.math.vector.Vector3d pos = player.getPositionVec(); + this.position = new Vector3d(pos.getX(), pos.getY(), pos.getZ()); + this.sneaking = player.isSneaking(); + + try { + this.world = mod.getUUIDForWorld(player.getServerWorld()); + } catch (IOException e) { + this.world = UNKNOWN_WORLD_UUID; + } + } + +} diff --git a/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java new file mode 100644 index 00000000..fa6664ec --- /dev/null +++ b/implementations/forge-1.17.1/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java @@ -0,0 +1,69 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.forge; + +import org.apache.logging.log4j.Logger; + +import de.bluecolored.bluemap.core.logger.AbstractLogger; + +public class Log4jLogger extends AbstractLogger { + + private Logger out; + + public Log4jLogger(Logger out) { + this.out = out; + } + + @Override + public void logError(String message, Throwable throwable) { + out.error(message, throwable); + } + + @Override + public void logWarning(String message) { + out.warn(message); + } + + @Override + public void logInfo(String message) { + out.info(message); + } + + @Override + public void logDebug(String message) { + if (out.isDebugEnabled()) out.debug(message); + } + + @Override + public void noFloodDebug(String message) { + if (out.isDebugEnabled()) super.noFloodDebug(message); + } + + @Override + public void noFloodDebug(String key, String message) { + if (out.isDebugEnabled()) super.noFloodDebug(key, message); + } + +} diff --git a/implementations/forge-1.17.1/src/main/resources/META-INF/mods.toml b/implementations/forge-1.17.1/src/main/resources/META-INF/mods.toml new file mode 100644 index 00000000..299c79ed --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/META-INF/mods.toml @@ -0,0 +1,26 @@ +modLoader="javafml" +loaderVersion="[28,)" +license="MIT" +issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues" +[[mods]] +modId="bluemap" +version="${version}" +displayName="BlueMap" +displayURL="https://github.com/BlueMap-Minecraft/BlueMap" +authors="Blue (TBlueF, Lukas Rieger)" +description=''' +A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) +''' + +[[dependencies.bluemap]] + modId="forge" + mandatory=true + versionRange="[32,)" + ordering="NONE" + side="SERVER" +[[dependencies.bluemap]] + modId="minecraft" + mandatory=true + versionRange="[1.16.1,)" + ordering="NONE" + side="SERVER" diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/core-defaults.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/core-defaults.conf new file mode 100644 index 00000000..ace808ab --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/core-defaults.conf @@ -0,0 +1,4 @@ +accept-download: false +renderThreadCount: -2 +metrics: true +data: "bluemap" \ No newline at end of file diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/core.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/core.conf new file mode 100644 index 00000000..0be0b0a2 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/core.conf @@ -0,0 +1,30 @@ +## ## +## BlueMap ## +## Core-Config ## +## ## + +# By changing the setting (accept-download) below to TRUE you are indicating that you have accepted mojang's EULA (https://account.mojang.com/documents/minecraft_eula), +# you confirm that you own a license to Minecraft (Java Edition) +# and you agree that BlueMap will download and use a minecraft-client file (depending on the minecraft-version) from mojangs servers (https://launcher.mojang.com/) for you. +# This file contains resources that belong to mojang and you must not redistribute it or do anything else that is not compliant with mojang's EULA. +# BlueMap uses resources in this file to generate the 3D-Models used for the map and texture them. (BlueMap will not work without those resources.) +# %datetime-iso% +accept-download: false + +# This changes the amount of threads that BlueMap will use to render the maps. +# A higher value can improve render-speed but could impact performance on the host machine. +# This should be always below or equal to the number of available processor-cores. +# Zero or a negative value means the amount of of available processor-cores subtracted by the value. +# (So a value of -2 with 6 cores results in 4 render-processes) +# Default is -2 +renderThreadCount: -2 + +# If this is true, BlueMap might send really basic metrics reports containg only the implementation-type and the version that is being used to https://metrics.bluecolored.de/bluemap/ +# This allows me to track the basic usage of BlueMap and helps me stay motivated to further develop this tool! Please leave it on :) +# An example report looks like this: {"implementation":"bukkit","version":"%version%"} +# Default is true +metrics: true + +# The folder where bluemap saves data-files it needs during runtime or to save e.g. the render-progress to resume it later. +# Default is "bluemap" +data: "bluemap" \ No newline at end of file diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/plugin-defaults.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/plugin-defaults.conf new file mode 100644 index 00000000..eb00e77c --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/plugin-defaults.conf @@ -0,0 +1,7 @@ +liveUpdates: true +skinDownload: true +hiddenGameModes: [] +hideInvisible: true +hideSneaking: false +playerRenderLimit: -1 +fullUpdateInterval: 1440 \ No newline at end of file diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/plugin.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/plugin.conf new file mode 100644 index 00000000..c4261219 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/plugin.conf @@ -0,0 +1,39 @@ +## ## +## BlueMap ## +## Plugin-Config ## +## ## + +# If the server should send live-updates and player-positions. +# This only works if the integrated webserver is enabled. +# Default is true +liveUpdates: true + +# Download the skin from mojang-serves when a player joins your server, so it can be used for the player-markers. +# Default is true +skinDownload: true + +# A list of gamemodes that will prevent a player from appearing on the map. +# Possible values are: survival, creative, spectator, adventure +hiddenGameModes: [ + "spectator" +] + +# If this is true, players that have an invisibility (potion-)effect will be hidden on the map. +# Default is true +hideInvisible: true + +# If this is true, players that are sneaking will be hidden on the map. +# Default is false +hideSneaking: false + +# The amount of players that is needed to pause BlueMap's render-threads. +# -> If this amount of players or more is online, bluemap will stop rendering map-updates until enough players +# have logged off again +# Setting this to 0 or -1 will disable this feature -> bluemap will not pause rendering +# Default is -1 +playerRenderLimit: -1 + +# The interval in minutes in which a full map-update will be triggered. +# This is additionally!! to the normal map-update process (in case that fails to detect any file-changes). +# Default is 1440 (24 hours) +fullUpdateInterval: 1440 diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/render-defaults.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/render-defaults.conf new file mode 100644 index 00000000..3b775ae3 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/render-defaults.conf @@ -0,0 +1,4 @@ +webroot: "bluemap/web" +useCookies: true +enableFreeFlight: true +maps: [] diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/render.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/render.conf new file mode 100644 index 00000000..0e7d8279 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/render.conf @@ -0,0 +1,147 @@ +## ## +## BlueMap ## +## Render-Config ## +## ## + +# The folder (webroot) where the map-data and web-application files will be saved. +# Default is "bluemap/web" +webroot: "bluemap/web" + +# If the web-application should use cookies to save the configurations of a user. +# Default is true +useCookies: true + +# If the free-flight-mode in the web-application is enabled or not. +# Default is true +enableFreeFlight: true + +# This is an array with multiple configured maps. +# You can define multiple maps, for different worlds with different render-settings here +maps: [ + + { + # The id of this map + # Should only contain word-charactes: [a-zA-Z0-9_] + # Changing this value breaks your existing renders. + id: "world" + + # The name of this map + # This defines the display name of this map, you can change this at any time. + # Default is the id of this map + name: "World" + + # The path to the save-folder of the world to render. + world: "world" + + # The position on the world where the map will be centered if you open it. + # You can change this at any time. + # This defaults to the world-spawn if you don't set it. + #startPos: [500, -820] + + # The color of thy sky as a hex-color + # You can change this at any time. + # Default is "#7dabff" + skyColor: "#7dabff" + + # Defines the ambient light-strength that every block is recieving, regardless of the sunlight/blocklight. + # 0 is no ambient light, 1 is fully lighted. + # Changing this value requires a re-render of the map. + # Default is 0 + ambientLight: 0 + + # Defines the skylight level that the sky of the world is emitting. + # This should always be equivalent to the maximum ingame sky-light for that world! + # If this is a normal overworld dimension, set this to 15 (max). + # If this is a normal nether or end dimension, set this to 0 (min). + # Changing this value requires a re-render of the map. + # Default is 15 + worldSkyLight: 15 + + # BlueMap tries to omit all blocks that are below this Y-level and are not visible from above-ground. + # More specific: Block-Faces that have a sunlight/skylight value of 0 are removed. + # This improves the performance of the map on slower devices by a lot, but might cause some blocks to disappear that should normally be visible. + # Changing this value requires a re-render of the map. + # Set to a very high value to remove caves everywhere (e.g. 10000) + # Set to a very low value to remove nothing and render all caves (e.g. -10000) + # Default is 55 (slightly below water-level) + removeCavesBelowY: 55 + + # With this value set to true, BlueMap uses the block-light value instead of the sky-light value to "detect caves". + # (See: removeCavesBelowY) + # Default is false + caveDetectionUsesBlockLight: false + + # With the below values you can limit the map-render. + # This can be used to ignore the nethers ceiling or render only a certain part of a world. + # Changing this values might require a re-render of the map, already rendered tiles outside the limits will not be deleted. + # Default is no min or max value (= infinite bounds) + #minX: -4000 + #maxX: 4000 + #minZ: -4000 + #maxZ: 4000 + #minY: 50 + #maxY: 126 + + # Using this, BlueMap pretends that every Block out of the defined render-bounds is AIR, + # this means you can see the blocks where the world is cut (instead of having a see-through/xray view). + # This has only an effect if you set some render-bounds above. + # Changing this value requires a re-render of the map. + # Default is true + renderEdges: true + + # With this set to true, the generated files for this world are compressed using gzip to save A LOT of space. + # Files will be only 5% as big with compression! + # Note: If you are using NGINX or Apache to host your map, you can configure them to serve the compressed files directly. + # This is much better than disabling the compression. + # Changing this value requires a re-render of the map. + # Default is true + useCompression: true + + # Normally BlueMap detects if a chunk has not yet generated it's light-data and omits rendering those chunks. + # If this is set to true BlueMap will render Chunks even if there is no light-data! + # This can be usefull for example if some mod prevents light-data from being saved correctly. + # However, this also has a few drawbacks: + # - For those chunks, every block will always be fully lit + # - Night-mode might not work correctly + # - Caves will always be rendered (ignoring the 'renderCaves' setting) + # Default is false + ignoreMissingLightData: false + } + + # Here another example for the End-Map + # Things we don't want to change from default we can just omit + { + id: "end" + name: "End" + world: "world/DIM1" + + # We dont want a blue sky in the end + skyColor: "#080010" + + # In the end is no sky-light, so we need to set this or we won't see anything. + removeCavesBelowY: -10000 + worldSkyLight: 0 + + # Same here, we don't want a dark map. But not completely lighted, so we see the effect of e.g torches. + ambientLight: 0.6 + } + + # Here another example for the Nether-Map + { + id: "nether" + name: "Nether" + world: "world/DIM-1" + + skyColor: "#290000" + worldSkyLight: 0 + + removeCavesBelowY: -10000 + ambientLight: 0.6 + + # We slice the whole world at y:90 so every block above 90 will be air. + # This way we don't render the nethers ceiling. + maxY: 90 + renderEdges: true + } + +] diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/webserver-defaults.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/webserver-defaults.conf new file mode 100644 index 00000000..55e8c255 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/webserver-defaults.conf @@ -0,0 +1,4 @@ +enabled: true +webroot: "bluemap/web" +port: 8100 +maxConnectionCount: 100 \ No newline at end of file diff --git a/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/webserver.conf b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/webserver.conf new file mode 100644 index 00000000..6af072df --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/de/bluecolored/bluemap/webserver.conf @@ -0,0 +1,29 @@ +## ## +## BlueMap ## +## Webserver-Config ## +## ## + +# With this setting you can disable the integrated web-server. +# This is usefull if you want to only render the map-data for later use, or if you setup your own webserver. +# Default is enabled +enabled: true + +# The webroot that the server will host to the web. +# Usually this should be set to the same directory like in the render.conf! +# Default is "bluemap/web" +webroot: "bluemap/web" + +# The IP-Adress that the webserver binds to. +# Use "0.0.0.0" to bind to all available local adresses. +# If you only want to access it locally use "localhost". +# Default is "0.0.0.0" +#ip: "localhost" +#ip: "123.45.6.78" + +# The port that the webserver listenes to. +# Default is 8100 +port: 8100 + +# Max number of simultaneous connections that the webserver allows +# Default is 100 +maxConnectionCount: 100 \ No newline at end of file diff --git a/implementations/forge-1.17.1/src/main/resources/pack.mcmeta b/implementations/forge-1.17.1/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..49259163 --- /dev/null +++ b/implementations/forge-1.17.1/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "BlueMap - A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", + "pack_format": 5 + } +} diff --git a/settings.gradle b/settings.gradle index 6bfc9665..e8f33ce1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -22,14 +22,16 @@ include ':sponge-8.0.0' include ':spigot' -include ':forge-1.14.4' -include ':forge-1.15.2' +//include ':forge-1.14.4' +//include ':forge-1.15.2' include ':forge-1.16.2' +include ':forge-1.17.1' -include ':fabric-1.15.2' -include ':fabric-1.16.1' +//include ':fabric-1.15.2' +//include ':fabric-1.16.1' include ':fabric-1.16.2' include ':fabric-1.17' +include ':fabric-1.18' project(':BlueMapAPI').projectDir = "$rootDir/BlueMapAPI" as File @@ -42,11 +44,13 @@ project(':sponge-8.0.0').projectDir = "$rootDir/implementations/sponge-8.0.0" as project(':spigot').projectDir = "$rootDir/implementations/spigot" as File -project(':forge-1.14.4').projectDir = "$rootDir/implementations/forge-1.14.4" as File -project(':forge-1.15.2').projectDir = "$rootDir/implementations/forge-1.15.2" as File +//project(':forge-1.14.4').projectDir = "$rootDir/implementations/forge-1.14.4" as File +//project(':forge-1.15.2').projectDir = "$rootDir/implementations/forge-1.15.2" as File project(':forge-1.16.2').projectDir = "$rootDir/implementations/forge-1.16.2" as File +project(':forge-1.17.1').projectDir = "$rootDir/implementations/forge-1.17.1" as File -project(':fabric-1.15.2').projectDir = "$rootDir/implementations/fabric-1.15.2" as File -project(':fabric-1.16.1').projectDir = "$rootDir/implementations/fabric-1.16.1" as File +//project(':fabric-1.15.2').projectDir = "$rootDir/implementations/fabric-1.15.2" as File +//project(':fabric-1.16.1').projectDir = "$rootDir/implementations/fabric-1.16.1" as File project(':fabric-1.16.2').projectDir = "$rootDir/implementations/fabric-1.16.2" as File project(':fabric-1.17').projectDir = "$rootDir/implementations/fabric-1.17" as File +project(':fabric-1.18').projectDir = "$rootDir/implementations/fabric-1.18" as File