diff --git a/.gitignore b/.gitignore index ef45fb00..2fb7f3a9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,8 @@ node_modules/ *.launch +release.md + # exclude generated resource BlueMapCommon/src/main/resources/de/bluecolored/bluemap/webapp.zip BlueMapCore/src/main/resources/de/bluecolored/bluemap/*/resourceExtensions.zip diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java index af5b4a5c..edb53c6c 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java @@ -372,7 +372,7 @@ private ConfigTemplate createNetherMapTemplate(String name, Path worldFolder, Ke .setVariable("world", formatPath(worldFolder)) .setVariable("dimension", dimension.getFormatted()) .setVariable("sky-color", "#290000") - .setVariable("void-color", "#000000") + .setVariable("void-color", "#150000") .setVariable("ambient-light", "0.6") .setVariable("remove-caves-below-y", "-10000") .setConditional("max-y-comment", false) @@ -386,7 +386,7 @@ private ConfigTemplate createEndMapTemplate(String name, Path worldFolder, Key d .setVariable("world", formatPath(worldFolder)) .setVariable("dimension", dimension.getFormatted()) .setVariable("sky-color", "#080010") - .setVariable("void-color", "#000000") + .setVariable("void-color", "#080010") .setVariable("ambient-light", "0.6") .setVariable("remove-caves-below-y", "-10000") .setConditional("max-y-comment", true) diff --git a/BlueMapCommon/webapp/public/mysql.php b/BlueMapCommon/webapp/public/sql.php similarity index 56% rename from BlueMapCommon/webapp/public/mysql.php rename to BlueMapCommon/webapp/public/sql.php index d3a44869..ccb9ee4d 100644 --- a/BlueMapCommon/webapp/public/mysql.php +++ b/BlueMapCommon/webapp/public/sql.php @@ -2,6 +2,7 @@ // !!! SET YOUR SQL-CONNECTION SETTINGS HERE: !!! +$driver = 'mysql'; // 'mysql' (MySQL) or 'pgsql' (PostgreSQL) $hostname = '127.0.0.1'; $port = 3306; $username = 'root'; @@ -85,6 +86,14 @@ function getMimeType($path) { return $mimeDefault; } +function send($data) { + if (is_resource($data)) { + fpassthru($data); + } else { + echo $data; + } +} + // determine relative request-path $root = dirname($_SERVER['PHP_SELF']); if ($root === "/" || $root === "\\") $root = ""; @@ -111,9 +120,12 @@ if (startsWith($path, "/maps/")) { $mapId = $pathParts[0]; $mapPath = explode("?", $pathParts[1], 2)[0]; - // get sql-connection - $sql = new mysqli($hostname, $username, $password, $database, $port); - if ($sql->errno) error(500, "Failed to connect to Database!"); + // Initialize PDO + try { + $sql = new PDO("$driver:host=$hostname;dbname=$database", $username, $password); + $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + } catch (PDOException $e ) { error(500, "Failed to connect to database"); } + // provide map-tiles if (startsWith($mapPath, "tiles/")) { @@ -126,67 +138,72 @@ if (startsWith($path, "/maps/")) { $compression = $lod === 0 ? $hiresCompression : "none"; // query for tile - $statement = $sql->prepare(" - SELECT t.`data` - FROM `bluemap_map_tile` t - INNER JOIN `bluemap_map` m - ON t.`map` = m.`id` - INNER JOIN `bluemap_map_tile_compression` c - ON t.`compression` = c.`id` - WHERE m.`map_id` = ? - AND t.`lod` = ? - AND t.`x` = ? - AND t.`z` = ? - AND c.`compression` = ? - "); - $statement->bind_param("siiis", $mapId, $lod, $tileX, $tileZ, $compression); - $statement->execute(); - if ($statement->errno) error(500, "Database query failed!"); + try { + $statement = $sql->prepare(" + SELECT t.data + FROM bluemap_map_tile t + INNER JOIN bluemap_map m + ON t.map = m.id + INNER JOIN bluemap_map_tile_compression c + ON t.compression = c.id + WHERE m.map_id = :map_id + AND t.lod = :lod + AND t.x = :x + AND t.z = :z + AND c.compression = :compression + "); + $statement->bindParam( ':map_id', $mapId, PDO::PARAM_STR ); + $statement->bindParam( ':lod', $lod, PDO::PARAM_INT ); + $statement->bindParam( ':x', $tileX, PDO::PARAM_INT ); + $statement->bindParam( ':z', $tileZ, PDO::PARAM_INT ); + $statement->bindParam( ':compression', $compression, PDO::PARAM_STR); + $statement->setFetchMode(PDO::FETCH_ASSOC); + $statement->execute(); - // return result - $result = $statement->get_result(); - if ($result && $line = $result->fetch_assoc()) { - if ($compression !== "none") - header("Content-Encoding: $compression"); - - if ($lod === 0) { - header("Content-Type: application/json"); - } else { - header("Content-Type: image/png"); + // return result + if ($line = $statement->fetch()) { + if ($compression !== "none") + header("Content-Encoding: $compression"); + if ($lod === 0) { + header("Content-Type: application/json"); + } else { + header("Content-Type: image/png"); + } + send($line["data"]); + exit; } - echo $line["data"]; - exit; - } + } catch (PDOException $e) { error(500, "Failed to fetch data"); } // empty json response if nothing found header("Content-Type: application/json"); echo "{}"; exit; - } // provide meta-files - $statement = $sql->prepare(" - SELECT t.`value` - FROM `bluemap_map_meta` t - INNER JOIN `bluemap_map` m - ON t.`map` = m.`id` - WHERE m.`map_id` = ? - AND t.`key` = ? - "); - $statement->bind_param("ss", $mapId, $mapPath); - $statement->execute(); - if ($statement->errno) error(500, "Database query failed!"); + try { + $statement = $sql->prepare(" + SELECT t.value + FROM bluemap_map_meta t + INNER JOIN bluemap_map m + ON t.map = m.id + WHERE m.map_id = :map_id + AND t.key = :map_path + "); + $statement->bindParam( ':map_id', $mapId, PDO::PARAM_STR ); + $statement->bindParam( ':map_path', $mapPath, PDO::PARAM_STR ); + $statement->setFetchMode(PDO::FETCH_ASSOC); + $statement->execute(); - $result = $statement->get_result(); - if ($result && $line = $result->fetch_assoc()) { - header("Content-Type: ".getMimeType($mapPath)); - echo $line["value"]; - exit; - } + if ($line = $statement->fetch()) { + header("Content-Type: ".getMimeType($mapPath)); + send($line["value"]); + exit; + } + } catch (PDOException $e) { error(500, "Failed to fetch data"); } } // no match => 404 -error(404); +error(404); \ No newline at end of file diff --git a/BlueMapCommon/webapp/src/components/ControlBar/ControlBar.vue b/BlueMapCommon/webapp/src/components/ControlBar/ControlBar.vue index c1fda508..9170862a 100644 --- a/BlueMapCommon/webapp/src/components/ControlBar/ControlBar.vue +++ b/BlueMapCommon/webapp/src/components/ControlBar/ControlBar.vue @@ -2,13 +2,13 @@
- - 0) return true; + for (let set of markerSet.markerSets) { + if (set.id !== "bm-players" && set.id !== "bm-popup-set") { + if (this.hasMarkers(set)) return true; + } + } + return false; } } } diff --git a/BlueMapCommon/webapp/src/components/ControlBar/DayNightSwitch.vue b/BlueMapCommon/webapp/src/components/ControlBar/DayNightSwitch.vue index 246b1d6d..dcc7378c 100644 --- a/BlueMapCommon/webapp/src/components/ControlBar/DayNightSwitch.vue +++ b/BlueMapCommon/webapp/src/components/ControlBar/DayNightSwitch.vue @@ -43,6 +43,7 @@ export default { animation = animate(t => { let u = EasingFunctions.easeOutQuad(t); this.mapViewer.uniforms.sunlightStrength.value = startValue * (1-u) + targetValue * u; + this.$bluemap.mapViewer.redraw(); }, 300); } } diff --git a/BlueMapCommon/webapp/src/components/Menu/SettingsMenu.vue b/BlueMapCommon/webapp/src/components/Menu/SettingsMenu.vue index 702714ac..155f2e61 100644 --- a/BlueMapCommon/webapp/src/components/Menu/SettingsMenu.vue +++ b/BlueMapCommon/webapp/src/components/Menu/SettingsMenu.vue @@ -8,15 +8,15 @@ {{$t('lighting.sunlight')}} + @update="mapViewer.uniforms.sunlightStrength.value = $event; $bluemap.mapViewer.redraw()">{{$t('lighting.sunlight')}} {{$t('lighting.ambientLight')}} + @update="mapViewer.uniforms.ambientLight.value = $event; $bluemap.mapViewer.redraw()">{{$t('lighting.ambientLight')}} {{stage.name}} diff --git a/BlueMapCommon/webapp/src/js/BlueMapApp.js b/BlueMapCommon/webapp/src/js/BlueMapApp.js index 7c557320..18896468 100644 --- a/BlueMapCommon/webapp/src/js/BlueMapApp.js +++ b/BlueMapCommon/webapp/src/js/BlueMapApp.js @@ -708,6 +708,12 @@ export class BlueMapApp { } } + switch (values[9]) { + case "flat" : this.setFlatView(0); break; + case "free" : this.setFreeFlight(0, controls.position.y); break; + default : this.setPerspectiveView(0); break; + } + controls.position.x = parseFloat(values[1]); controls.position.y = parseFloat(values[2]); controls.position.z = parseFloat(values[3]); @@ -717,11 +723,7 @@ export class BlueMapApp { controls.tilt = parseFloat(values[7]); controls.ortho = parseFloat(values[8]); - switch (values[9]) { - case "flat" : this.setFlatView(0); break; - case "free" : this.setFreeFlight(0, controls.position.y); break; - default : this.setPerspectiveView(0); break; - } + this.updatePageAddress(); return true; } diff --git a/BlueMapCommon/webapp/src/js/MapViewer.js b/BlueMapCommon/webapp/src/js/MapViewer.js index a917637c..2fc80713 100644 --- a/BlueMapCommon/webapp/src/js/MapViewer.js +++ b/BlueMapCommon/webapp/src/js/MapViewer.js @@ -113,6 +113,9 @@ export class MapViewer { this.markers = new MarkerSet("bm-root"); this.lastFrame = 0; + this.lastRedrawChange = 0; + events.addEventListener("bluemapCameraMoved", this.redraw) + events.addEventListener("bluemapTileLoaded", this.redraw) // initialize this.initializeRootElement(); @@ -160,6 +163,8 @@ export class MapViewer { this.camera.aspect = this.rootElement.clientWidth / this.rootElement.clientHeight; this.camera.updateProjectionMatrix(); + + this.redraw(); }; /** @@ -261,6 +266,13 @@ export class MapViewer { } } + /** + * Call to wake up the render-loop and render on high-fps for a while + */ + redraw = () => { + this.lastRedrawChange = Date.now(); + } + /** * @private * The render-loop to update and possibly render a new frame. @@ -272,7 +284,6 @@ export class MapViewer { // calculate delta time if (this.lastFrame <= 0) this.lastFrame = now; let delta = now - this.lastFrame; - this.lastFrame = now; // update stats this.stats.begin(); @@ -283,7 +294,10 @@ export class MapViewer { } // render - this.render(delta); + if (delta >= 1000 || Date.now() - this.lastRedrawChange < 1000) { + this.lastFrame = now; + this.render(delta); + } // update stats this.stats.update(); diff --git a/BlueMapCommon/webapp/src/js/map/Map.js b/BlueMapCommon/webapp/src/js/map/Map.js index 98e11af3..af459981 100644 --- a/BlueMapCommon/webapp/src/js/map/Map.js +++ b/BlueMapCommon/webapp/src/js/map/Map.js @@ -63,7 +63,7 @@ export class Map { name: id, startPos: {x: 0, z: 0}, skyColor: new Color(), - voidColor: new Color(), + voidColor: new Color(0, 0, 0), ambientLight: 0, hires: { tileSize: {x: 32, z: 32}, diff --git a/BlueMapCommon/webapp/src/js/map/TileManager.js b/BlueMapCommon/webapp/src/js/map/TileManager.js index a52c55e9..feee3ae4 100644 --- a/BlueMapCommon/webapp/src/js/map/TileManager.js +++ b/BlueMapCommon/webapp/src/js/map/TileManager.js @@ -24,7 +24,7 @@ */ import { Vector2, Scene, Group } from 'three'; import { Tile } from './Tile.js'; -import {alert, hashTile} from '../util/Utils.js'; +import {alert, dispatchEvent, hashTile} from '../util/Utils.js'; import {TileMap} from "./TileMap"; export class TileManager { @@ -194,6 +194,11 @@ export class TileManager { this.tiles.set(tileHash, tile); tile.load(this.tileLoader) .then(() => { + dispatchEvent(this.events, "bluemapTileLoaded", { + tileManager: this, + tile: tile + }); + if (this.loadTimeout) clearTimeout(this.loadTimeout); this.loadTimeout = setTimeout(this.loadCloseTiles, 0); }) diff --git a/BlueMapCommon/webapp/src/js/util/Utils.js b/BlueMapCommon/webapp/src/js/util/Utils.js index cdb0497e..b588c0c7 100644 --- a/BlueMapCommon/webapp/src/js/util/Utils.js +++ b/BlueMapCommon/webapp/src/js/util/Utils.js @@ -204,7 +204,11 @@ export const animate = function (animationFrame, durationMs = 1000, postAnimatio } }; - window.requestAnimationFrame(time => animation.frame(time)); + if (durationMs !== 0) { + window.requestAnimationFrame(time => animation.frame(time)); + } else { + animation.frame(0); + } return animation; } diff --git a/BlueMapCore/build.gradle.kts b/BlueMapCore/build.gradle.kts index 4c74eaeb..4589db39 100644 --- a/BlueMapCore/build.gradle.kts +++ b/BlueMapCore/build.gradle.kts @@ -123,7 +123,7 @@ tasks.processResources { //resource Extensions val resourceIds: Array = arrayOf( - "1_13", "1_15", "1_16", "1_18" + "1_13", "1_15", "1_16", "1_18", "1_20_3" ) tasks.register("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 a99e5946..876a2cab 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/MinecraftVersion.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/MinecraftVersion.java @@ -38,7 +38,7 @@ public class MinecraftVersion implements Comparable { private static final Pattern VERSION_REGEX = Pattern.compile("(?\\d+)\\.(?\\d+)(?:\\.(?\\d+))?(?:-(?:pre|rc)\\d+)?"); - public static final MinecraftVersion LATEST_SUPPORTED = new MinecraftVersion(1, 20, 2); + public static final MinecraftVersion LATEST_SUPPORTED = new MinecraftVersion(1, 20, 3); public static final MinecraftVersion EARLIEST_SUPPORTED = new MinecraftVersion(1, 13); private final int major, minor, patch; @@ -152,7 +152,8 @@ public enum MinecraftResource { MC_1_18 (new MinecraftVersion(1, 18), "mc1_18", "https://piston-data.mojang.com/v1/objects/020aa79e63a7aab5d6f30e5ec7a6c08baee6b64c/client.jar"), MC_1_19 (new MinecraftVersion(1, 19), "mc1_18", "https://piston-data.mojang.com/v1/objects/a45634ab061beb8c878ccbe4a59c3315f9c0266f/client.jar"), MC_1_19_4 (new MinecraftVersion(1, 19, 4), "mc1_18", "https://piston-data.mojang.com/v1/objects/958928a560c9167687bea0cefeb7375da1e552a8/client.jar"), - MC_1_20 (new MinecraftVersion(1, 20), "mc1_18", "https://piston-data.mojang.com/v1/objects/e575a48efda46cf88111ba05b624ef90c520eef1/client.jar"); + MC_1_20 (new MinecraftVersion(1, 20), "mc1_18", "https://piston-data.mojang.com/v1/objects/e575a48efda46cf88111ba05b624ef90c520eef1/client.jar"), + MC_1_20_3 (new MinecraftVersion(1, 20, 3), "mc1_20_3", "https://piston-data.mojang.com/v1/objects/b178a327a96f2cf1c9f98a45e5588d654a3e4369/client.jar"); private final MinecraftVersion version; private final String resourcePrefix; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java index eeab911d..32c7d802 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java @@ -186,7 +186,7 @@ private TextureGallery loadTextureGallery() throws IOException { private void saveTextureGallery() { try (OutputStream out = storage.writeMeta(id, META_FILE_TEXTURES)) { - this.textureGallery.writeTexturesFile(this.resourcePack, out); + this.textureGallery.writeTexturesFile(out); } catch (IOException ex) { Logger.global.logError("Failed to save textures for map '" + getId() + "'!", ex); } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java index ca060ce2..61a4b81b 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java @@ -33,10 +33,12 @@ import de.bluecolored.bluemap.core.resources.adapter.ResourcesGson; import de.bluecolored.bluemap.core.resources.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.resources.resourcepack.texture.Texture; +import de.bluecolored.bluemap.core.util.Key; import org.jetbrains.annotations.Nullable; import java.io.*; import java.util.Arrays; +import java.util.Comparator; import java.util.HashMap; import java.util.Map; @@ -47,46 +49,53 @@ public class TextureGallery { .setFieldNamingPolicy(FieldNamingPolicy.IDENTITY) .create(); - private final Map, Integer> ordinalMap; + private final Map, TextureMapping> textureMappings; private int nextId; public TextureGallery() { - this.ordinalMap = new HashMap<>(); + this.textureMappings = new HashMap<>(); this.nextId = 0; } public void clear() { - this.ordinalMap.clear(); + this.textureMappings.clear(); this.nextId = 0; } public int get(@Nullable ResourcePath textureResourcePath) { if (textureResourcePath == null) textureResourcePath = ResourcePack.MISSING_TEXTURE; - Integer ordinal = ordinalMap.get(textureResourcePath); - return ordinal != null ? ordinal : 0; + TextureMapping mapping = textureMappings.get(textureResourcePath); + return mapping != null ? mapping.getId() : 0; } - public synchronized int put(ResourcePath textureResourcePath) { - Integer ordinal = ordinalMap.putIfAbsent(textureResourcePath, nextId); - if (ordinal == null) return nextId++; - return ordinal; + public synchronized void put(ResourcePath textureResourcePath) { + textureMappings.compute(textureResourcePath, (r, mapping) -> { + if (mapping == null) + return new TextureMapping(nextId++, textureResourcePath.getResource()); + + Texture texture = textureResourcePath.getResource(); + if (texture != null) mapping.setTexture(texture); + return mapping; + }); } public synchronized void put(ResourcePack resourcePack) { - resourcePack.getTextures().keySet().forEach(this::put); + this.put(ResourcePack.MISSING_TEXTURE); // put this first + resourcePack.getTextures().keySet() + .stream() + .sorted(Comparator.comparing(Key::getFormatted)) + .forEach(this::put); } - public void writeTexturesFile(ResourcePack resourcePack, OutputStream out) throws IOException { + public void writeTexturesFile(OutputStream out) throws IOException { Texture[] textures = new Texture[nextId]; Arrays.fill(textures, Texture.MISSING); - ordinalMap.forEach((textureResourcePath, ordinal) -> { - Texture texture = textureResourcePath.getResource(resourcePack::getTexture); - if (texture != null) textures[ordinal] = texture; - - // make sure the resource-path doesn't get lost - if (textures[ordinal].getResourcePath().equals(ResourcePack.MISSING_TEXTURE)) - textures[ordinal] = Texture.missing(textureResourcePath); + this.textureMappings.forEach((textureResourcePath, mapping) -> { + int ordinal = mapping.getId(); + Texture texture = mapping.getTexture(); + if (texture == null) texture = Texture.missing(textureResourcePath); + textures[ordinal] = texture; }); try (Writer writer = new OutputStreamWriter(out)) { @@ -105,7 +114,7 @@ public static TextureGallery readTexturesFile(InputStream in) throws IOException for (int ordinal = 0; ordinal < textures.length; ordinal++) { Texture texture = textures[ordinal]; if (texture != null) { - gallery.ordinalMap.put(textures[ordinal].getResourcePath(), ordinal); + gallery.textureMappings.put(texture.getResourcePath(), new TextureMapping(ordinal, texture)); } } } catch (JsonIOException ex) { @@ -114,4 +123,27 @@ public static TextureGallery readTexturesFile(InputStream in) throws IOException return gallery; } + static class TextureMapping { + private final int id; + private @Nullable Texture texture; + + public TextureMapping(int id, @Nullable Texture texture) { + this.id = id; + this.texture = texture; + } + + public int getId() { + return id; + } + + public @Nullable Texture getTexture() { + return texture; + } + + public void setTexture(@Nullable Texture texture) { + this.texture = texture; + } + + } + } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/resourcepack/texture/Texture.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/resourcepack/texture/Texture.java index 5061ff05..6acb696f 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/resourcepack/texture/Texture.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/resourcepack/texture/Texture.java @@ -26,6 +26,7 @@ import de.bluecolored.bluemap.api.debug.DebugDump; import de.bluecolored.bluemap.core.resources.ResourcePath; +import de.bluecolored.bluemap.core.util.BufferedImageUtil; import de.bluecolored.bluemap.core.util.math.Color; import javax.imageio.ImageIO; @@ -112,7 +113,7 @@ public static Texture from(ResourcePath resourcePath, BufferedImage ima boolean halfTransparent = checkHalfTransparent(image); //calculate color - Color color = calculateColor(image); + Color color = BufferedImageUtil.averageColor(image); //write to Base64 ByteArrayOutputStream os = new ByteArrayOutputStream(); @@ -136,36 +137,6 @@ private static boolean checkHalfTransparent(BufferedImage image){ return false; } - private static Color calculateColor(BufferedImage image){ - float alpha = 0f, red = 0f, green = 0f, blue = 0f; - int count = 0; - - for (int x = 0; x < image.getWidth(); x++){ - for (int y = 0; y < image.getHeight(); y++){ - int pixel = image.getRGB(x, y); - float pixelAlpha = ((pixel >> 24) & 0xff) / 255f; - float pixelRed = ((pixel >> 16) & 0xff) / 255f; - float pixelGreen = ((pixel >> 8) & 0xff) / 255f; - float pixelBlue = (pixel & 0xff) / 255f; - - count++; - alpha += pixelAlpha; - red += pixelRed * pixelAlpha; - green += pixelGreen * pixelAlpha; - blue += pixelBlue * pixelAlpha; - } - } - - if (count == 0 || alpha == 0) return new Color(); - - red /= alpha; - green /= alpha; - blue /= alpha; - alpha /= count; - - return new Color().set(red, green, blue, alpha, false); - } - public static Texture missing(ResourcePath resourcePath) { return new Texture(resourcePath); } diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java index 74c0244f..2f5f9296 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java @@ -191,6 +191,8 @@ public void deleteMeta(String mapId, String name) throws IOException { @Override public void purgeMap(String mapId, Function onProgress) throws IOException { final Path directory = getFilePath(mapId); + if (!Files.exists(directory)) return; + final int subFilesCount; final LinkedList subFiles; diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/dialect/MySQLDialect.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/dialect/MySQLDialect.java index 7f5297a3..f5823610 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/dialect/MySQLDialect.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/dialect/MySQLDialect.java @@ -162,10 +162,10 @@ public String selectMapIds() { @Language("MySQL") public String initializeStorageMeta() { return "CREATE TABLE IF NOT EXISTS `bluemap_storage_meta` (" + - "`key` varchar(255) NOT NULL, " + + "`key` varchar(190) NOT NULL, " + "`value` varchar(255) DEFAULT NULL, " + "PRIMARY KEY (`key`)" + - ")"; + ") COLLATE 'utf8mb4_bin'"; } @Override @@ -187,10 +187,10 @@ public String insertStorageMeta() { public String initializeMap() { return "CREATE TABLE `bluemap_map` (" + "`id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT," + - "`map_id` VARCHAR(255) NOT NULL," + + "`map_id` VARCHAR(190) NOT NULL," + "PRIMARY KEY (`id`)," + "UNIQUE INDEX `map_id` (`map_id`)" + - ");"; + ") COLLATE 'utf8mb4_bin';"; } @Override @@ -198,10 +198,10 @@ public String initializeMap() { public String initializeMapTileCompression() { return "CREATE TABLE `bluemap_map_tile_compression` (" + "`id` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT," + - "`compression` VARCHAR(255) NOT NULL," + + "`compression` VARCHAR(190) NOT NULL," + "PRIMARY KEY (`id`)," + "UNIQUE INDEX `compression` (`compression`)" + - ");"; + ") COLLATE 'utf8mb4_bin';"; } @Override @@ -209,11 +209,11 @@ public String initializeMapTileCompression() { public String initializeMapMeta() { return "CREATE TABLE `bluemap_map_meta` (" + "`map` SMALLINT UNSIGNED NOT NULL," + - "`key` varchar(255) NOT NULL," + + "`key` varchar(190) NOT NULL," + "`value` LONGBLOB NOT NULL," + "PRIMARY KEY (`map`, `key`)," + "CONSTRAINT `fk_bluemap_map_meta_map` FOREIGN KEY (`map`) REFERENCES `bluemap_map` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT" + - ")"; + ") COLLATE 'utf8mb4_bin'"; } @Override @@ -230,7 +230,7 @@ public String initializeMapTile() { "PRIMARY KEY (`map`, `lod`, `x`, `z`)," + "CONSTRAINT `fk_bluemap_map_tile_map` FOREIGN KEY (`map`) REFERENCES `bluemap_map` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT," + "CONSTRAINT `fk_bluemap_map_tile_compression` FOREIGN KEY (`compression`) REFERENCES `bluemap_map_tile_compression` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT" + - ");"; + ") COLLATE 'utf8mb4_bin';"; } @Override diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java new file mode 100644 index 00000000..bdfb8ea6 --- /dev/null +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java @@ -0,0 +1,63 @@ +package de.bluecolored.bluemap.core.util; + +import de.bluecolored.bluemap.core.util.math.Color; +import org.jetbrains.annotations.Nullable; + +import java.awt.image.BufferedImage; +import java.awt.image.RenderedImage; + +public class BufferedImageUtil { + + public static Color averageColor(BufferedImage image) { + Color average = new Color(); + Color color = new Color(); + float[] buffer = null; + int count = 0; + for (int x = 0; x < image.getWidth(); x++) { + for (int y = 0; y < image.getHeight(); y++) { + buffer = readPixel(image, x, y, color, buffer); + + count++; + average.add(color.premultiplied()); + } + } + average.div(count); + return average; + } + + public static Color readPixel(BufferedImage image, int x, int y, @Nullable Color target) { + readPixel(image, x, y, target, null); + return target; + } + + private static float[] readPixel(BufferedImage image, int x, int y, @Nullable Color target, float @Nullable [] buffer) { + if (target == null) target = new Color(); + + // workaround for java bug: 5051418 + if (image.getType() == BufferedImage.TYPE_BYTE_GRAY) { + buffer = readPixelDirect(image, x, y, target, buffer); + } else { + readPixelDefault(image, x, y, target); + } + + return buffer; + } + + private static void readPixelDefault(BufferedImage image, int x, int y, Color target) { + target.set(image.getRGB(x, y), image.getColorModel().isAlphaPremultiplied()); + } + + private static float[] readPixelDirect(RenderedImage image, int x, int y, Color target, float @Nullable [] buffer) { + buffer = image.getData().getPixel(x, y, buffer); + + float a = buffer.length >= 4 ? buffer[3] / 255f : 1f; + float r = buffer[0] / 255f; + float g = buffer.length >= 3 ? buffer[1] / 255f : r; + float b = buffer.length >= 3 ? buffer[2] / 255f : r; + + target.set(r, g, b, a, image.getColorModel().isAlphaPremultiplied()); + + return buffer; + } + +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json index e4a8a397..f948d075 100644 --- a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockColors.json @@ -7,6 +7,7 @@ "minecraft:lava_cauldron": "#ffffff", "minecraft:grass_block": "@grass", "minecraft:grass": "@grass", + "minecraft:short_grass": "@grass", "minecraft:tall_grass": "@grass", "minecraft:fern": "@grass", "minecraft:large_fern": "@grass", diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json index d319683a..1062822c 100644 --- a/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json +++ b/BlueMapCore/src/main/resourceExtensions/mc1_18/assets/minecraft/blockProperties.json @@ -6,6 +6,7 @@ "minecraft:bubble_column": { "alwaysWaterlogged": true }, "minecraft:grass": { "randomOffset": true }, + "minecraft:short_grass": { "randomOffset": true }, "minecraft:tall_grass": { "randomOffset": true }, "minecraft:fern": { "randomOffset": true }, "minecraft:dandelion": { "randomOffset": true }, diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/bluemap/blockstates/missing.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/bluemap/blockstates/missing.json new file mode 100644 index 00000000..d917d257 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/bluemap/models/block/missing.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/bluemap/models/block/missing.json new file mode 100644 index 00000000..5995c0c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/bluemap/textures/block/missing.png b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/bluemap/textures/block/missing.png new file mode 100644 index 00000000..bbfd3944 Binary files /dev/null and b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/bluemap/textures/block/missing.png differ diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/biomes.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/biomes.json new file mode 100644 index 00000000..f56c732d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/biomes.json @@ -0,0 +1,324 @@ +{ + "minecraft:the_void": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:plains": { + "humidity": 0.4, + "temperature": 0.8, + "watercolor": 4159204 + }, + "minecraft:sunflower_plains": { + "humidity": 0.4, + "temperature": 0.8, + "watercolor": 4159204 + }, + "minecraft:snowy_plains": { + "humidity": 0.5, + "temperature": 0.0, + "watercolor": 4159204 + }, + "minecraft:ice_spikes": { + "humidity": 0.5, + "temperature": 0.0, + "watercolor": 4159204 + }, + "minecraft:desert": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204 + }, + "minecraft:swamp": { + "humidity": 0.9, + "temperature": 0.8, + "watercolor": 6388580, + "grasscolor": "#6A7039", + "foliagecolor": 6975545 + }, + "minecraft:mangrove_swamp": { + "humidity": 0.9, + "temperature": 0.8, + "watercolor": "#3A7A6A", + "grasscolor": "#6A7039", + "foliagecolor": "#8DB127" + }, + "minecraft:forest": { + "humidity": 0.8, + "temperature": 0.7, + "watercolor": 4159204 + }, + "minecraft:flower_forest": { + "humidity": 0.8, + "temperature": 0.7, + "watercolor": 4159204 + }, + "minecraft:birch_forest": { + "humidity": 0.6, + "temperature": 0.6, + "watercolor": 4159204 + }, + "minecraft:dark_forest": { + "humidity": 0.8, + "temperature": 0.7, + "watercolor": 4159204, + "foliagecolor": "#28340a55", + "grasscolor": "#28340a88" + }, + "minecraft:old_growth_birch_forest": { + "humidity": 0.6, + "temperature": 0.6, + "watercolor": 4159204 + }, + "minecraft:old_growth_pine_taiga": { + "humidity": 0.8, + "temperature": 0.3, + "watercolor": 4159204 + }, + "minecraft:old_growth_spruce_taiga": { + "humidity": 0.8, + "temperature": 0.25, + "watercolor": 4159204 + }, + "minecraft:taiga": { + "humidity": 0.8, + "temperature": 0.25, + "watercolor": 4159204 + }, + "minecraft:snowy_taiga": { + "humidity": 0.4, + "temperature": -0.5, + "watercolor": 4020182 + }, + "minecraft:savanna": { + "humidity": 0.0, + "temperature": 1.2, + "watercolor": 4159204 + }, + "minecraft:savanna_plateau": { + "humidity": 0.0, + "temperature": 1.0, + "watercolor": 4159204 + }, + "minecraft:windswept_hills": { + "humidity": 0.3, + "temperature": 0.2, + "watercolor": 4159204 + }, + "minecraft:windswept_gravelly_hills": { + "humidity": 0.3, + "temperature": 0.2, + "watercolor": 4159204 + }, + "minecraft:windswept_forest": { + "humidity": 0.3, + "temperature": 0.2, + "watercolor": 4159204 + }, + "minecraft:windswept_savanna": { + "humidity": 0.0, + "temperature": 1.1, + "watercolor": 4159204 + }, + "minecraft:jungle": { + "humidity": 0.9, + "temperature": 0.95, + "watercolor": 4159204 + }, + "minecraft:sparse_jungle": { + "humidity": 0.8, + "temperature": 0.95, + "watercolor": 4159204 + }, + "minecraft:bamboo_jungle": { + "humidity": 0.9, + "temperature": 0.95, + "watercolor": 4159204 + }, + "minecraft:badlands": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204, + "foliagecolor": 10387789, + "grasscolor": 9470285 + }, + "minecraft:eroded_badlands": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204, + "foliagecolor": 10387789, + "grasscolor": 9470285 + }, + "minecraft:wooded_badlands": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204, + "foliagecolor": 10387789, + "grasscolor": 9470285 + }, + "minecraft:meadow": { + "humidity": 0.8, + "temperature": 0.5, + "watercolor": 937679 + }, + "minecraft:grove": { + "humidity": 0.8, + "temperature": -0.2, + "watercolor": 4159204 + }, + "minecraft:snowy_slopes": { + "humidity": 0.9, + "temperature": -0.3, + "watercolor": 4159204 + }, + "minecraft:frozen_peaks": { + "humidity": 0.9, + "temperature": -0.7, + "watercolor": 4159204 + }, + "minecraft:jagged_peaks": { + "humidity": 0.9, + "temperature": -0.7, + "watercolor": 4159204 + }, + "minecraft:stony_peaks": { + "humidity": 0.3, + "temperature": 1.0, + "watercolor": 4159204 + }, + "minecraft:river": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:frozen_river": { + "humidity": 0.5, + "temperature": 0.0, + "watercolor": 3750089 + }, + "minecraft:beach": { + "humidity": 0.4, + "temperature": 0.8, + "watercolor": 4159204 + }, + "minecraft:snowy_beach": { + "humidity": 0.3, + "temperature": 0.05, + "watercolor": 4020182 + }, + "minecraft:stony_shore": { + "humidity": 0.3, + "temperature": 0.2, + "watercolor": 4159204 + }, + "minecraft:warm_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4445678 + }, + "minecraft:lukewarm_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4566514 + }, + "minecraft:deep_lukewarm_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4566514 + }, + "minecraft:ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:deep_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:cold_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4020182 + }, + "minecraft:deep_cold_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4020182 + }, + "minecraft:frozen_ocean": { + "humidity": 0.5, + "temperature": 0.0, + "watercolor": 3750089 + }, + "minecraft:deep_frozen_ocean": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 3750089 + }, + "minecraft:mushroom_fields": { + "humidity": 1.0, + "temperature": 0.9, + "watercolor": 4159204 + }, + "minecraft:dripstone_caves": { + "humidity": 0.4, + "temperature": 0.8, + "watercolor": 4159204 + }, + "minecraft:lush_caves": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:nether_wastes": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204 + }, + "minecraft:warped_forest": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204 + }, + "minecraft:crimson_forest": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204 + }, + "minecraft:soul_sand_valley": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204 + }, + "minecraft:basalt_deltas": { + "humidity": 0.0, + "temperature": 2.0, + "watercolor": 4159204 + }, + "minecraft:the_end": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:end_highlands": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:end_midlands": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:small_end_islands": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + }, + "minecraft:end_barrens": { + "humidity": 0.5, + "temperature": 0.5, + "watercolor": 4159204 + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockColors.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockColors.json new file mode 100644 index 00000000..f948d075 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockColors.json @@ -0,0 +1,20 @@ +{ + "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:short_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", + "minecraft:snow": "#ffffff", + "minecraft:cherry_leaves": "#ffffff" +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockProperties.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockProperties.json new file mode 100644 index 00000000..1062822c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockProperties.json @@ -0,0 +1,55 @@ +{ + "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:short_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, "cullingIdentical": true }, + "minecraft:tinted_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:white_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:orange_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:magenta_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:light_blue_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:yellow_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:lime_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:pink_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:gray_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:light_gray_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:cyan_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:purple_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:blue_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:brown_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:green_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:red_stained_glass": { "occluding": false, "cullingIdentical": true }, + "minecraft:black_stained_glass": { "occluding": false, "cullingIdentical": true }, + + "minecraft:ice": { "cullingIdentical": true } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/acacia_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/acacia_sign.json new file mode 100644 index 00000000..7bde7036 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/acacia_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/acacia_wall_sign.json new file mode 100644 index 00000000..3c93859c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/birch_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/birch_sign.json new file mode 100644 index 00000000..3aff1cba --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/birch_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/birch_wall_sign.json new file mode 100644 index 00000000..488d0d85 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/black_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/black_bed.json new file mode 100644 index 00000000..c475b18c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/blue_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/blue_bed.json new file mode 100644 index 00000000..e16bf131 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/brown_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/brown_bed.json new file mode 100644 index 00000000..44c1ab9c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/bubble_column.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/bubble_column.json new file mode 100644 index 00000000..f047e558 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/bubble_column.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "block/bubble_column" } + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/chest.json new file mode 100644 index 00000000..93853057 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/crimson_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/crimson_sign.json new file mode 100644 index 00000000..24b8e2e3 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/crimson_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/crimson_wall_sign.json new file mode 100644 index 00000000..a618d125 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/cyan_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/cyan_bed.json new file mode 100644 index 00000000..2b1f6b7c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/dark_oak_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/dark_oak_sign.json new file mode 100644 index 00000000..06e07f02 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/dark_oak_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/dark_oak_wall_sign.json new file mode 100644 index 00000000..3f0cac41 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/ender_chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/ender_chest.json new file mode 100644 index 00000000..9997264b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/grass.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/grass.json new file mode 100644 index 00000000..d065ca08 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/grass.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/short_grass" + } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/gray_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/gray_bed.json new file mode 100644 index 00000000..a731191d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/green_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/green_bed.json new file mode 100644 index 00000000..2c26704b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/jungle_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/jungle_sign.json new file mode 100644 index 00000000..a2f96d3e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/jungle_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/jungle_wall_sign.json new file mode 100644 index 00000000..9eb47dcc --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/lava.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/lava.json new file mode 100644 index 00000000..d6adbba4 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/lava.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "block/lava" } + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/light_blue_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/light_blue_bed.json new file mode 100644 index 00000000..5dea0bc5 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/light_gray_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/light_gray_bed.json new file mode 100644 index 00000000..f762127d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/lime_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/lime_bed.json new file mode 100644 index 00000000..77dd6cc6 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/magenta_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/magenta_bed.json new file mode 100644 index 00000000..717f1183 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/mangrove_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/mangrove_sign.json new file mode 100644 index 00000000..ebd3b2c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/mangrove_sign.json @@ -0,0 +1,20 @@ +{ + "variants": { + "rotation=0": { "model": "block/sign/mangrove" }, + "rotation=1": { "model": "block/sign/mangrove", "y": 22.5 }, + "rotation=2": { "model": "block/sign/mangrove", "y": 45 }, + "rotation=3": { "model": "block/sign/mangrove", "y": 67.5 }, + "rotation=4": { "model": "block/sign/mangrove", "y": 90 }, + "rotation=5": { "model": "block/sign/mangrove", "y": 112.5 }, + "rotation=6": { "model": "block/sign/mangrove", "y": 135 }, + "rotation=7": { "model": "block/sign/mangrove", "y": 157.5 }, + "rotation=8": { "model": "block/sign/mangrove", "y": 180 }, + "rotation=9": { "model": "block/sign/mangrove", "y": 202.5 }, + "rotation=10": { "model": "block/sign/mangrove", "y": 225 }, + "rotation=11": { "model": "block/sign/mangrove", "y": 247.5 }, + "rotation=12": { "model": "block/sign/mangrove", "y": 270 }, + "rotation=13": { "model": "block/sign/mangrove", "y": 292.5 }, + "rotation=14": { "model": "block/sign/mangrove", "y": 315 }, + "rotation=15": { "model": "block/sign/mangrove", "y": 337.5 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/mangrove_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/mangrove_wall_sign.json new file mode 100644 index 00000000..1cde352e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/mangrove_wall_sign.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=south": { "model": "block/sign/wall_mangrove" }, + "facing=west": { "model": "block/sign/wall_mangrove", "y": 90 }, + "facing=north": { "model": "block/sign/wall_mangrove", "y": 180 }, + "facing=east": { "model": "block/sign/wall_mangrove", "y": 270 } + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/oak_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/oak_sign.json new file mode 100644 index 00000000..567ec778 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/oak_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/oak_wall_sign.json new file mode 100644 index 00000000..c64ba4eb --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/orange_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/orange_bed.json new file mode 100644 index 00000000..13bf33be --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/pink_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/pink_bed.json new file mode 100644 index 00000000..9237c82f --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/purple_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/purple_bed.json new file mode 100644 index 00000000..39bda4f0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/red_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/red_bed.json new file mode 100644 index 00000000..ebb872d9 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/spruce_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/spruce_sign.json new file mode 100644 index 00000000..e592a699 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/spruce_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/spruce_wall_sign.json new file mode 100644 index 00000000..d405959f --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/trapped_chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/trapped_chest.json new file mode 100644 index 00000000..7ef695c6 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/warped_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/warped_sign.json new file mode 100644 index 00000000..56a3bbdf --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/warped_wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/warped_wall_sign.json new file mode 100644 index 00000000..16b35c36 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/water.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/water.json new file mode 100644 index 00000000..48ff0ea4 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/water.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "block/water" } + } +} diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/white_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/white_bed.json new file mode 100644 index 00000000..133bd10d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/blockstates/yellow_bed.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/yellow_bed.json new file mode 100644 index 00000000..48ef5c14 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/bed_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/bed_foot.json new file mode 100644 index 00000000..b40ef14e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/bed_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/bed_head.json new file mode 100644 index 00000000..f762847d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/black_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/black_foot.json new file mode 100644 index 00000000..4d7685bd --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/black_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/black_head.json new file mode 100644 index 00000000..d34fc61c --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/blue_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/blue_foot.json new file mode 100644 index 00000000..04593839 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/blue_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/blue_head.json new file mode 100644 index 00000000..d1b6cb8a --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/brown_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/brown_foot.json new file mode 100644 index 00000000..cedb2e07 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/brown_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/brown_head.json new file mode 100644 index 00000000..b48bfdad --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/cyan_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/cyan_foot.json new file mode 100644 index 00000000..4000ca72 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/cyan_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/cyan_head.json new file mode 100644 index 00000000..e290aee8 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/gray_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/gray_foot.json new file mode 100644 index 00000000..57ad4f59 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/gray_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/gray_head.json new file mode 100644 index 00000000..500dac71 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/green_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/green_foot.json new file mode 100644 index 00000000..97e07cad --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/green_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/green_head.json new file mode 100644 index 00000000..53751269 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/light_blue_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/light_blue_foot.json new file mode 100644 index 00000000..80605904 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/light_blue_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/light_blue_head.json new file mode 100644 index 00000000..6acc0f3b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/light_gray_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/light_gray_foot.json new file mode 100644 index 00000000..573d7485 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/light_gray_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/light_gray_head.json new file mode 100644 index 00000000..9dafb5d9 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/lime_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/lime_foot.json new file mode 100644 index 00000000..0b58242a --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/lime_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/lime_head.json new file mode 100644 index 00000000..de8bb79f --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/magenta_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/magenta_foot.json new file mode 100644 index 00000000..c976ca69 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/magenta_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/magenta_head.json new file mode 100644 index 00000000..f86f337b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/orange_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/orange_foot.json new file mode 100644 index 00000000..8ab767d0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/orange_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/orange_head.json new file mode 100644 index 00000000..74ebcb93 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/pink_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/pink_foot.json new file mode 100644 index 00000000..3993c20e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/pink_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/pink_head.json new file mode 100644 index 00000000..af697548 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/purple_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/purple_foot.json new file mode 100644 index 00000000..96a0ec28 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/purple_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/purple_head.json new file mode 100644 index 00000000..3ddbd340 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/red_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/red_foot.json new file mode 100644 index 00000000..686d464e --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/red_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/red_head.json new file mode 100644 index 00000000..21650b33 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/white_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/white_foot.json new file mode 100644 index 00000000..1ca1b531 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/white_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/white_head.json new file mode 100644 index 00000000..99894a58 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/yellow_foot.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/yellow_foot.json new file mode 100644 index 00000000..ecfb0595 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bed/yellow_head.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bed/yellow_head.json new file mode 100644 index 00000000..6b3023ad --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/bubble_column.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/bubble_column.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/chest.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/chest.json new file mode 100644 index 00000000..5a1ca023 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/chest_double_left.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/chest_double_left.json new file mode 100644 index 00000000..bf96784b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/chest_double_right.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/chest_double_right.json new file mode 100644 index 00000000..62a76a41 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/ender.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/ender.json new file mode 100644 index 00000000..e50bc420 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/normal.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/normal.json new file mode 100644 index 00000000..87da674d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/normal_double_left.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/normal_double_left.json new file mode 100644 index 00000000..1aaf047d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/normal_double_right.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/normal_double_right.json new file mode 100644 index 00000000..a831aabf --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/trapped.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/trapped.json new file mode 100644 index 00000000..9d10f500 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/trapped_double_left.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/trapped_double_left.json new file mode 100644 index 00000000..bf0fd65b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/chest/trapped_double_right.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/chest/trapped_double_right.json new file mode 100644 index 00000000..2ec66dcf --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/lava.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/lava.json new file mode 100644 index 00000000..0eea97aa --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/lava.json @@ -0,0 +1,8 @@ +{ + "parent": "bluemap: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_20_3/assets/minecraft/models/block/sign/acacia.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/acacia.json new file mode 100644 index 00000000..791c9f04 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/birch.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/birch.json new file mode 100644 index 00000000..8fda4984 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/crimson.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/crimson.json new file mode 100644 index 00000000..e4b76364 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/dark_oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/dark_oak.json new file mode 100644 index 00000000..25c324e1 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/jungle.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/jungle.json new file mode 100644 index 00000000..c1e44326 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/mangrove.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/mangrove.json new file mode 100644 index 00000000..7b53192d --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/mangrove.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/sign", + "textures": { + "sign": "entity/signs/mangrove" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/oak.json new file mode 100644 index 00000000..5fc2d920 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/sign.json new file mode 100644 index 00000000..14bc9644 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/spruce.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/spruce.json new file mode 100644 index 00000000..f30b6c48 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_acacia.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_acacia.json new file mode 100644 index 00000000..d2ba54c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_birch.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_birch.json new file mode 100644 index 00000000..d40e75a6 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_crimson.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_crimson.json new file mode 100644 index 00000000..54cbfd90 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_dark_oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_dark_oak.json new file mode 100644 index 00000000..9aa4dcf5 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_jungle.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_jungle.json new file mode 100644 index 00000000..c84ae16b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_mangrove.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_mangrove.json new file mode 100644 index 00000000..e25730e9 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_mangrove.json @@ -0,0 +1,6 @@ +{ + "parent":"block/sign/wall_sign", + "textures": { + "sign": "entity/signs/mangrove" + } +} \ No newline at end of file diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_oak.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_oak.json new file mode 100644 index 00000000..d83903c0 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_sign.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_sign.json new file mode 100644 index 00000000..d083952b --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_spruce.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_spruce.json new file mode 100644 index 00000000..61577291 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/wall_warped.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/wall_warped.json new file mode 100644 index 00000000..d72152c5 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/sign/warped.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/sign/warped.json new file mode 100644 index 00000000..5754bdcb --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/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_20_3/assets/minecraft/models/block/water.json b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/water.json new file mode 100644 index 00000000..2c092d90 --- /dev/null +++ b/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/models/block/water.json @@ -0,0 +1,8 @@ +{ + "parent": "bluemap:builtin/liquid", + "textures": { + "particle": "block/water_still", + "still": "block/water_still", + "flow": "block/water_flow" + } +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 8fbb0998..d47a75a4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,9 @@ tasks.register("clean") { gradle.includedBuilds.forEach { + // workaround for https://github.com/neoforged/NeoGradle/issues/18 + if (it.name == "neoforge-1.20.2") return@forEach + dependsOn(it.task(":clean")) } diff --git a/implementations/fabric-1.15.2/build.gradle.kts b/implementations/fabric-1.15.2/build.gradle.kts index 2fae9d55..9a35f582 100644 --- a/implementations/fabric-1.15.2/build.gradle.kts +++ b/implementations/fabric-1.15.2/build.gradle.kts @@ -140,7 +140,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("remappedShadowJar")) gameVersions.addAll("1.15.2") dependencies { @@ -153,7 +155,9 @@ curseforge { project(closureOf { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .readText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion("Fabric") diff --git a/implementations/fabric-1.16.2/build.gradle.kts b/implementations/fabric-1.16.2/build.gradle.kts index 422b268f..285285be 100644 --- a/implementations/fabric-1.16.2/build.gradle.kts +++ b/implementations/fabric-1.16.2/build.gradle.kts @@ -140,7 +140,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("remappedShadowJar")) gameVersions.addAll("1.16.2", "1.16.3", "1.16.4", "1.16.5") dependencies { @@ -153,7 +155,9 @@ curseforge { project(closureOf { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .readText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion("Fabric") diff --git a/implementations/fabric-1.17/build.gradle.kts b/implementations/fabric-1.17/build.gradle.kts index a5e82d60..371bb1c0 100644 --- a/implementations/fabric-1.17/build.gradle.kts +++ b/implementations/fabric-1.17/build.gradle.kts @@ -140,7 +140,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("remappedShadowJar")) gameVersions.addAll("1.17", "1.17.1") dependencies { @@ -153,7 +155,9 @@ curseforge { project(closureOf { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .readText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion("Fabric") diff --git a/implementations/fabric-1.18/build.gradle.kts b/implementations/fabric-1.18/build.gradle.kts index cb76570c..426da887 100644 --- a/implementations/fabric-1.18/build.gradle.kts +++ b/implementations/fabric-1.18/build.gradle.kts @@ -140,7 +140,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("remappedShadowJar")) gameVersions.addAll("1.18", "1.18.1", "1.18.2") dependencies { @@ -153,7 +155,9 @@ curseforge { project(closureOf { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .readText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion("Fabric") diff --git a/implementations/fabric-1.19.4/build.gradle.kts b/implementations/fabric-1.19.4/build.gradle.kts index 57b95805..1666893e 100644 --- a/implementations/fabric-1.19.4/build.gradle.kts +++ b/implementations/fabric-1.19.4/build.gradle.kts @@ -140,7 +140,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("remappedShadowJar")) gameVersions.addAll("1.19.4") dependencies { @@ -153,7 +155,9 @@ curseforge { project(closureOf { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .readText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion("Fabric") diff --git a/implementations/fabric-1.20/build.gradle.kts b/implementations/fabric-1.20/build.gradle.kts index 15046fa0..66450173 100644 --- a/implementations/fabric-1.20/build.gradle.kts +++ b/implementations/fabric-1.20/build.gradle.kts @@ -140,9 +140,11 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("remappedShadowJar")) - gameVersions.addAll("1.20", "1.20.1", "1.20.2") + gameVersions.addAll("1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4") dependencies { required.project("P7dR8mSH") // Fabric API } @@ -153,7 +155,9 @@ curseforge { project(closureOf { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .readText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion("Fabric") @@ -164,6 +168,8 @@ curseforge { addGameVersion("1.20") addGameVersion("1.20.1") addGameVersion("1.20.2") + addGameVersion("1.20.3") + addGameVersion("1.20.4") mainArtifact(tasks.findByName("remappedShadowJar"), closureOf { relations(closureOf { diff --git a/implementations/forge-1.17.1/build.gradle b/implementations/forge-1.17.1/build.gradle index a4a475c3..54bf3601 100644 --- a/implementations/forge-1.17.1/build.gradle +++ b/implementations/forge-1.17.1/build.gradle @@ -177,7 +177,9 @@ modrinth { token = System.getenv("MODRINTH_TOKEN") projectId = "swbUV1cr" versionNumber = "${project.version}-${project.name}" - changelog = "Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) uploadFile = shadowJar gameVersions = ["1.17.1"] } @@ -187,7 +189,9 @@ curseforge { project { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion "Forge" diff --git a/implementations/forge-1.18.1/build.gradle b/implementations/forge-1.18.1/build.gradle index 2ee04248..87b81d59 100644 --- a/implementations/forge-1.18.1/build.gradle +++ b/implementations/forge-1.18.1/build.gradle @@ -173,7 +173,9 @@ modrinth { token = System.getenv("MODRINTH_TOKEN") projectId = "swbUV1cr" versionNumber = "${project.version}-${project.name}" - changelog = "Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) uploadFile = shadowJar gameVersions = ["1.18.1", "1.18.2"] } @@ -183,7 +185,9 @@ curseforge { project { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion "Forge" diff --git a/implementations/forge-1.19.4/build.gradle b/implementations/forge-1.19.4/build.gradle index fc82230f..ed899792 100644 --- a/implementations/forge-1.19.4/build.gradle +++ b/implementations/forge-1.19.4/build.gradle @@ -173,7 +173,9 @@ modrinth { token = System.getenv("MODRINTH_TOKEN") projectId = "swbUV1cr" versionNumber = "${project.version}-${project.name}" - changelog = "Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) uploadFile = shadowJar gameVersions = ["1.19.4"] } @@ -183,7 +185,9 @@ curseforge { project { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion "Forge" diff --git a/implementations/forge-1.20/build.gradle b/implementations/forge-1.20/build.gradle index 21467801..02ba68f4 100644 --- a/implementations/forge-1.20/build.gradle +++ b/implementations/forge-1.20/build.gradle @@ -173,9 +173,11 @@ modrinth { token = System.getenv("MODRINTH_TOKEN") projectId = "swbUV1cr" versionNumber = "${project.version}-${project.name}" - changelog = "Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) uploadFile = shadowJar - gameVersions = ["1.20", "1.20.1", "1.20.2"] + gameVersions = ["1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4"] } curseforge { @@ -183,7 +185,9 @@ curseforge { project { id = "406463" changelogType = "markdown" - changelog = "**Releasenotes and Changelog:**\n\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) releaseType = "release" addGameVersion "Forge" @@ -194,6 +198,8 @@ curseforge { addGameVersion "1.20" addGameVersion "1.20.1" addGameVersion "1.20.2" + addGameVersion "1.20.3" + addGameVersion "1.20.4" mainArtifact shadowJar } diff --git a/implementations/neoforge-1.20.2/build.gradle b/implementations/neoforge-1.20.2/build.gradle new file mode 100644 index 00000000..56c4a38a --- /dev/null +++ b/implementations/neoforge-1.20.2/build.gradle @@ -0,0 +1,170 @@ +plugins { + id "java" + id "java-library" + id "net.neoforged.gradle.userdev" version '7.0.57' + id "com.diffplug.spotless" version "6.1.2" + id "com.github.node-gradle.node" version "3.0.1" + id "com.modrinth.minotaur" version "2.+" + id "com.matthewprenger.cursegradle" version "1.4.0" + id "com.github.johnrengelman.shadow" version "7.1.2" +} + +group = "de.bluecolored.bluemap.forge" +version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore + +repositories { + mavenLocal() + mavenCentral() + maven { + setUrl("https://libraries.minecraft.net") + } + maven { + setUrl("https://jitpack.io") + } +} + +base { + archivesName = "bluemap" +} + +java.toolchain.languageVersion = JavaLanguageVersion.of(17) +sourceSets.main.resources { srcDir 'src/generated/resources' } + +configurations { + implementation.extendsFrom(shadowInclude) +} + +dependencies { + implementation "net.neoforged:neoforge:20.2.86" + + shadowInclude ("de.bluecolored.bluemap.common: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") + } + + testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") + testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") +} + +tasks.withType(ProcessResources).configureEach { + var replaceProperties = [ + minecraft_version: minecraft_version, + minecraft_version_range: minecraft_version_range, + neo_version: neo_version, + neo_version_range: neo_version_range, + loader_version_range: loader_version_range, + mod_id: mod_id, + mod_name: mod_name, + mod_license: mod_license, + mod_version: version, + mod_description: mod_description, + pack_format_number: pack_format_number, + ] + inputs.properties replaceProperties + + filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { + expand replaceProperties + [project: project] + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} + +tasks.withType(AbstractArchiveTask).configureEach { + setReproducibleFileOrder(true) + setPreserveFileTimestamps(false) +} + +spotless { + java { + target ("src/*/java/**/*.java") + + licenseHeaderFile("../../HEADER") + indentWithSpaces() + trimTrailingWhitespace() + } +} + +test { + useJUnitPlatform() +} + +shadowJar { + destinationDirectory.set(file("../../build/release")) + archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") + + 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 ("org.aopalliance", "de.bluecolored.shadow.aopalliance") + relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + relocate ("io.airlift", "de.bluecolored.shadow.airlift") + + relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") + relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") + + relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") + relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") + relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") +} + +task release { + dependsOn(shadowJar) +} + +modrinth { + token = System.getenv("MODRINTH_TOKEN") + projectId = "swbUV1cr" + versionNumber = "${project.version}-${project.name}" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) + uploadFile = shadowJar + loaders = ["neoforge"] + gameVersions = ["1.20.2", "1.20.3", "1.20.4"] +} + +curseforge { + apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" + project { + id = "406463" + changelogType = "markdown" + changelog = file("../../release.md") + .getText() + .replace("{version}", project.version.toString()) + releaseType = "release" + + addGameVersion "NeoForge" + + addGameVersion "Java 18" + addGameVersion "Java 17" + + addGameVersion "1.20.2" + addGameVersion "1.20.3" + addGameVersion "1.20.4" + + mainArtifact shadowJar + } + options { + javaVersionAutoDetect = false + javaIntegration = false + forgeGradleIntegration = false + } +} + +task publish { + dependsOn(tasks.findByName("modrinth")) + dependsOn(tasks.findByName("curseforge")) +} diff --git a/implementations/neoforge-1.20.2/gradle.properties b/implementations/neoforge-1.20.2/gradle.properties new file mode 100644 index 00000000..cfb744f0 --- /dev/null +++ b/implementations/neoforge-1.20.2/gradle.properties @@ -0,0 +1,16 @@ +org.gradle.daemon=false +org.gradle.debug=false + +minecraft_version=1.20.2 +minecraft_version_range=[1.20.2,1.21) +neo_version=20.2.86 +neo_version_range=[20.2,) +loader_version_range=[1,) +mapping_channel=official +mapping_version=1.20.2 + +mod_id=bluemap +mod_name=BlueMap +mod_description=A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) +mod_license=MIT +pack_format_number=18 diff --git a/implementations/neoforge-1.20.2/settings.gradle b/implementations/neoforge-1.20.2/settings.gradle new file mode 100644 index 00000000..948bd4cc --- /dev/null +++ b/implementations/neoforge-1.20.2/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + maven { url = 'https://maven.neoforged.net/releases' } + } +} + +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' +} + +rootProject.name = "neoforge-1.20.2" + +includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java new file mode 100644 index 00000000..4a8f9233 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java @@ -0,0 +1,79 @@ +/* + * 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.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluemap.common.plugin.Plugin; +import de.bluecolored.bluemap.common.plugin.text.Text; +import de.bluecolored.bluemap.common.serverinterface.CommandSource; +import de.bluecolored.bluemap.core.world.World; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.network.chat.Component; + +import java.io.IOException; +import java.util.Optional; + +public class ForgeCommandSource implements CommandSource { + + private final ForgeMod mod; + private final Plugin plugin; + private final CommandSourceStack delegate; + + public ForgeCommandSource(ForgeMod mod, Plugin plugin, CommandSourceStack delegate) { + this.mod = mod; + this.plugin = plugin; + this.delegate = delegate; + } + + @Override + public void sendMessage(Text text) { + var component = Component.Serializer.fromJsonLenient(text.toJSONString()); + if (component != null) + delegate.sendSuccess(() -> component, false); + } + + @Override + public boolean hasPermission(String permission) { + return delegate.hasPermission(1); + } + + @Override + public Optional getPosition() { + var pos = delegate.getPosition(); + return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); + } + + @Override + public Optional getWorld() { + try { + var serverWorld = mod.getWorld(delegate.getLevel()); + String worldId = plugin.getBlueMap().getWorldId(serverWorld.getSaveFolder()); + return Optional.ofNullable(plugin.getWorlds().get(worldId)); + } catch (IOException ignore) {} + + return Optional.empty(); + } + +} diff --git a/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java new file mode 100644 index 00000000..7bcef018 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java @@ -0,0 +1,66 @@ +/* + * 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.serverinterface.ServerEventListener; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.entity.player.PlayerEvent; + +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); + + NeoForge.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(PlayerEvent.PlayerLoggedInEvent evt) { + UUID uuid = evt.getEntity().getUUID(); + for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); + } + + @SubscribeEvent + public synchronized void onPlayerLeave(PlayerEvent.PlayerLoggedOutEvent evt) { + UUID uuid = evt.getEntity().getUUID(); + for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); + } + +} diff --git a/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java new file mode 100644 index 00000000..917e4348 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java @@ -0,0 +1,268 @@ +/* + * 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.serverinterface.Player; +import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; +import de.bluecolored.bluemap.common.serverinterface.ServerInterface; +import de.bluecolored.bluemap.common.serverinterface.ServerWorld; +import de.bluecolored.bluemap.core.BlueMap; +import de.bluecolored.bluemap.core.MinecraftVersion; +import de.bluecolored.bluemap.core.logger.Logger; +import net.minecraft.SharedConstants; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.level.Level; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.IExtensionPoint; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.common.Mod; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.RegisterCommandsEvent; +import net.neoforged.neoforge.event.TickEvent; +import net.neoforged.neoforge.event.entity.player.PlayerEvent; +import net.neoforged.neoforge.event.server.ServerStartedEvent; +import net.neoforged.neoforge.event.server.ServerStartingEvent; +import net.neoforged.neoforge.event.server.ServerStoppingEvent; +import net.neoforged.neoforge.network.NetworkConstants; +import org.apache.logging.log4j.LogManager; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +@Mod(Plugin.PLUGIN_ID) +public class ForgeMod implements ServerInterface { + + private final Plugin pluginInstance; + private MinecraftServer serverInstance = null; + + private final ForgeEventForwarder eventForwarder; + private final LoadingCache worlds; + + private int playerUpdateIndex = 0; + private final Map onlinePlayerMap; + private final List onlinePlayerList; + + public ForgeMod() { + Logger.global.clear(); + Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); + + this.onlinePlayerMap = new ConcurrentHashMap<>(); + this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); + + this.pluginInstance = new Plugin("neoforge-1.20.2", this); + + this.eventForwarder = new ForgeEventForwarder(); + this.worlds = Caffeine.newBuilder() + .executor(BlueMap.THREAD_POOL) + .weakKeys() + .maximumSize(1000) + .build(ForgeWorld::new); + + NeoForge.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(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); + } + + @SubscribeEvent + public void onServerStarting(ServerStartingEvent event) { + this.serverInstance = event.getServer(); + } + + @SubscribeEvent + public void onRegisterCommands(RegisterCommandsEvent event) { + //register commands + new Commands<>(pluginInstance, event.getDispatcher(), forgeSource -> + new ForgeCommandSource(this, pluginInstance, forgeSource) + ); + } + + @SubscribeEvent + public void onServerStarted(ServerStartedEvent event) { + //save worlds to generate level.dat files + serverInstance.saveAllChunks(false, true, true); + + new Thread(() -> { + Logger.global.logInfo("Loading..."); + + try { + pluginInstance.load(); + if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!"); + } catch (IOException e) { + Logger.global.logError("Failed to load bluemap!", e); + pluginInstance.unload(); + } + }, "BlueMap-Plugin-Loading").start(); + } + + @SubscribeEvent + public void onServerStopping(ServerStoppingEvent event) { + pluginInstance.unload(); + Logger.global.logInfo("BlueMap unloaded!"); + } + + @SubscribeEvent + public void onTick(TickEvent.ServerTickEvent evt) { + updateSomePlayers(); + } + + @Override + public MinecraftVersion getMinecraftVersion() { + try { + return MinecraftVersion.of(SharedConstants.getCurrentVersion().getId()); + } catch (IllegalArgumentException ex) { + return MinecraftVersion.LATEST_SUPPORTED; + } + } + + @Override + public void registerListener(ServerEventListener listener) { + eventForwarder.addEventListener(listener); + } + + @Override + public void unregisterAllListeners() { + eventForwarder.removeAllListeners(); + } + + @Override + public Collection getLoadedWorlds() { + Collection loadedWorlds = new ArrayList<>(3); + for (ServerLevel serverWorld : serverInstance.getAllLevels()) { + loadedWorlds.add(worlds.get(serverWorld)); + } + return loadedWorlds; + } + + @SuppressWarnings("unchecked") + @Override + public Optional getWorld(Object world) { + if (world instanceof Path) + return getWorld((Path) world); + + if (world instanceof String) { + ResourceLocation resourceLocation = ResourceLocation.tryParse((String) world); + if (resourceLocation != null) world = serverInstance.getLevel(ResourceKey.create(Registries.DIMENSION, resourceLocation)); + } + + if (world instanceof ResourceKey) { + try { + world = serverInstance.getLevel((ResourceKey) world); + } catch (ClassCastException ignored) {} + } + + if (world instanceof ServerLevel) + return Optional.of(getWorld((ServerLevel) world)); + + return Optional.empty(); + } + + public ServerWorld getWorld(ServerLevel world) { + return worlds.get(world); + } + + @Override + public Path getConfigFolder() { + return Path.of("config", "bluemap"); + } + + @Override + public Optional getModsFolder() { + return Optional.of(Path.of("mods")); + } + + @SubscribeEvent + public void onPlayerJoin(PlayerEvent.PlayerLoggedInEvent evt) { + var playerInstance = evt.getEntity(); + if (!(playerInstance instanceof ServerPlayer)) return; + + ForgePlayer player = new ForgePlayer(playerInstance.getUUID(), this); + onlinePlayerMap.put(player.getUuid(), player); + onlinePlayerList.add(player); + } + + @SubscribeEvent + public void onPlayerLeave(PlayerEvent.PlayerLoggedOutEvent evt) { + var player = evt.getEntity(); + if (!(player instanceof ServerPlayer)) return; + + UUID playerUUID = player.getUUID(); + 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/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java new file mode 100644 index 00000000..45bb8cf9 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java @@ -0,0 +1,172 @@ +/* + * 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.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluemap.common.plugin.text.Text; +import de.bluecolored.bluemap.common.serverinterface.Gamemode; +import de.bluecolored.bluemap.common.serverinterface.Player; +import net.minecraft.core.BlockPos; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.level.GameType; +import net.minecraft.world.level.LightLayer; +import net.minecraft.world.phys.Vec3; + +import java.io.IOException; +import java.util.EnumMap; +import java.util.Map; +import java.util.UUID; + +public class ForgePlayer implements Player { + + 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); + } + + private final UUID uuid; + private Text name; + private String world; + private Vector3d position; + private Vector3d rotation; + private int skyLight; + private int blockLight; + private boolean online; + private boolean sneaking; + private boolean invisible; + private Gamemode gamemode; + + private final ForgeMod mod; + + public ForgePlayer(UUID playerUuid, ForgeMod mod) { + this.uuid = playerUuid; + this.mod = mod; + + update(); + } + + @Override + public UUID getUuid() { + return this.uuid; + } + + @Override + public Text getName() { + return this.name; + } + + @Override + public String getWorld() { + return this.world; + } + + @Override + public Vector3d getPosition() { + return this.position; + } + + @Override + public Vector3d getRotation() { + return rotation; + } + + @Override + public int getSkyLight() { + return skyLight; + } + + @Override + public int getBlockLight() { + return blockLight; + } + + @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; + } + + ServerPlayer player = server.getPlayerList().getPlayer(uuid); + if (player == null) { + this.online = false; + return; + } + + this.gamemode = GAMEMODE_MAP.getOrDefault(player.gameMode.getGameModeForPlayer(), Gamemode.SURVIVAL); + if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; + + MobEffectInstance invis = player.getEffect(MobEffects.INVISIBILITY); + this.invisible = invis != null && invis.getDuration() > 0; + + this.name = Text.of(player.getName().getString()); + this.online = true; + + Vec3 pos = player.getPosition(1f); + this.position = new Vector3d(pos.x(), pos.y(), pos.z()); + this.rotation = new Vector3d(player.getXRot(), player.getYHeadRot(), 0); + this.sneaking = player.isCrouching(); + + this.skyLight = player.level().getChunkSource().getLightEngine().getLayerListener(LightLayer.SKY).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); + this.blockLight = player.level().getChunkSource().getLightEngine().getLayerListener(LightLayer.BLOCK).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); + + try { + var world = mod.getWorld(player.level()).orElse(null); + this.world = world != null ? mod.getPlugin().getBlueMap().getWorldId(world.getSaveFolder()) : "unknown"; + } catch (IOException | NullPointerException e) { // NullPointerException -> the plugin isn't fully loaded + this.world = "unknown"; + } + } + +} diff --git a/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java new file mode 100644 index 00000000..ce92b260 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java @@ -0,0 +1,100 @@ +/* + * 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.serverinterface.Dimension; +import de.bluecolored.bluemap.common.serverinterface.ServerWorld; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.dimension.DimensionType; +import net.minecraft.world.level.storage.LevelResource; + +import java.io.IOException; +import java.lang.ref.WeakReference; +import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; + +public class ForgeWorld implements ServerWorld { + + private final WeakReference delegate; + private final Path saveFolder; + + public ForgeWorld(ServerLevel delegate) { + this.delegate = new WeakReference<>(delegate); + + MinecraftServer server = delegate.getServer(); + Path worldFolder = delegate.getServer().getServerDirectory().toPath().resolve(server.getWorldPath(LevelResource.ROOT)); + this.saveFolder = DimensionType.getStorageFolder(delegate.dimension(), worldFolder) + .toAbsolutePath().normalize(); + } + + @Override + public Dimension getDimension() { + ServerLevel world = delegate.get(); + if (world != null) { + if (world.dimension().equals(Level.NETHER)) return Dimension.NETHER; + if (world.dimension().equals(Level.END)) return Dimension.END; + if (world.dimension().equals(Level.OVERWORLD)) return Dimension.OVERWORLD; + } + + return ServerWorld.super.getDimension(); + } + + @Override + public boolean persistWorldChanges() throws IOException { + ServerLevel world = delegate.get(); + if (world == null) return false; + + var taskResult = CompletableFuture.supplyAsync(() -> { + try { + world.save(null, true, false); + return true; + } catch (Exception e) { + throw new CompletionException(e); + } + }, world.getServer()); + + 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 Path getSaveFolder() { + return this.saveFolder; + } + +} diff --git a/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java new file mode 100644 index 00000000..740b75b2 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java @@ -0,0 +1,68 @@ +/* + * 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.core.logger.AbstractLogger; +import org.apache.logging.log4j.Logger; + +public class Log4jLogger extends AbstractLogger { + + private final 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/neoforge-1.20.2/src/main/resources/META-INF/mods.toml b/implementations/neoforge-1.20.2/src/main/resources/META-INF/mods.toml new file mode 100644 index 00000000..1d6a5d73 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/resources/META-INF/mods.toml @@ -0,0 +1,22 @@ +modLoader="javafml" +loaderVersion="${loader_version_range}" +license="${mod_license}" + +[[mods]] +modId="${mod_id}" +version="${mod_version}" +displayName="${mod_name}" +description='''${mod_description}''' + +[[dependencies.${mod_id}]] #optional + modId="neoforge" + mandatory=true + versionRange="${neo_version_range}" + ordering="NONE" + side="BOTH" +[[dependencies.${mod_id}]] + modId="minecraft" + mandatory=true + versionRange="${minecraft_version_range}" + ordering="NONE" + side="BOTH" diff --git a/implementations/neoforge-1.20.2/src/main/resources/pack.mcmeta b/implementations/neoforge-1.20.2/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..59c52402 --- /dev/null +++ b/implementations/neoforge-1.20.2/src/main/resources/pack.mcmeta @@ -0,0 +1,8 @@ +{ + "pack": { + "description": { + "text": "${mod_id} resources" + }, + "pack_format": ${pack_format_number} + } +} diff --git a/implementations/paper/build.gradle.kts b/implementations/paper/build.gradle.kts index 885e01c7..eeaac699 100644 --- a/implementations/paper/build.gradle.kts +++ b/implementations/paper/build.gradle.kts @@ -119,11 +119,13 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog: \nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("shadowJar")) loaders.addAll("paper","purpur","folia") gameVersions.addAll( - "1.20.1", "1.20.2" + "1.20.1", "1.20.2", "1.20.3", "1.20.4" ) } @@ -132,7 +134,9 @@ hangarPublish { version.set(project.version as String) id.set("BlueMap") channel.set("Release") - changelog.set("Releasenotes and Changelog: \nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) apiKey.set(System.getenv("HANGAR_TOKEN")) @@ -141,7 +145,7 @@ hangarPublish { register(io.papermc.hangarpublishplugin.model.Platforms.PAPER) { jar.set(tasks.shadowJar.flatMap { it.archiveFile }) platformVersions.set(listOf( - "1.20.1", "1.20.2" + "1.20.1", "1.20.2", "1.20.3", "1.20.4" )) } } diff --git a/implementations/spigot/build.gradle.kts b/implementations/spigot/build.gradle.kts index dac6aab9..ea850049 100644 --- a/implementations/spigot/build.gradle.kts +++ b/implementations/spigot/build.gradle.kts @@ -121,7 +121,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog: \nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("shadowJar")) loaders.addAll("spigot", "paper", "purpur") gameVersions.addAll( @@ -132,7 +134,7 @@ modrinth { "1.17", "1.17.1", "1.18", "1.18.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", - "1.20", "1.20.1", "1.20.2" + "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4" ) } diff --git a/implementations/sponge/build.gradle.kts b/implementations/sponge/build.gradle.kts index b07b115a..f14d326e 100644 --- a/implementations/sponge/build.gradle.kts +++ b/implementations/sponge/build.gradle.kts @@ -135,7 +135,9 @@ modrinth { token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("swbUV1cr") versionNumber.set("${project.version}-${project.name}") - changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + changelog.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) uploadFile.set(tasks.findByName("shadowJar")) loaders.addAll("sponge") gameVersions.addAll("1.16.5") @@ -149,8 +151,11 @@ tasks.register("publish") { oreDeployment { apiKey(System.getenv("ORE_TOKEN")) defaultPublication { - projectId.set("BlueMap") - versionBody.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}") + projectId.set("bluemap") + createForumPost.set(true) + versionBody.set(file("../../release.md") + .readText() + .replace("{version}", project.version.toString())) publishArtifacts.setFrom(tasks.findByName("shadowJar")) } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 8ab49cd5..2596e967 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,10 @@ rootProject.name = "BlueMap" +// setup workspace +val releaseNotesFile = file("release.md") +if (!releaseNotesFile.exists()) releaseNotesFile.createNewFile(); + +// implementations includeBuild("implementations/cli") includeBuild("implementations/fabric-1.15.2") @@ -14,6 +19,8 @@ includeBuild("implementations/forge-1.18.1") includeBuild("implementations/forge-1.19.4") includeBuild("implementations/forge-1.20") +includeBuild("implementations/neoforge-1.20.2") + includeBuild("implementations/spigot") includeBuild("implementations/paper")