diff --git a/buildSrc/src/main/kotlin/bluemap.base.gradle.kts b/buildSrc/src/main/kotlin/bluemap.base.gradle.kts index 078ba7bd0..9aeab70c3 100644 --- a/buildSrc/src/main/kotlin/bluemap.base.gradle.kts +++ b/buildSrc/src/main/kotlin/bluemap.base.gradle.kts @@ -10,7 +10,7 @@ version = gitVersion() repositories { maven ("https://repo.bluecolored.de/releases") { - content { includeGroupByRegex ("de\\.bluecolored\\..*") } + content { includeGroupByRegex ("de\\.bluecolored.*") } } maven ("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") { content { includeGroup ("org.spigotmc") } diff --git a/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java index dde0796c2..0bba2e68b 100644 --- a/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java +++ b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java @@ -55,11 +55,11 @@ import de.bluecolored.bluemap.core.storage.MapStorage; import de.bluecolored.bluemap.core.storage.Storage; import de.bluecolored.bluemap.core.util.Grid; +import de.bluecolored.bluemap.core.world.BlockEntity; import de.bluecolored.bluemap.core.world.Chunk; import de.bluecolored.bluemap.core.world.ChunkConsumer; import de.bluecolored.bluemap.core.world.World; import de.bluecolored.bluemap.core.world.block.Block; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; import java.io.IOException; import java.nio.file.Path; @@ -594,8 +594,8 @@ public int debugBlockCommand(CommandContext context) { new Thread(() -> { // collect and output debug info Vector3i blockPos = position.floor().toInt(); - Block block = new Block<>(world, blockPos.getX(), blockPos.getY(), blockPos.getZ()); - Block blockBelow = new Block<>(world, blockPos.getX(), blockPos.getY() - 1, blockPos.getZ()); + Block block = new Block(world, blockPos.getX(), blockPos.getY(), blockPos.getZ()); + Block blockBelow = new Block(world, blockPos.getX(), blockPos.getY() - 1, blockPos.getZ()); source.sendMessages(Arrays.asList( Text.of(TextColor.GOLD, "Block at you: \n", formatBlock(block)), @@ -606,7 +606,7 @@ public int debugBlockCommand(CommandContext context) { return 1; } - private Text formatBlock(Block block) { + private Text formatBlock(Block block) { World world = block.getWorld(); Chunk chunk = block.getChunk(); diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java index b6c6e89d5..a25a76e99 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java @@ -24,14 +24,17 @@ */ package de.bluecolored.bluemap.core.map.hires; +import com.flowpowered.math.vector.Vector3d; import com.flowpowered.math.vector.Vector3i; import de.bluecolored.bluemap.core.map.TextureGallery; import de.bluecolored.bluemap.core.map.TileMetaConsumer; -import de.bluecolored.bluemap.core.map.hires.blockmodel.BlockStateModelRenderer; +import de.bluecolored.bluemap.core.map.hires.block.BlockStateModelRenderer; +import de.bluecolored.bluemap.core.map.hires.entity.EntityModelRenderer; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.util.math.Color; import de.bluecolored.bluemap.core.world.Chunk; import de.bluecolored.bluemap.core.world.World; +import de.bluecolored.bluemap.core.world.block.Block; import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; public class HiresModelRenderer { @@ -40,12 +43,14 @@ public class HiresModelRenderer { private final RenderSettings renderSettings; private final ThreadLocal threadLocalBlockRenderer; + private final ThreadLocal threadLocalEntityRenderer; public HiresModelRenderer(ResourcePack resourcePack, TextureGallery textureGallery, RenderSettings renderSettings) { this.resourcePack = resourcePack; this.renderSettings = renderSettings; this.threadLocalBlockRenderer = ThreadLocal.withInitial(() -> new BlockStateModelRenderer(resourcePack, textureGallery, renderSettings)); + this.threadLocalEntityRenderer = ThreadLocal.withInitial(() -> new EntityModelRenderer(resourcePack, textureGallery, renderSettings)); } public void render(World world, Vector3i modelMin, Vector3i modelMax, TileModel model) { @@ -57,13 +62,15 @@ public void render(World world, Vector3i modelMin, Vector3i modelMax, TileModel Vector3i max = modelMax.min(renderSettings.getMaxPos()); Vector3i modelAnchor = new Vector3i(modelMin.getX(), 0, modelMin.getZ()); + // render blocks BlockStateModelRenderer blockRenderer = threadLocalBlockRenderer.get(); + EntityModelRenderer entityRenderer = threadLocalEntityRenderer.get(); int maxHeight, minY, maxY; double topBlockLight; Color columnColor = new Color(), blockColor = new Color(); - BlockNeighborhood block = new BlockNeighborhood<>(resourcePack, renderSettings, world, 0, 0, 0); - TileModelView blockModel = new TileModelView(tileModel); + BlockNeighborhood block = new BlockNeighborhood(new Block(world, 0, 0, 0), resourcePack, renderSettings, world.getDimensionType()); + TileModelView tileModelView = new TileModelView(tileModel); int x, y, z; for (x = modelMin.getX(); x <= modelMax.getX(); x++){ @@ -80,18 +87,21 @@ public void render(World world, Vector3i modelMin, Vector3i modelMax, TileModel maxY = Math.min(max.getY(), chunk.getMaxY(x, z)); for (y = maxY; y >= minY; y--) { + if (x == -1743 && y == 64 && z == 1393) + System.out.println(); + block.set(x, y, z); if (!block.isInsideRenderBounds()) continue; - blockModel.initialize(); + tileModelView.initialize(); - blockRenderer.render(block, blockModel, blockColor); + blockRenderer.render(block, tileModelView, blockColor); //update topBlockLight topBlockLight = Math.max(topBlockLight, block.getBlockLightLevel() * (1 - columnColor.a)); // move block-model to correct position - blockModel.translate(x - modelAnchor.getX(), y - modelAnchor.getY(), z - modelAnchor.getZ()); + tileModelView.translate(x - modelAnchor.getX(), y - modelAnchor.getY(), z - modelAnchor.getZ()); //update color and height (only if not 100% translucent) if (blockColor.a > 0) { @@ -110,5 +120,18 @@ public void render(World world, Vector3i modelMin, Vector3i modelMax, TileModel tileMetaConsumer.set(x, z, columnColor, maxHeight, (int) topBlockLight); } } + + // render entities + world.iterateEntities(min.getX(), min.getZ(), max.getX(), max.getZ(), entity -> { + Vector3d pos = entity.getPos(); + block.set(pos.getFloorX(), pos.getFloorY(), pos.getFloorZ()); + entityRenderer.render(entity, block, tileModelView.initialize()); + tileModelView.translate( + (float) pos.getX() - modelAnchor.getX(), + (float) pos.getY() - modelAnchor.getY(), + (float) pos.getZ() - modelAnchor.getZ() + ); + }); + } } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRenderer.java similarity index 90% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRenderer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRenderer.java index f86ba69a2..c45151507 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRenderer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRenderer.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import de.bluecolored.bluemap.core.map.hires.TileModelView; import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockstate.Variant; @@ -43,9 +43,9 @@ public interface BlockRenderer { *

* @param block The block information that should be rendered. * @param variant The block-state variant that should be rendered. - * @param blockModel The model(-view) where the block should be rendered to. + * @param tileModel The model(-view) where the block should be rendered to. * @param blockColor The color that should be set to the color that represents the rendered block. */ - void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color blockColor); + void render(BlockNeighborhood block, Variant variant, TileModelView tileModel, Color blockColor); } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRendererFactory.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRendererFactory.java similarity index 96% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRendererFactory.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRendererFactory.java index e6a31259c..e219d7731 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRendererFactory.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRendererFactory.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import de.bluecolored.bluemap.core.map.TextureGallery; import de.bluecolored.bluemap.core.map.hires.RenderSettings; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRendererType.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRendererType.java similarity index 98% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRendererType.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRendererType.java index 82622f343..f6139565d 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockRendererType.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockRendererType.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import de.bluecolored.bluemap.core.map.TextureGallery; import de.bluecolored.bluemap.core.map.hires.RenderSettings; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockStateModelRenderer.java similarity index 77% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelRenderer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockStateModelRenderer.java index ae2d93c38..2d4a2580c 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelRenderer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/BlockStateModelRenderer.java @@ -22,19 +22,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.LoadingCache; import de.bluecolored.bluemap.core.map.TextureGallery; -import de.bluecolored.bluemap.core.map.hires.TileModelView; import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.TileModelView; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.BlockModel; import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockstate.Variant; import de.bluecolored.bluemap.core.util.math.Color; -import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; import de.bluecolored.bluemap.core.world.BlockState; +import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; import java.util.ArrayList; import java.util.List; @@ -52,35 +51,35 @@ public BlockStateModelRenderer(ResourcePack resourcePack, TextureGallery texture .build(type -> type.create(resourcePack, textureGallery, renderSettings)); } - public void render(BlockNeighborhood block, TileModelView blockModel, Color blockColor) { + public void render(BlockNeighborhood block, TileModelView blockModel, Color blockColor) { render(block, block.getBlockState(), blockModel, blockColor); } private final Color waterloggedColor = new Color(); - public void render(BlockNeighborhood block, BlockState blockState, TileModelView blockModel, Color blockColor) { + public void render(BlockNeighborhood block, BlockState blockState, TileModelView tileModel, Color blockColor) { blockColor.set(0, 0, 0, 0, true); //shortcut for air if (blockState.isAir()) return; - int modelStart = blockModel.getStart(); + int modelStart = tileModel.getStart(); // render block - renderModel(block, blockState, blockModel.initialize(), blockColor); + renderModel(block, blockState, tileModel.initialize(), blockColor); // add water if block is waterlogged if (blockState.isWaterlogged() || block.getProperties().isAlwaysWaterlogged()) { waterloggedColor.set(0f, 0f, 0f, 0f, true); - renderModel(block, WATERLOGGED_BLOCKSTATE, blockModel.initialize(), waterloggedColor); + renderModel(block, WATERLOGGED_BLOCKSTATE, tileModel.initialize(), waterloggedColor); blockColor.set(waterloggedColor.overlay(blockColor.premultiplied())); } - blockModel.initialize(modelStart); + tileModel.initialize(modelStart); } private final Color variantColor = new Color(); - private void renderModel(BlockNeighborhood block, BlockState blockState, TileModelView blockModel, Color blockColor) { - int modelStart = blockModel.getStart(); + private void renderModel(BlockNeighborhood block, BlockState blockState, TileModelView tileModel, Color blockColor) { + int modelStart = tileModel.getStart(); var stateResource = resourcePack.getBlockState(blockState); if (stateResource == null) return; @@ -91,19 +90,14 @@ private void renderModel(BlockNeighborhood block, BlockState blockState, Tile //noinspection ForLoopReplaceableByForEach for (int i = 0; i < variants.size(); i++) { - Variant variant = variants.get(i); - - BlockModel modelResource = variant.getModel().getResource(resourcePack::getBlockModel); - if (modelResource == null) continue; - variantColor.set(0f, 0f, 0f, 0f, true); - blockRenderers.get(modelResource.getRenderer()) - .render(block, variant, blockModel.initialize(), variantColor); + Variant variant = variants.get(i); + blockRenderers.get(variant.getRenderer()) + .render(block, variant, tileModel.initialize(), variantColor); if (variantColor.a > blockColorOpacity) blockColorOpacity = variantColor.a; - blockColor.add(variantColor.premultiplied()); } @@ -112,7 +106,7 @@ private void renderModel(BlockNeighborhood block, BlockState blockState, Tile blockColor.a = blockColorOpacity; } - blockModel.initialize(modelStart); + tileModel.initialize(modelStart); } private final static BlockState WATERLOGGED_BLOCKSTATE = new BlockState("minecraft:water"); diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/LiquidModelRenderer.java similarity index 95% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelRenderer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/LiquidModelRenderer.java index a26e66e56..d44adf63f 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelRenderer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/LiquidModelRenderer.java @@ -22,19 +22,19 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import com.flowpowered.math.TrigMath; import com.flowpowered.math.vector.Vector3i; import de.bluecolored.bluemap.core.map.TextureGallery; -import de.bluecolored.bluemap.core.map.hires.TileModelView; -import de.bluecolored.bluemap.core.map.hires.TileModel; import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.TileModel; +import de.bluecolored.bluemap.core.map.hires.TileModelView; import de.bluecolored.bluemap.core.resources.BlockColorCalculatorFactory; import de.bluecolored.bluemap.core.resources.ResourcePath; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.BlockModel; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.TextureVariable; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Model; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.TextureVariable; import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockstate.Variant; import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.Texture; import de.bluecolored.bluemap.core.util.Direction; @@ -42,8 +42,8 @@ import de.bluecolored.bluemap.core.util.math.MatrixM3f; import de.bluecolored.bluemap.core.util.math.VectorM2f; import de.bluecolored.bluemap.core.util.math.VectorM3f; -import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; import de.bluecolored.bluemap.core.world.BlockState; +import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; import de.bluecolored.bluemap.core.world.block.ExtendedBlock; /** @@ -66,10 +66,10 @@ public class LiquidModelRenderer implements BlockRenderer { private final VectorM3f[] corners; private final VectorM2f[] uvs = new VectorM2f[4]; - private BlockNeighborhood block; + private BlockNeighborhood block; private BlockState blockState; private boolean isWaterlogged, isWaterLike; - private BlockModel modelResource; + private Model modelResource; private TileModelView blockModel; private Color blockColor; @@ -93,15 +93,17 @@ public LiquidModelRenderer(ResourcePack resourcePack, TextureGallery textureGall for (int i = 0; i < uvs.length; i++) uvs[i] = new VectorM2f(0, 0); } - public void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color color) { + public void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color color) { this.block = block; this.blockState = block.getBlockState(); this.isWaterlogged = blockState.isWaterlogged() || block.getProperties().isAlwaysWaterlogged(); this.isWaterLike = blockState.isWater() || isWaterlogged; - this.modelResource = variant.getModel().getResource(); + this.modelResource = variant.getModel().getResource(resourcePack::getModel); this.blockModel = blockModel; this.blockColor = color; + if (this.modelResource == null) return; + build(); } @@ -191,7 +193,7 @@ private float getLiquidCornerHeight(int x, int z){ float sumHeight = 0f; int count = 0; - ExtendedBlock neighbor; + ExtendedBlock neighbor; BlockState neighborBlockState; for (ix = x; ix <= x+1; ix++){ @@ -223,7 +225,7 @@ private boolean isLiquidBlockingBlock(BlockState blockState){ } @SuppressWarnings("StringEquality") - private boolean isSameLiquid(ExtendedBlock block){ + private boolean isSameLiquid(ExtendedBlock block){ BlockState blockState = block.getBlockState(); if (this.isWaterlogged) @@ -245,7 +247,7 @@ private boolean createElementFace(Direction faceDir, VectorM3f c0, VectorM3f c1, Vector3i faceDirVector = faceDir.toVector(); //face culling - ExtendedBlock bl = block.getNeighborBlock( + ExtendedBlock bl = block.getNeighborBlock( faceDirVector.getX(), faceDirVector.getY(), faceDirVector.getZ() @@ -369,7 +371,7 @@ private int getFlowingAngle() { } private float compareLiquidHeights(float ownHeight, int dx, int dz) { - ExtendedBlock neighbor = block.getNeighborBlock(dx, 0, dz); + ExtendedBlock neighbor = block.getNeighborBlock(dx, 0, dz); if (neighbor.getBlockState().isAir()) return 0; if (!isSameLiquid(neighbor)) return 0; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/MissingModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/MissingModelRenderer.java similarity index 94% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/MissingModelRenderer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/MissingModelRenderer.java index b18d43056..31e22d6f1 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/MissingModelRenderer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/MissingModelRenderer.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.LoadingCache; @@ -56,7 +56,7 @@ public MissingModelRenderer(ResourcePack resourcePack, TextureGallery textureGal } @Override - public void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color blockColor) { + public void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color blockColor) { blockRenderers.get(BLOCK_RENDERER_TYPES.get(block.getBlockState())) .render(block, variant, blockModel, blockColor); } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/ResourceModelRenderer.java similarity index 90% rename from core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelRenderer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/ResourceModelRenderer.java index 286f23099..3abc93c55 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelRenderer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/block/ResourceModelRenderer.java @@ -22,23 +22,23 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.map.hires.blockmodel; +package de.bluecolored.bluemap.core.map.hires.block; import com.flowpowered.math.TrigMath; import com.flowpowered.math.vector.Vector3f; import com.flowpowered.math.vector.Vector3i; import com.flowpowered.math.vector.Vector4f; import de.bluecolored.bluemap.core.map.TextureGallery; -import de.bluecolored.bluemap.core.map.hires.TileModelView; -import de.bluecolored.bluemap.core.map.hires.TileModel; import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.TileModel; +import de.bluecolored.bluemap.core.map.hires.TileModelView; import de.bluecolored.bluemap.core.resources.BlockColorCalculatorFactory; import de.bluecolored.bluemap.core.resources.ResourcePath; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.BlockModel; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.Element; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.Face; import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockstate.Variant; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Element; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Face; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Model; import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.Texture; import de.bluecolored.bluemap.core.util.Direction; import de.bluecolored.bluemap.core.util.math.Color; @@ -68,9 +68,9 @@ public class ResourceModelRenderer implements BlockRenderer { private final Color tintColor = new Color(); private final Color mapColor = new Color(); - private BlockNeighborhood block; + private BlockNeighborhood block; private Variant variant; - private BlockModel modelResource; + private Model modelResource; private TileModelView blockModel; private Color blockColor; private float blockColorOpacity; @@ -85,14 +85,15 @@ public ResourceModelRenderer(ResourcePack resourcePack, TextureGallery textureGa for (int i = 0; i < rawUvs.length; i++) rawUvs[i] = new VectorM2f(0, 0); } - private final MatrixM4f modelTransform = new MatrixM4f(); - public void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color color) { + public void render(BlockNeighborhood block, Variant variant, TileModelView blockModel, Color color) { this.block = block; this.blockModel = blockModel; this.blockColor = color; this.blockColorOpacity = 0f; this.variant = variant; - this.modelResource = variant.getModel().getResource(); + this.modelResource = variant.getModel().getResource(resourcePack::getModel); + + if (this.modelResource == null) return; this.tintColor.set(0, 0, 0, -1, true); @@ -113,14 +114,9 @@ public void render(BlockNeighborhood block, Variant variant, TileModelView bl blockModel.initialize(modelStart); - // apply model-rotation - if (variant.isRotated()) { - blockModel.transform(modelTransform.identity() - .translate(-0.5f, -0.5f, -0.5f) - .multiplyTo(variant.getRotationMatrix()) - .translate(0.5f, 0.5f, 0.5f) - ); - } + // apply model-transform + if (variant.isTransformed()) + blockModel.transform(variant.getTransformMatrix()); //random offset if (block.getProperties().isRandomOffset()){ @@ -180,7 +176,7 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0, Vector3i faceDirVector = faceDir.toVector(); // light calculation - ExtendedBlock facedBlockNeighbor = getRotationRelativeBlock(faceDir); + ExtendedBlock facedBlockNeighbor = getRotationRelativeBlock(faceDir); LightData blockLightData = block.getLightData(); LightData facedLightData = facedBlockNeighbor.getLightData(); @@ -205,7 +201,7 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0, // face culling if (renderSettings.isRenderTopOnly() && faceRotationVector.y < 0.01) return; if (face.getCullface() != null) { - ExtendedBlock b = getRotationRelativeBlock(face.getCullface()); + ExtendedBlock b = getRotationRelativeBlock(face.getCullface()); BlockProperties p = b.getProperties(); if (p.isCulling()) return; if (p.getCullingIdentical() && b.getBlockState().equals(block.getBlockState())) return; @@ -258,7 +254,7 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0, // UV-Lock counter-rotation float uvRotation = 0f; - if (variant.isUvlock() && variant.isRotated()) { + if (variant.isUvlock() && variant.isTransformed()) { float xRotSin = TrigMath.sin(variant.getX() * TrigMath.DEG_TO_RAD); float xRotCos = TrigMath.cos(variant.getX() * TrigMath.DEG_TO_RAD); @@ -300,8 +296,8 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0, tileModel.setColor(face1, tintColor.r, tintColor.g, tintColor.b); tileModel.setColor(face2, tintColor.r, tintColor.g, tintColor.b); } else { - tileModel.setColor(face1, 1, 1, 1); - tileModel.setColor(face2, 1, 1, 1); + tileModel.setColor(face1, 1f, 1f, 1f); + tileModel.setColor(face2, 1f, 1f, 1f); } // ####### blocklight @@ -350,11 +346,11 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0, } } - private ExtendedBlock getRotationRelativeBlock(Direction direction){ + private ExtendedBlock getRotationRelativeBlock(Direction direction){ return getRotationRelativeBlock(direction.toVector()); } - private ExtendedBlock getRotationRelativeBlock(Vector3i direction){ + private ExtendedBlock getRotationRelativeBlock(Vector3i direction){ return getRotationRelativeBlock( direction.getX(), direction.getY(), @@ -363,7 +359,7 @@ private ExtendedBlock getRotationRelativeBlock(Vector3i direction){ } private final VectorM3f rotationRelativeBlockDirection = new VectorM3f(0, 0, 0); - private ExtendedBlock getRotationRelativeBlock(int dx, int dy, int dz){ + private ExtendedBlock getRotationRelativeBlock(int dx, int dy, int dz){ rotationRelativeBlockDirection.set(dx, dy, dz); makeRotationRelative(rotationRelativeBlockDirection); @@ -375,8 +371,8 @@ private ExtendedBlock getRotationRelativeBlock(int dx, int dy, int dz){ } private void makeRotationRelative(VectorM3f direction){ - if (variant.isRotated()) - direction.transform(variant.getRotationMatrix()); + if (variant.isTransformed()) + direction.rotateAndScale(variant.getTransformMatrix()); } private float testAo(VectorM3f vertex, Direction dir){ diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityModelRenderer.java new file mode 100644 index 000000000..ebcb9f80b --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityModelRenderer.java @@ -0,0 +1,71 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.map.hires.entity; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import de.bluecolored.bluemap.core.map.TextureGallery; +import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.TileModelView; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate.EntityState; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate.Part; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; + +public class EntityModelRenderer { + + private final ResourcePack resourcePack; + private final LoadingCache entityRenderers; + + public EntityModelRenderer(ResourcePack resourcePack, TextureGallery textureGallery, RenderSettings renderSettings) { + this.resourcePack = resourcePack; + this.entityRenderers = Caffeine.newBuilder() + .build(type -> type.create(resourcePack, textureGallery, renderSettings)); + } + + public void render(Entity entity, BlockNeighborhood block, TileModelView tileModel) { + EntityState stateResource = resourcePack.getEntityState(entity.getId()); + if (stateResource == null) return; + + Part[] parts = stateResource.getParts(); + if (parts.length == 0) return; + + int modelStart = tileModel.getStart(); + + //noinspection ForLoopReplaceableByForEach + for (int i = 0; i < parts.length; i++) { + Part part = parts[i]; + entityRenderers.get(part.getRenderer()) + .render(entity, block, part, tileModel.initialize()); + } + + tileModel.initialize(modelStart); + + // apply entity rotation + tileModel.rotate(entity.getRotation().getY(), entity.getRotation().getX(), 0f); + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRenderer.java new file mode 100644 index 000000000..b3adac7ea --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRenderer.java @@ -0,0 +1,50 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.map.hires.entity; + +import de.bluecolored.bluemap.core.map.hires.TileModelView; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate.Part; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; + +public interface EntityRenderer { + + /** + * Renders the given entities part into the given model. + *

+ * Implementation Note:
+ * This method is guaranteed to be called only on one thread per EntityRenderer instance, so you can use this + * for optimizations.
+ * Keep in mind this method will be called once for every block that is being rendered, so be very careful + * about performance and instance-creations. + *

+ * @param entity The entity information that should be rendered. + * @param block the block-position the entity lives at. + * @param part The entity part that should be rendered. + * @param tileModel The model(-view) where the block should be rendered to. + */ + void render(Entity entity, BlockNeighborhood block, Part part, TileModelView tileModel); + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRendererFactory.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRendererFactory.java new file mode 100644 index 000000000..cc1a1c76e --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRendererFactory.java @@ -0,0 +1,35 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.map.hires.entity; + +import de.bluecolored.bluemap.core.map.TextureGallery; +import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; + +public interface EntityRendererFactory { + + EntityRenderer create(ResourcePack resourcePack, TextureGallery textureGallery, RenderSettings renderSettings); + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRendererType.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRendererType.java new file mode 100644 index 000000000..07309ae69 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/EntityRendererType.java @@ -0,0 +1,77 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.map.hires.entity; + +import de.bluecolored.bluemap.core.map.TextureGallery; +import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.block.LiquidModelRenderer; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; +import de.bluecolored.bluemap.core.util.Key; +import de.bluecolored.bluemap.core.util.Keyed; +import de.bluecolored.bluemap.core.util.Registry; +import de.bluecolored.bluemap.core.world.BlockState; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +public interface EntityRendererType extends Keyed, EntityRendererFactory { + + EntityRendererType DEFAULT = new Impl(Key.bluemap("default"), ResourceModelRenderer::new); + EntityRendererType MISSING = new Impl(Key.bluemap("missing"), MissingModelRenderer::new); + + Registry REGISTRY = new Registry<>( + DEFAULT, + MISSING + ); + + /** + * If the loaded resourcepack does not have any resources for this entity, this method will be called. + * If this method returns true, this renderer will be used to render the entity instead. + * + *

+ * This can (and should only then) be used to provide a way of rendering entities that are completely dynamically + * created by a mod, and there is no way to provide static entity resources that point at the correct renderer. + *

+ * + * @param entityType The entity-type {@link Key} that was not found in the loaded resources. + * @return true if this renderer-type can render the provided entity-type {@link Key} despite missing resources. + */ + default boolean isFallbackFor(Key entityType) { + return false; + } + + @RequiredArgsConstructor + class Impl implements EntityRendererType { + + @Getter private final Key key; + private final EntityRendererFactory rendererFactory; + + @Override + public EntityRenderer create(ResourcePack resourcePack, TextureGallery textureGallery, RenderSettings renderSettings) { + return rendererFactory.create(resourcePack, textureGallery, renderSettings); + } + + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/MissingModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/MissingModelRenderer.java new file mode 100644 index 000000000..c7b64ff5c --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/MissingModelRenderer.java @@ -0,0 +1,64 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.map.hires.entity; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.map.TextureGallery; +import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.TileModelView; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate.Part; +import de.bluecolored.bluemap.core.util.Key; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; + +public class MissingModelRenderer implements EntityRenderer { + + private static final LoadingCache ENTITY_RENDERER_TYPES = Caffeine.newBuilder() + .maximumSize(1000) + .build(entityType -> { + for (EntityRendererType type : EntityRendererType.REGISTRY.values()) + if (type.isFallbackFor(entityType)) return type; + + Logger.global.logDebug("No renderer found for entity type: " + entityType); + return EntityRendererType.DEFAULT; + }); + + private final LoadingCache entityRenderers; + + public MissingModelRenderer(ResourcePack resourcePack, TextureGallery textureGallery, RenderSettings renderSettings) { + this.entityRenderers = Caffeine.newBuilder() + .build(type -> type.create(resourcePack, textureGallery, renderSettings)); + } + + @Override + public void render(Entity entity, BlockNeighborhood block, Part part, TileModelView tileModel) { + entityRenderers.get(ENTITY_RENDERER_TYPES.get(entity.getId())) + .render(entity, block, part, tileModel); + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/ResourceModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/ResourceModelRenderer.java new file mode 100644 index 000000000..238a7203f --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/entity/ResourceModelRenderer.java @@ -0,0 +1,257 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.map.hires.entity; + +import com.flowpowered.math.vector.Vector3f; +import com.flowpowered.math.vector.Vector4f; +import de.bluecolored.bluemap.core.map.TextureGallery; +import de.bluecolored.bluemap.core.map.hires.RenderSettings; +import de.bluecolored.bluemap.core.map.hires.TileModel; +import de.bluecolored.bluemap.core.map.hires.TileModelView; +import de.bluecolored.bluemap.core.resources.ResourcePath; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate.Part; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Element; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Face; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Model; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.Texture; +import de.bluecolored.bluemap.core.util.Direction; +import de.bluecolored.bluemap.core.util.math.Color; +import de.bluecolored.bluemap.core.util.math.MatrixM4f; +import de.bluecolored.bluemap.core.util.math.VectorM2f; +import de.bluecolored.bluemap.core.util.math.VectorM3f; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluemap.core.world.LightData; +import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; + +/** + * This model builder creates a BlockStateModel using the information from parsed resource-pack json files. + */ +@SuppressWarnings("DuplicatedCode") +public class ResourceModelRenderer implements EntityRenderer { + private static final float SCALE = 1f / 16f; + + final ResourcePack resourcePack; + final TextureGallery textureGallery; + final RenderSettings renderSettings; + + private final VectorM3f[] corners = new VectorM3f[8]; + private final VectorM2f[] rawUvs = new VectorM2f[4]; + private final VectorM2f[] uvs = new VectorM2f[4]; + private final Color tintColor = new Color(); + + private Model modelResource; + private TileModelView tileModel; + private int sunLight, blockLight; + private TintColorProvider tintProvider; + + @SuppressWarnings("unused") + public ResourceModelRenderer(ResourcePack resourcePack, TextureGallery textureGallery, RenderSettings renderSettings) { + this.resourcePack = resourcePack; + this.textureGallery = textureGallery; + this.renderSettings = renderSettings; + + for (int i = 0; i < corners.length; i++) corners[i] = new VectorM3f(0, 0, 0); + for (int i = 0; i < rawUvs.length; i++) rawUvs[i] = new VectorM2f(0, 0); + } + + @Override + public void render(Entity entity, BlockNeighborhood block, Part part, TileModelView tileModel) { + render( + entity, + block, + part.getModel().getResource(resourcePack::getModel), + TintColorProvider.NO_TINT, + tileModel + ); + + // apply transform + if (part.isTransformed()) + tileModel.transform(part.getTransformMatrix()); + } + + void render(Entity entity, BlockNeighborhood block, Model model, TintColorProvider tintProvider, TileModelView tileModel) { + this.modelResource = model; + this.tileModel = tileModel; + this.tintProvider = tintProvider; + + // light calculation + LightData blockLightData = block.getLightData(); + this.sunLight = blockLightData.getSkyLight(); + this.blockLight = blockLightData.getBlockLight(); + + // filter out entities that are in a "cave" that should not be rendered + if ( + block.isRemoveIfCave() && + (renderSettings.isCaveDetectionUsesBlockLight() ? Math.max(blockLight, sunLight) : sunLight) == 0 + ) return; + + // render model + int modelStart = this.tileModel.getStart(); + + Element[] elements = modelResource.getElements(); + if (elements != null) { + for (Element element : elements) { + buildModelElementResource(element, this.tileModel.initialize()); + } + } + + this.tileModel.initialize(modelStart); + + } + + private final MatrixM4f modelElementTransform = new MatrixM4f(); + private void buildModelElementResource(Element element, TileModelView blockModel) { + + //create faces + Vector3f from = element.getFrom(); + Vector3f to = element.getTo(); + + float + minX = Math.min(from.getX(), to.getX()), + minY = Math.min(from.getY(), to.getY()), + minZ = Math.min(from.getZ(), to.getZ()), + maxX = Math.max(from.getX(), to.getX()), + maxY = Math.max(from.getY(), to.getY()), + maxZ = Math.max(from.getZ(), to.getZ()); + + VectorM3f[] c = corners; + c[0].x = minX; c[0].y = minY; c[0].z = minZ; + c[1].x = minX; c[1].y = minY; c[1].z = maxZ; + c[2].x = maxX; c[2].y = minY; c[2].z = minZ; + c[3].x = maxX; c[3].y = minY; c[3].z = maxZ; + c[4].x = minX; c[4].y = maxY; c[4].z = minZ; + c[5].x = minX; c[5].y = maxY; c[5].z = maxZ; + c[6].x = maxX; c[6].y = maxY; c[6].z = minZ; + c[7].x = maxX; c[7].y = maxY; c[7].z = maxZ; + + int modelStart = blockModel.getStart(); + createElementFace(element, Direction.DOWN, c[0], c[2], c[3], c[1]); + createElementFace(element, Direction.UP, c[5], c[7], c[6], c[4]); + createElementFace(element, Direction.NORTH, c[2], c[0], c[4], c[6]); + createElementFace(element, Direction.SOUTH, c[1], c[3], c[7], c[5]); + createElementFace(element, Direction.WEST, c[0], c[1], c[5], c[4]); + createElementFace(element, Direction.EAST, c[3], c[2], c[6], c[7]); + blockModel.initialize(modelStart); + + //rotate and scale down + blockModel.transform(modelElementTransform + .copy(element.getRotation().getMatrix()) + .scale(SCALE, SCALE, SCALE) + ); + } + + private void createElementFace(Element element, Direction faceDir, VectorM3f c0, VectorM3f c1, VectorM3f c2, VectorM3f c3) { + Face face = element.getFaces().get(faceDir); + if (face == null) return; + + // initialize the faces + tileModel.initialize(); + tileModel.add(2); + + TileModel tileModel = this.tileModel.getTileModel(); + int face1 = this.tileModel.getStart(); + int face2 = face1 + 1; + + // ####### positions + tileModel.setPositions(face1, + c0.x, c0.y, c0.z, + c1.x, c1.y, c1.z, + c2.x, c2.y, c2.z + ); + tileModel.setPositions(face2, + c0.x, c0.y, c0.z, + c2.x, c2.y, c2.z, + c3.x, c3.y, c3.z + ); + + // ####### texture + ResourcePath texturePath = face.getTexture().getTexturePath(modelResource.getTextures()::get); + int textureId = textureGallery.get(texturePath); + tileModel.setMaterialIndex(face1, textureId); + tileModel.setMaterialIndex(face2, textureId); + + // ####### UV + Vector4f uvRaw = face.getUv(); + float + uvx = uvRaw.getX() / 16f, + uvy = uvRaw.getY() / 16f, + uvz = uvRaw.getZ() / 16f, + uvw = uvRaw.getW() / 16f; + + rawUvs[0].set(uvx, uvw); + rawUvs[1].set(uvz, uvw); + rawUvs[2].set(uvz, uvy); + rawUvs[3].set(uvx, uvy); + + // face-rotation + int rotationSteps = Math.floorDiv(face.getRotation(), 90) % 4; + if (rotationSteps < 0) rotationSteps += 4; + for (int i = 0; i < 4; i++) + uvs[i] = rawUvs[(rotationSteps + i) % 4]; + + tileModel.setUvs(face1, + uvs[0].x, uvs[0].y, + uvs[1].x, uvs[1].y, + uvs[2].x, uvs[2].y + ); + + tileModel.setUvs(face2, + uvs[0].x, uvs[0].y, + uvs[2].x, uvs[2].y, + uvs[3].x, uvs[3].y + ); + + // ####### face-tint + if (face.getTintindex() >= 0) { + tintProvider.setTintColor(face.getTintindex(), tintColor); + tileModel.setColor(face1, tintColor.r, tintColor.g, tintColor.b); + tileModel.setColor(face2, tintColor.r, tintColor.g, tintColor.b); + } else { + tileModel.setColor(face1, 1f, 1f, 1f); + tileModel.setColor(face2, 1f, 1f, 1f); + } + + // ####### blocklight + int emissiveBlockLight = Math.max(blockLight, element.getLightEmission()); + tileModel.setBlocklight(face1, emissiveBlockLight); + tileModel.setBlocklight(face2, emissiveBlockLight); + + // ####### sunlight + tileModel.setSunlight(face1, sunLight); + tileModel.setSunlight(face2, sunLight); + + // ######## AO + tileModel.setAOs(face1, 1f, 1f, 1f); + tileModel.setAOs(face2, 1f, 1f, 1f); + + } + + interface TintColorProvider { + TintColorProvider NO_TINT = (index, color) -> color.set(1f, 1f, 1f, 1f, true); + void setTintColor(int tintIndex, Color target); + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java index 41282d944..15e7a172a 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java @@ -28,7 +28,7 @@ import com.google.gson.stream.JsonReader; import de.bluecolored.bluemap.core.util.math.Color; import de.bluecolored.bluemap.core.world.biome.Biome; -import de.bluecolored.bluemap.core.world.block.Block; +import de.bluecolored.bluemap.core.world.block.BlockAccess; import de.bluecolored.bluemap.core.world.block.BlockNeighborhood; import java.awt.image.BufferedImage; @@ -114,7 +114,7 @@ public BlockColorCalculator createCalculator() { @FunctionalInterface private interface ColorFunction { - Color invoke(BlockColorCalculator calculator, BlockNeighborhood block, Color target); + Color invoke(BlockColorCalculator calculator, BlockNeighborhood block, Color target); } public class BlockColorCalculator { @@ -122,7 +122,7 @@ public class BlockColorCalculator { private final Color tempColor = new Color(); @SuppressWarnings("UnusedReturnValue") - public Color getBlockColor(BlockNeighborhood block, Color target) { + public Color getBlockColor(BlockNeighborhood block, Color target) { String blockId = block.getBlockState().getFormatted(); ColorFunction colorFunction = blockColorMap.get(blockId); @@ -132,7 +132,7 @@ public Color getBlockColor(BlockNeighborhood block, Color target) { return colorFunction.invoke(this, block, target); } - public Color getRedstoneColor(Block block, Color target) { + public Color getRedstoneColor(BlockAccess block, Color target) { int power = block.getBlockState().getRedstonePower(); return target.set( (power + 5f) / 20f, 0f, 0f, @@ -140,7 +140,7 @@ public Color getRedstoneColor(Block block, Color target) { ); } - public Color getBlendedWaterColor(BlockNeighborhood block, Color target) { + public Color getBlendedWaterColor(BlockNeighborhood block, Color target) { target.set(0, 0, 0, 0, true); int x, y, z; @@ -158,7 +158,7 @@ public Color getBlendedWaterColor(BlockNeighborhood block, Color target) { return target.flatten(); } - public Color getBlendedFoliageColor(BlockNeighborhood block, Color target) { + public Color getBlendedFoliageColor(BlockNeighborhood block, Color target) { target.set(0, 0, 0, 0, true); int x, y, z; @@ -181,7 +181,7 @@ public Color getFoliageColor(Biome biome, Color target) { return target.overlay(biome.getOverlayFoliageColor()); } - public Color getBlendedGrassColor(BlockNeighborhood block, Color target) { + public Color getBlendedGrassColor(BlockNeighborhood block, Color target) { target.set(0, 0, 0, 0, true); int x, y, z; @@ -197,7 +197,7 @@ public Color getBlendedGrassColor(BlockNeighborhood block, Color target) { return target.flatten(); } - public Color getGrassColor(Block block, Color target) { + public Color getGrassColor(BlockAccess block, Color target) { Biome biome = block.getBiome(); getColorFromMap(biome, grassMap, 0xff52952f, target); target.overlay(biome.getOverlayGrassColor()); diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java index e22c29db3..a62596bfd 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java @@ -29,8 +29,9 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; -import de.bluecolored.bluemap.core.map.hires.blockmodel.BlockRendererType; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.Face; +import de.bluecolored.bluemap.core.map.hires.block.BlockRendererType; +import de.bluecolored.bluemap.core.map.hires.entity.EntityRendererType; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Face; import de.bluecolored.bluemap.core.util.Direction; import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.util.math.Axis; @@ -70,6 +71,11 @@ public static GsonBuilder addAdapter(GsonBuilder builder) { BlockRendererType.REGISTRY, Key.BLUEMAP_NAMESPACE, BlockRendererType.DEFAULT + )) + .registerTypeAdapter(EntityRendererType.class, new RegistryAdapter<>( + EntityRendererType.REGISTRY, + Key.BLUEMAP_NAMESPACE, + EntityRendererType.DEFAULT )); } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java index 700f0c9c8..e3481161a 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java @@ -33,11 +33,13 @@ import de.bluecolored.bluemap.core.resources.ResourcePath; import de.bluecolored.bluemap.core.resources.adapter.ResourcesGson; import de.bluecolored.bluemap.core.resources.pack.Pack; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.BlockModel; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.TextureVariable; import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockstate.BlockState; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate.EntityState; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Model; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.TextureVariable; import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.AnimationMeta; import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.Texture; +import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.util.Tristate; import de.bluecolored.bluemap.core.world.BlockProperties; import org.jetbrains.annotations.Nullable; @@ -59,11 +61,14 @@ public class ResourcePack extends Pack { public static final ResourcePath MISSING_BLOCK_STATE = new ResourcePath<>("bluemap", "missing"); - public static final ResourcePath MISSING_BLOCK_MODEL = new ResourcePath<>("bluemap", "block/missing"); + public static final ResourcePath MISSING_ENTITY_STATE = new ResourcePath<>("bluemap", "missing"); + public static final ResourcePath MISSING_BLOCK_MODEL = new ResourcePath<>("bluemap", "block/missing"); + public static final ResourcePath MISSING_ENTITY_MODEL = new ResourcePath<>("bluemap", "entity/missing"); public static final ResourcePath MISSING_TEXTURE = new ResourcePath<>("bluemap", "block/missing"); private final Map, BlockState> blockStates; - private final Map, BlockModel> blockModels; + private final Map, EntityState> entityStates; + private final Map, Model> models; private final Map, Texture> textures; private final Map, BufferedImage> colormaps; @@ -73,19 +78,19 @@ public class ResourcePack extends Pack { private final Map, ResourcePackExtension> resourcePackExtensions; private final Map> blockStatePaths; + private final Map> entityStatePaths; private final Map> texturePaths; private final LoadingCache blockPropertiesCache; public ResourcePack(int packVersion) { super(packVersion); - this.blockStatePaths = new HashMap<>(); this.blockStates = new HashMap<>(); - this.blockModels = new HashMap<>(); - this.texturePaths = new HashMap<>(); + this.entityStates = new HashMap<>(); + this.models = new HashMap<>(); this.textures = new HashMap<>(); - this.colormaps = new HashMap<>(); + this.colormaps = new HashMap<>(); this.colorCalculatorFactory = new BlockColorCalculatorFactory(); this.blockPropertiesConfig = new BlockPropertiesConfig(); @@ -93,6 +98,9 @@ public ResourcePack(int packVersion) { for (ResourcePackExtensionType extensionType : ResourcePackExtensionType.REGISTRY.values()) resourcePackExtensions.put(extensionType, extensionType.create()); + this.blockStatePaths = new HashMap<>(); + this.entityStatePaths = new HashMap<>(); + this.texturePaths = new HashMap<>(); this.blockPropertiesCache = Caffeine.newBuilder() .executor(BlueMap.THREAD_POOL) .maximumSize(10000) @@ -145,7 +153,22 @@ private void loadResources(Path root) throws IOException { }, blockStates)); }, BlueMap.THREAD_POOL), - // load blockmodels + // load entitystates + CompletableFuture.runAsync(() -> { + list(root.resolve("assets")) + .map(path -> path.resolve("entitystates")) + .filter(Files::isDirectory) + .flatMap(ResourcePack::walk) + .filter(path -> path.getFileName().toString().endsWith(".json")) + .filter(Files::isRegularFile) + .forEach(file -> loadResource(root, file, 1, 3, key -> { + try (BufferedReader reader = Files.newBufferedReader(file)) { + return ResourcesGson.INSTANCE.fromJson(reader, EntityState.class); + } + }, entityStates)); + }, BlueMap.THREAD_POOL), + + // load models CompletableFuture.runAsync(() -> { list(root.resolve("assets")) .map(path -> path.resolve("models")) @@ -156,9 +179,9 @@ private void loadResources(Path root) throws IOException { .filter(Files::isRegularFile) .forEach(file -> loadResource(root, file, 1, 3, key -> { try (BufferedReader reader = Files.newBufferedReader(file)) { - return ResourcesGson.INSTANCE.fromJson(reader, BlockModel.class); + return ResourcesGson.INSTANCE.fromJson(reader, Model.class); } - }, blockModels)); + }, models)); }, BlueMap.THREAD_POOL), // load colormaps @@ -223,7 +246,7 @@ private void loadTextures(Path root) throws IOException { // collect all used textures Set> usedTextures = new HashSet<>(); usedTextures.add(MISSING_TEXTURE); - for (BlockModel model : blockModels.values()) { + for (Model model : models.values()) { for (TextureVariable textureVariable : model.getTextures().values()) { if (textureVariable.isReference()) continue; usedTextures.add(textureVariable.getTexturePath()); @@ -276,24 +299,25 @@ private void bake() throws IOException, InterruptedException { // fill path maps blockStates.keySet().forEach(path -> blockStatePaths.put(path.getFormatted(), path)); + entityStates.keySet().forEach(path -> entityStatePaths.put(path, path)); textures.keySet().forEach(path -> texturePaths.put(path.getFormatted(), path)); // optimize references - for (BlockModel model : blockModels.values()) { + for (Model model : models.values()) { model.optimize(this); } if (Thread.interrupted()) throw new InterruptedException(); // apply model parents - for (BlockModel model : blockModels.values()) { + for (Model model : models.values()) { model.applyParent(this); } if (Thread.interrupted()) throw new InterruptedException(); // calculate model properties - for (BlockModel model : blockModels.values()) { + for (Model model : models.values()) { model.calculateProperties(this); } @@ -322,9 +346,19 @@ private void bake() throws IOException, InterruptedException { return blockState != null ? blockState : MISSING_BLOCK_STATE.getResource(blockStates::get); } - public @Nullable BlockModel getBlockModel(ResourcePath path) { - BlockModel blockModel = blockModels.get(path); - return blockModel != null ? blockModel : MISSING_BLOCK_MODEL.getResource(blockModels::get); + public @Nullable EntityState getEntityState(Key entityId) { + ResourcePath path = entityStatePaths.get(entityId); + return path != null ? path.getResource(this::getEntityState) : MISSING_ENTITY_STATE.getResource(this::getEntityState); + } + + public @Nullable EntityState getEntityState(ResourcePath path) { + EntityState entityState = entityStates.get(path); + return entityState != null ? entityState : MISSING_ENTITY_STATE.getResource(entityStates::get); + } + + public @Nullable Model getModel(ResourcePath path) { + Model model = models.get(path); + return model != null ? model : MISSING_BLOCK_MODEL.getResource(models::get); } public @Nullable ResourcePath getTexturePath(String formatted) { @@ -355,7 +389,7 @@ private BlockProperties loadBlockProperties(de.bluecolored.bluemap.core.world.Bl BlockState resource = getBlockState(state); if (resource != null) { resource.forEach(state,0, 0, 0, variant -> { - BlockModel model = variant.getModel().getResource(this::getBlockModel); + Model model = variant.getModel().getResource(this::getModel); if (model != null) { if (props.isOccluding() == Tristate.UNDEFINED) props.occluding(model.isOccluding()); if (props.isCulling() == Tristate.UNDEFINED) props.culling(model.isCulling()); diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java index aefb0bf88..12a91d385 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java @@ -28,59 +28,39 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; +import de.bluecolored.bluemap.core.map.hires.block.BlockRendererType; import de.bluecolored.bluemap.core.resources.AbstractTypeAdapterFactory; import de.bluecolored.bluemap.core.resources.ResourcePath; -import de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel.BlockModel; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Model; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.util.math.MatrixM3f; +import de.bluecolored.bluemap.core.util.math.MatrixM4f; +import lombok.Getter; import java.io.IOException; @SuppressWarnings({"FieldMayBeFinal", "FieldCanBeLocal"}) @JsonAdapter(Variant.Adapter.class) +@Getter public class Variant { - private ResourcePath model = ResourcePack.MISSING_BLOCK_MODEL; + private BlockRendererType renderer = BlockRendererType.DEFAULT; + private ResourcePath model = ResourcePack.MISSING_BLOCK_MODEL; private float x = 0, y = 0; private boolean uvlock = false; private double weight = 1; - private transient boolean rotated; - private transient MatrixM3f rotationMatrix; + private transient boolean transformed; + private transient MatrixM4f transformMatrix; private Variant(){} private void init() { - this.rotated = x != 0 || y != 0; - this.rotationMatrix = new MatrixM3f().rotate(-x, -y, 0); - } - - public ResourcePath getModel() { - return model; - } - - public float getX() { - return x; - } - - public float getY() { - return y; - } - - public boolean isUvlock() { - return uvlock; - } - - public double getWeight() { - return weight; - } - - public boolean isRotated() { - return rotated; - } - - public MatrixM3f getRotationMatrix() { - return rotationMatrix; + this.transformed = x != 0 || y != 0; + this.transformMatrix = new MatrixM4f() + .translate(-0.5f, -0.5f, -0.5f) + .rotate(-x, -y, 0) + .translate(0.5f, 0.5f, 0.5f); } static class Adapter extends AbstractTypeAdapterFactory { diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/entitystate/EntityState.java similarity index 86% rename from core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/entitystate/EntityState.java index bf76ab4fe..ac39df8b5 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/entitystate/EntityState.java @@ -22,12 +22,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.world.block.entity; +package de.bluecolored.bluemap.core.resources.pack.resourcepack.entitystate; -import java.util.Map; +import lombok.Getter; -public interface BlockEntityLoader { +@SuppressWarnings("FieldMayBeFinal") +@Getter +public class EntityState { - BlockEntity load(Map raw); + private Part[] parts; } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/entitystate/Part.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/entitystate/Part.java new file mode 100644 index 000000000..4d4bb519a --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/entitystate/Part.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.core.resources.pack.resourcepack.entitystate; + +import com.flowpowered.math.vector.Vector3f; +import com.google.gson.Gson; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import de.bluecolored.bluemap.core.map.hires.entity.EntityRendererType; +import de.bluecolored.bluemap.core.resources.AbstractTypeAdapterFactory; +import de.bluecolored.bluemap.core.resources.ResourcePath; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; +import de.bluecolored.bluemap.core.resources.pack.resourcepack.model.Model; +import de.bluecolored.bluemap.core.util.math.MatrixM4f; +import lombok.Getter; + +import java.io.IOException; + +@SuppressWarnings("FieldMayBeFinal") +@JsonAdapter(Part.Adapter.class) +@Getter +public class Part { + + private EntityRendererType renderer = EntityRendererType.DEFAULT; + private ResourcePath model = ResourcePack.MISSING_ENTITY_MODEL; + private Vector3f position = Vector3f.ZERO; + private Vector3f rotation = Vector3f.ZERO; + + private transient boolean transformed; + private transient MatrixM4f transformMatrix; + + private Part(){} + + private void init() { + this.transformed = !position.equals(Vector3f.ZERO) || !rotation.equals(Vector3f.ZERO); + this.transformMatrix = new MatrixM4f() + .rotate(rotation.getX(), rotation.getY(), rotation.getZ()) + .translate(position.getX(), position.getY(), position.getZ()); + } + + static class Adapter extends AbstractTypeAdapterFactory { + + public Adapter() { + super(Part.class); + } + + @Override + public Part read(JsonReader in, Gson gson) throws IOException { + Part part = gson.getDelegateAdapter(this, TypeToken.get(Part.class)).read(in); + part.init(); + return part; + } + + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Element.java similarity index 68% rename from core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Element.java index 38ce530bd..4e39b9511 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Element.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel; +package de.bluecolored.bluemap.core.resources.pack.resourcepack.model; import com.flowpowered.math.vector.Vector3f; import com.flowpowered.math.vector.Vector4f; @@ -33,12 +33,14 @@ import de.bluecolored.bluemap.core.resources.AbstractTypeAdapterFactory; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.util.Direction; +import lombok.Getter; import java.io.IOException; import java.util.EnumMap; @SuppressWarnings({"FieldMayBeFinal", "FieldCanBeLocal"}) @JsonAdapter(Element.Adapter.class) +@Getter public class Element { private static final Vector3f FULL_BLOCK_MIN = Vector3f.ZERO; private static final Vector3f FULL_BLOCK_MAX = new Vector3f(16, 16, 16); @@ -67,79 +69,31 @@ private void init() { } private Vector4f calculateDefaultUV(Direction face) { - switch (face){ - - case DOWN : - case UP : - return new Vector4f( - from.getX(), from.getZ(), - to.getX(), to.getZ() - ); - - case NORTH : - case SOUTH : - return new Vector4f( - from.getX(), from.getY(), - to.getX(), to.getY() - ); - - case WEST : - case EAST : - return new Vector4f( - from.getZ(), from.getY(), - to.getZ(), to.getY() - ); - - default : - return new Vector4f( - 0, 0, - 16, 16 - ); - - } + return switch (face) { + case DOWN, UP -> new Vector4f( + from.getX(), from.getZ(), + to.getX(), to.getZ() + ); + case NORTH, SOUTH -> new Vector4f( + from.getX(), from.getY(), + to.getX(), to.getY() + ); + case WEST, EAST -> new Vector4f( + from.getZ(), from.getY(), + to.getZ(), to.getY() + ); + }; } private Direction calculateDefaultCullface(Direction face) { - switch (face) { - case DOWN: - return from.getY() == 0f ? Direction.DOWN : null; - case UP: - return to.getY() == 1f ? Direction.UP : null; - case NORTH: - return from.getZ() == 0f ? Direction.NORTH : null; - case SOUTH: - return to.getZ() == 1f ? Direction.SOUTH : null; - case EAST: - return to.getX() == 1f ? Direction.EAST : null; - case WEST: - return from.getX() == 0f ? Direction.WEST : null; - default: - return null; - } - } - - public Vector3f getFrom() { - return from; - } - - public Vector3f getTo() { - return to; - } - - public Rotation getRotation() { - return rotation; - } - - public boolean isShade() { - return shade; - } - - public int getLightEmission() { - return lightEmission; - } - - public EnumMap getFaces() { - return faces; + return switch (face) { + case DOWN -> from.getY() == 0f ? Direction.DOWN : null; + case UP -> to.getY() == 1f ? Direction.UP : null; + case NORTH -> from.getZ() == 0f ? Direction.NORTH : null; + case SOUTH -> to.getZ() == 1f ? Direction.SOUTH : null; + case EAST -> to.getX() == 1f ? Direction.EAST : null; + case WEST -> from.getX() == 0f ? Direction.WEST : null; + }; } public Element copy() { diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Face.java similarity index 88% rename from core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Face.java index 2b9c42a30..16505a3fc 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Face.java @@ -22,15 +22,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel; +package de.bluecolored.bluemap.core.resources.pack.resourcepack.model; import com.flowpowered.math.vector.Vector4f; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.util.Direction; +import lombok.Getter; import java.util.function.Function; @SuppressWarnings({"FieldMayBeFinal", "FieldCanBeLocal"}) +@Getter public class Face { private static final TextureVariable DEFAULT_TEXTURE = new TextureVariable(ResourcePack.MISSING_TEXTURE); @@ -57,26 +59,6 @@ void init(Direction direction, Function defaultUvCalculator if (uv == null) uv = defaultUvCalculator.apply(direction); } - public Vector4f getUv() { - return uv; - } - - public TextureVariable getTexture() { - return texture; - } - - public Direction getCullface() { - return cullface; - } - - public int getRotation() { - return rotation; - } - - public int getTintindex() { - return tintindex; - } - public Face copy() { return new Face(this); } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Model.java similarity index 81% rename from core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Model.java index c26a5b20f..18852aa9b 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Model.java @@ -22,62 +22,31 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel; +package de.bluecolored.bluemap.core.resources.pack.resourcepack.model; -import de.bluecolored.bluemap.core.map.hires.blockmodel.BlockRendererType; import de.bluecolored.bluemap.core.resources.ResourcePath; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.Texture; import de.bluecolored.bluemap.core.util.Direction; +import lombok.Getter; import org.jetbrains.annotations.Nullable; import java.util.HashMap; import java.util.Map; @SuppressWarnings({"FieldMayBeFinal", "FieldCanBeLocal"}) -public class BlockModel { +@Getter +public class Model { - private BlockRendererType renderer = BlockRendererType.DEFAULT; - - private ResourcePath parent; + private @Nullable ResourcePath parent; private Map textures = new HashMap<>(); - private Element[] elements; + private Element @Nullable [] elements; private boolean ambientocclusion = true; private transient boolean culling = false; private transient boolean occluding = false; - private BlockModel(){} - - public BlockRendererType getRenderer() { - return renderer; - } - - @Nullable - public ResourcePath getParent() { - return parent; - } - - public Map getTextures() { - return textures; - } - - @Nullable - public Element[] getElements() { - return elements; - } - - public boolean isAmbientocclusion() { - return ambientocclusion; - } - - public boolean isCulling() { - return culling; - } - - public boolean isOccluding() { - return occluding; - } + private Model(){} public synchronized void optimize(ResourcePack resourcePack) { for (var variable : this.textures.values()) { @@ -95,10 +64,10 @@ public synchronized void applyParent(ResourcePack resourcePack) { if (this.parent == null) return; // set parent to null early to avoid trying to resolve reference-loops - ResourcePath parentPath = this.parent; + ResourcePath parentPath = this.parent; this.parent = null; - BlockModel parent = parentPath.getResource(resourcePack::getBlockModel); + Model parent = parentPath.getResource(resourcePack::getModel); if (parent != null) { parent.applyParent(resourcePack); diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Rotation.java similarity index 90% rename from core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Rotation.java index 47f0af128..7209cee27 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/Rotation.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel; +package de.bluecolored.bluemap.core.resources.pack.resourcepack.model; import com.flowpowered.math.TrigMath; import com.flowpowered.math.vector.Vector3f; @@ -34,19 +34,19 @@ import de.bluecolored.bluemap.core.resources.AbstractTypeAdapterFactory; import de.bluecolored.bluemap.core.util.math.Axis; import de.bluecolored.bluemap.core.util.math.MatrixM4f; +import lombok.Getter; import java.io.IOException; @SuppressWarnings("FieldMayBeFinal") @JsonAdapter(Rotation.Adapter.class) +@Getter public class Rotation { private static final Vector3f DEFAULT_ORIGIN = new Vector3f(8, 8, 8); private static final double FIT_TO_BLOCK_SCALE_MULTIPLIER = 2 - Math.sqrt(2); public static final Rotation ZERO = new Rotation(); - static { - ZERO.init(); - } + static { ZERO.init(); } private Vector3f origin = DEFAULT_ORIGIN; private Axis axis = Axis.Y; @@ -83,26 +83,6 @@ private void init() { } } - public Vector3f getOrigin() { - return origin; - } - - public Axis getAxis() { - return axis; - } - - public double getAngle() { - return angle; - } - - public boolean isRescale() { - return rescale; - } - - public MatrixM4f getMatrix() { - return matrix; - } - static class Adapter extends AbstractTypeAdapterFactory { public Adapter() { diff --git a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/TextureVariable.java similarity index 91% rename from core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/TextureVariable.java index 8d2e397ed..dbdaa392d 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/model/TextureVariable.java @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.resources.pack.resourcepack.blockmodel; +package de.bluecolored.bluemap.core.resources.pack.resourcepack.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -31,6 +31,8 @@ import de.bluecolored.bluemap.core.resources.ResourcePath; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.resources.pack.resourcepack.texture.Texture; +import lombok.Getter; +import lombok.Setter; import org.jetbrains.annotations.Nullable; import java.io.IOException; @@ -40,7 +42,10 @@ @JsonAdapter(TextureVariable.Adapter.class) public class TextureVariable { - private String referenceName; + @Getter @Setter + private @Nullable String referenceName; + + @Getter @Setter private ResourcePath texturePath; private transient volatile boolean isReference, isResolving; @@ -66,20 +71,6 @@ public TextureVariable(ResourcePath texturePath) { this.isResolving = false; } - @Nullable - public String getReferenceName() { - return referenceName; - } - - public void setReferenceName(String referenceName) { - this.referenceName = referenceName; - } - - @Nullable - public ResourcePath getTexturePath() { - return texturePath; - } - @Nullable public ResourcePath getTexturePath(Function supplier) { if (this.isReference) return resolveTexturePath(supplier); @@ -105,10 +96,6 @@ private ResourcePath resolveTexturePath(Function texturePath) { - this.texturePath = texturePath; - } - public boolean isReference() { return isReference; } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/BlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/BlockEntity.java new file mode 100644 index 000000000..c81c18613 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/BlockEntity.java @@ -0,0 +1,39 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world; + +import de.bluecolored.bluemap.core.util.Key; + +public interface BlockEntity { + + Key getId(); + + int getX(); + int getY(); + int getZ(); + + boolean isKeepPacked(); + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java b/core/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java index 0228becf1..4dcdda671 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java @@ -25,7 +25,6 @@ package de.bluecolored.bluemap.core.world; import de.bluecolored.bluemap.core.world.biome.Biome; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; import org.jetbrains.annotations.Nullable; import java.util.function.Consumer; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/Entity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/Entity.java new file mode 100644 index 000000000..328d1c134 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/Entity.java @@ -0,0 +1,49 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world; + +import com.flowpowered.math.vector.Vector2f; +import com.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluemap.core.util.Key; + +import java.util.UUID; + +public interface Entity { + + Key getId(); + + UUID getUuid(); + + String getCustomName(); + + boolean isCustomNameVisible(); + + Vector3d getPos(); + + Vector3d getMotion(); + + Vector2f getRotation(); + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/World.java b/core/src/main/java/de/bluecolored/bluemap/core/world/World.java index bd495ef16..27382bca0 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/World.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/World.java @@ -29,10 +29,12 @@ import de.bluecolored.bluemap.core.util.Grid; import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.util.WatchService; +import de.bluecolored.bluemap.core.world.block.BlockAccess; import java.io.IOException; import java.nio.file.Path; import java.util.Collection; +import java.util.function.Consumer; import java.util.function.Predicate; /** @@ -107,6 +109,8 @@ default void preloadRegionChunks(int x, int z) { */ void invalidateChunkCache(int x, int z); + void iterateEntities(int minX, int minZ, int maxX, int maxZ, Consumer entityConsumer); + /** * Generates a unique world-id based on a world-folder and a dimension */ diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java index d46a74509..37c545dd3 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java @@ -25,10 +25,10 @@ package de.bluecolored.bluemap.core.world.biome; import de.bluecolored.bluemap.core.util.math.Color; -import de.bluecolored.bluemap.core.world.block.Block; +import de.bluecolored.bluemap.core.world.block.BlockAccess; public interface ColorModifier { - void apply(Block block, Color color); + void apply(BlockAccess block, Color color); } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java index f94a2ceba..f4a5f5e26 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java @@ -28,17 +28,17 @@ import de.bluecolored.bluemap.core.util.Keyed; import de.bluecolored.bluemap.core.util.Registry; import de.bluecolored.bluemap.core.util.math.Color; -import de.bluecolored.bluemap.core.world.block.Block; +import de.bluecolored.bluemap.core.world.block.BlockAccess; import lombok.Getter; import lombok.RequiredArgsConstructor; public interface GrassColorModifier extends Keyed, ColorModifier { - GrassColorModifier NONE = new Impl(Key.minecraft("none"), (Block block, Color color) -> {}); - GrassColorModifier DARK_FOREST = new Impl(Key.minecraft("dark_forest"), (Block block, Color color) -> + GrassColorModifier NONE = new Impl(Key.minecraft("none"), (BlockAccess block, Color color) -> {}); + GrassColorModifier DARK_FOREST = new Impl(Key.minecraft("dark_forest"), (BlockAccess block, Color color) -> color.set(((color.getInt() & 0xfefefe) + 0x28340a >> 1) | 0xff000000, true) ); - GrassColorModifier SWAMP = new Impl(Key.minecraft("swamp"), (Block block, Color color) -> { + GrassColorModifier SWAMP = new Impl(Key.minecraft("swamp"), (BlockAccess block, Color color) -> { color.set(0xff6a7039, true); /* Vanilla code with noise: @@ -63,7 +63,7 @@ class Impl implements GrassColorModifier { private final ColorModifier modifier; @Override - public void apply(Block block, Color color) { + public void apply(BlockAccess block, Color color) { modifier.apply(block, color); } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java index 7f5ec17cf..c5d3b7b9c 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java @@ -26,13 +26,13 @@ import de.bluecolored.bluemap.core.world.*; import de.bluecolored.bluemap.core.world.biome.Biome; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; +import lombok.Getter; import org.jetbrains.annotations.Nullable; -public class Block> { +public class Block implements BlockAccess { - private World world; - private int x, y, z; + @Getter private final World world; + @Getter private int x, y, z; private @Nullable Chunk chunk; @@ -44,29 +44,14 @@ public class Block> { private @Nullable BlockEntity blockEntity; public Block(World world, int x, int y, int z) { - set(world, x, y, z); - } - - public T set(World world, int x, int y, int z) { - if (this.x == x && this.z == z && this.world == world){ - if (this.y == y) return self(); - } else { - this.chunk = null; //only reset the chunk if x or z have changed - } - this.world = world; - this.x = x; - this.y = y; - this.z = z; - - reset(); - - return self(); + set(x, y, z); } - public T set(int x, int y, int z) { + @Override + public void set(int x, int y, int z) { if (this.x == x && this.z == z){ - if (this.y == y) return self(); + if (this.y == y) return; } else { this.chunk = null; //only reset the chunk if x or z have changed } @@ -75,12 +60,6 @@ public T set(int x, int y, int z) { this.y = y; this.z = z; - reset(); - - return self(); - } - - protected void reset() { this.blockState = null; this.lightData.set(-1, -1); this.biome = null; @@ -88,40 +67,9 @@ protected void reset() { this.blockEntity = null; } - public T add(int dx, int dy, int dz) { - return set(x + dx, y + dy, z + dz); - } - - public T copy(Block source) { - this.world = source.world; - this.chunk = source.chunk; - this.x = source.x; - this.y = source.y; - this.z = source.z; - - reset(); - - this.blockState = source.blockState; - this.lightData.set(source.lightData.getSkyLight(), source.lightData.getBlockLight()); - this.biome = source.biome; - - return self(); - } - - public World getWorld() { - return world; - } - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public int getZ() { - return z; + @Override + public BlockAccess copy() { + return new Block(world, x, y, z); } public Chunk getChunk() { @@ -129,29 +77,24 @@ public Chunk getChunk() { return chunk; } + @Override public BlockState getBlockState() { if (blockState == null) blockState = getChunk().getBlockState(x, y, z); return blockState; } + @Override public LightData getLightData() { if (lightData.getSkyLight() < 0) getChunk().getLightData(x, y, z, lightData); return lightData; } + @Override public Biome getBiome() { if (biome == null) biome = getChunk().getBiome(x, y, z); return biome; } - public int getSunLightLevel() { - return getLightData().getSkyLight(); - } - - public int getBlockLightLevel() { - return getLightData().getBlockLight(); - } - public @Nullable BlockEntity getBlockEntity() { if (!isBlockEntitySet) { blockEntity = getChunk().getBlockEntity(x, y, z); @@ -161,30 +104,13 @@ public int getBlockLightLevel() { } @Override - public String toString() { - if (world != null) { - return "Block{" + - "world=" + world + - ", x=" + x + - ", y=" + y + - ", z=" + z + - ", chunk=" + getChunk() + - ", blockState=" + getBlockState() + - ", lightData=" + getLightData() + - ", biome=" + getBiome() + - '}'; - } else { - return "Block{" + - "world=null" + - ", x=" + x + - ", y=" + y + - ", z=" + z + - '}'; - } + public boolean hasOceanFloorY() { + return getChunk().hasOceanFloorHeights(); } - @SuppressWarnings("unchecked") - protected T self() { - return (T) this; + @Override + public int getOceanFloorY() { + return getChunk().getOceanFloorY(x, z); } + } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockAccess.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockAccess.java new file mode 100644 index 000000000..c1217880b --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockAccess.java @@ -0,0 +1,61 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.block; + +import de.bluecolored.bluemap.core.world.BlockEntity; +import de.bluecolored.bluemap.core.world.BlockState; +import de.bluecolored.bluemap.core.world.LightData; +import de.bluecolored.bluemap.core.world.biome.Biome; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.Nullable; + +public interface BlockAccess { + + void set(int x, int y, int z); + + @Contract(" -> new") + BlockAccess copy(); + + int getX(); + int getY(); + int getZ(); + + BlockState getBlockState(); + LightData getLightData(); + Biome getBiome(); + @Nullable BlockEntity getBlockEntity(); + + boolean hasOceanFloorY(); + int getOceanFloorY(); + + default int getSunLightLevel() { + return getLightData().getSkyLight(); + } + + default int getBlockLightLevel() { + return getLightData().getBlockLight(); + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java index 82d112d78..d1bff37ad 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java @@ -26,61 +26,36 @@ import de.bluecolored.bluemap.core.map.hires.RenderSettings; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; -import de.bluecolored.bluemap.core.world.World; +import de.bluecolored.bluemap.core.world.DimensionType; -public class BlockNeighborhood> extends ExtendedBlock { +public class BlockNeighborhood extends ExtendedBlock { - private static final int DIAMETER = 8; + private static final int DIAMETER = 8; // must be a power of 2 private static final int DIAMETER_MASK = DIAMETER - 1; private static final int DIAMETER_SQUARED = DIAMETER * DIAMETER; - private final ExtendedBlock[] neighborhood; + private final ExtendedBlock[] neighborhood; - private int thisIndex; + private int thisIndex = -1; - public BlockNeighborhood(ExtendedBlock center) { - super(center.getResourcePack(), center.getRenderSettings(), null, 0, 0, 0); - copy(center); + public BlockNeighborhood(BlockAccess blockAccess, ResourcePack resourcePack, RenderSettings renderSettings, DimensionType dimensionType) { + super(blockAccess, resourcePack, renderSettings, dimensionType); - neighborhood = new ExtendedBlock[DIAMETER * DIAMETER * DIAMETER]; - init(); - } - - public BlockNeighborhood(ResourcePack resourcePack, RenderSettings renderSettings, World world, int x, int y, int z) { - super(resourcePack, renderSettings, world, x, y, z); - - neighborhood = new ExtendedBlock[DIAMETER * DIAMETER * DIAMETER]; - init(); + this.neighborhood = new ExtendedBlock[DIAMETER * DIAMETER * DIAMETER]; } @Override - public T set(int x, int y, int z) { - return copy(getBlock(x, y, z)); - } - - @Override - public T set(World world, int x, int y, int z) { - if (getWorld() == world) - return copy(getBlock(x, y, z)); - else - return super.set(world, x, y, z); - } - - @Override - protected void reset() { - super.reset(); - - this.thisIndex = -1; - } + public void set(int x, int y, int z) { + int i = index(x, y, z); + if (i == thisIndex()) return; - private void init() { - this.thisIndex = -1; - for (int i = 0; i < neighborhood.length; i++) { - neighborhood[i] = new ExtendedBlock<>(this.getResourcePack(), this.getRenderSettings(), null, 0, 0, 0); - } + if (neighborhood[i] == null) neighborhood[i] = copy(); + neighborhood[i].set(x, y, z); + copyFrom(neighborhood[i]); + this.thisIndex = i; } - public ExtendedBlock getNeighborBlock(int dx, int dy, int dz) { + public ExtendedBlock getNeighborBlock(int dx, int dy, int dz) { return getBlock( getX() + dx, getY() + dy, @@ -88,10 +63,13 @@ public ExtendedBlock getNeighborBlock(int dx, int dy, int dz) { ); } - private ExtendedBlock getBlock(int x, int y, int z) { + private ExtendedBlock getBlock(int x, int y, int z) { int i = index(x, y, z); if (i == thisIndex()) return this; - return neighborhood[i].set(getWorld(), x, y, z); + + if (neighborhood[i] == null) neighborhood[i] = copy(); + neighborhood[i].set(x, y, z); + return neighborhood[i]; } private int thisIndex() { diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java index ca7cb94f0..eb08c495b 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java @@ -27,71 +27,106 @@ import de.bluecolored.bluemap.core.map.hires.RenderSettings; import de.bluecolored.bluemap.core.resources.pack.resourcepack.ResourcePack; import de.bluecolored.bluemap.core.world.*; +import de.bluecolored.bluemap.core.world.biome.Biome; +import lombok.Getter; import org.jetbrains.annotations.Nullable; import java.util.Objects; -public class ExtendedBlock> extends Block { - private final ResourcePack resourcePack; - private final RenderSettings renderSettings; +public class ExtendedBlock implements BlockAccess { + + @Getter private int x, y, z; + private BlockAccess blockAccess; + + @Getter private ResourcePack resourcePack; + @Getter private RenderSettings renderSettings; + @Getter private DimensionType dimensionType; private @Nullable BlockProperties properties; private boolean insideRenderBoundsCalculated, insideRenderBounds; private boolean isCaveCalculated, isCave; - public ExtendedBlock(ResourcePack resourcePack, RenderSettings renderSettings, World world, int x, int y, int z) { - super(world, x, y, z); + public ExtendedBlock(BlockAccess blockAccess, ResourcePack resourcePack, RenderSettings renderSettings, DimensionType dimensionType) { + this.blockAccess = Objects.requireNonNull(blockAccess); this.resourcePack = Objects.requireNonNull(resourcePack); - this.renderSettings = renderSettings; + this.renderSettings = Objects.requireNonNull(renderSettings); + this.dimensionType = Objects.requireNonNull(dimensionType); } @Override - protected void reset() { - super.reset(); + public void set(int x, int y, int z) { + if (this.y == y && this.x == x && this.z == z) + return; - this.properties = null; + this.x = x; + this.y = y; + this.z = z; + this.blockAccess.set(x, y, z); + this.properties = null; this.insideRenderBoundsCalculated = false; this.isCaveCalculated = false; } - public T copy(ExtendedBlock source) { - super.copy(source); - - this.properties = source.properties; - - this.insideRenderBoundsCalculated = source.insideRenderBoundsCalculated; - this.insideRenderBounds = source.insideRenderBounds; - - this.isCaveCalculated = source.isCaveCalculated; - this.isCave = source.isCave; + @Override + public ExtendedBlock copy() { + return new ExtendedBlock(blockAccess.copy(), resourcePack, renderSettings, dimensionType); + } - return self(); + protected void copyFrom(ExtendedBlock extendedBlock) { + this.x = extendedBlock.x; + this.y = extendedBlock.y; + this.z = extendedBlock.z; + this.blockAccess = extendedBlock.blockAccess; + this.resourcePack = extendedBlock.resourcePack; + this.renderSettings = extendedBlock.renderSettings; + this.dimensionType = extendedBlock.dimensionType; + this.properties = extendedBlock.properties; + this.insideRenderBoundsCalculated = extendedBlock.insideRenderBoundsCalculated; + this.insideRenderBounds = extendedBlock.insideRenderBounds; + this.isCaveCalculated = extendedBlock.isCaveCalculated; + this.isCave = extendedBlock.isCave; } @Override public BlockState getBlockState() { if (renderSettings.isRenderEdges() && !isInsideRenderBounds()) return BlockState.AIR; - return super.getBlockState(); + return blockAccess.getBlockState(); } @Override public LightData getLightData() { - LightData ld = super.getLightData(); - if (renderSettings.isRenderEdges() && !isInsideRenderBounds()) ld.set(getWorld().getDimensionType().hasSkylight() ? 16 : 0, ld.getBlockLight()); + LightData ld = blockAccess.getLightData(); + if (renderSettings.isRenderEdges() && !isInsideRenderBounds()) ld.set(dimensionType.hasSkylight() ? 16 : 0, ld.getBlockLight()); return ld; } + @Override + public Biome getBiome() { + return blockAccess.getBiome(); + } + + @Override + public @Nullable BlockEntity getBlockEntity() { + return blockAccess.getBlockEntity(); + } + + @Override + public boolean hasOceanFloorY() { + return blockAccess.hasOceanFloorY(); + } + + @Override + public int getOceanFloorY() { + return blockAccess.getOceanFloorY(); + } + public BlockProperties getProperties() { if (properties == null) properties = resourcePack.getBlockProperties(getBlockState()); return properties; } - public RenderSettings getRenderSettings() { - return renderSettings; - } - @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isInsideRenderBounds() { if (!insideRenderBoundsCalculated) { @@ -106,8 +141,8 @@ public boolean isRemoveIfCave() { if (!isCaveCalculated) { isCave = getY() < renderSettings.getRemoveCavesBelowY() && ( - !getChunk().hasOceanFloorHeights() || - getY() < getChunk().getOceanFloorY(getX(), getZ()) + + !hasOceanFloorY() || + getY() < getOceanFloorY() + renderSettings.getCaveDetectionOceanFloor() ); isCaveCalculated = true; @@ -116,8 +151,4 @@ public boolean isRemoveIfCave() { return isCave; } - public ResourcePack getResourcePack() { - return resourcePack; - } - } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java deleted file mode 100644 index 5b42e134b..000000000 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.core.world.block.entity; - -import de.bluecolored.bluemap.core.util.Key; -import de.bluecolored.bluenbt.*; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.ToString; -import org.jetbrains.annotations.Nullable; - -import java.io.IOException; -import java.util.Map; - -@Getter -@EqualsAndHashCode -@ToString -@NBTDeserializer(BlockEntity.BlockEntityDeserializer.class) -public abstract class BlockEntity { - - protected final String id; - protected final int x, y, z; - protected final boolean keepPacked; - - protected BlockEntity(Map raw) { - this.id = (String) raw.get("id"); - this.x = (int) raw.getOrDefault("x", 0); - this.y = (int) raw.getOrDefault("y", 0); - this.z = (int) raw.getOrDefault("z", 0); - this.keepPacked = (byte) raw.getOrDefault("keepPacked", (byte) 0) == 1; - } - - @RequiredArgsConstructor - public static class BlockEntityDeserializer implements TypeDeserializer { - - private final BlueNBT blueNBT; - - @Override - @SuppressWarnings("unchecked") - public @Nullable BlockEntity read(NBTReader reader) throws IOException { - Map raw = (Map) blueNBT.read(reader, TypeToken.of(Map.class, String.class, Object.class)); - - String id = (String) raw.get("id"); - if (id == null) return null; - - Key typeKey = Key.parse(id, Key.MINECRAFT_NAMESPACE); - BlockEntityType type = BlockEntityType.REGISTRY.get(typeKey); - if (type == null) return null; - - return type.load(raw); - } - - } - -} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java deleted file mode 100644 index 4327987e1..000000000 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.core.world.block.entity; - -import java.util.List; -import java.util.Map; - -public class SignBlockEntity extends BlockEntity { - private final TextData frontText; - private final TextData backText; - - @SuppressWarnings("unchecked") - protected SignBlockEntity(Map data) { - super(data); - - // Versions before 1.20 used a different format - if (data.containsKey("front_text")) { - this.frontText = new TextData((Map) data.getOrDefault("front_text", Map.of())); - this.backText = new TextData((Map) data.getOrDefault("back_text", Map.of())); - } else { - this.frontText = new TextData( - (byte) data.getOrDefault("GlowingText", (byte) 0) == 1, - (String) data.getOrDefault("Color", ""), - List.of( - (String) data.getOrDefault("Text1", ""), - (String) data.getOrDefault("Text2", ""), - (String) data.getOrDefault("Text3", ""), - (String) data.getOrDefault("Text4", "") - ) - ); - - this.backText = new TextData(false, "", List.of()); - } - } - - public TextData getFrontText() { - return frontText; - } - - public TextData getBackText() { - return backText; - } - - @Override - public String toString() { - return "SignBlockEntity{" + - "frontText=" + frontText + - ", backText=" + backText + - "} " + super.toString(); - } - - public static class TextData { - private final boolean hasGlowingText; - private final String color; - private final List messages; - - @SuppressWarnings("unchecked") - private TextData(Map data) { - this.hasGlowingText = (byte) data.getOrDefault("has_glowing_text", (byte) 0) == 1; - this.color = (String) data.getOrDefault("color", ""); - this.messages = (List) data.getOrDefault("messages", List.of()); - } - - public TextData(boolean hasGlowingText, String color, List messages) { - this.hasGlowingText = hasGlowingText; - this.color = color; - this.messages = messages; - } - - public boolean isHasGlowingText() { - return hasGlowingText; - } - - public String getColor() { - return color; - } - - public List getMessages() { - return messages; - } - - @Override - public String toString() { - return "TextData{" + - "hasGlowingText=" + hasGlowingText + - ", color='" + color + '\'' + - ", messages=" + messages + - '}'; - } - } -} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java deleted file mode 100644 index daafb0a7b..000000000 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.core.world.block.entity; - -import lombok.Getter; -import org.jetbrains.annotations.Nullable; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -@Getter -public class SkullBlockEntity extends BlockEntity { - private final @Nullable String noteBlockSound; - private final @Nullable String extraType; - private final @Nullable SkullOwner skullOwner; - - protected SkullBlockEntity(Map data) { - super(data); - - this.noteBlockSound = (String) data.get("note_block_sound"); - this.extraType = (String) data.get("ExtraType"); - - @SuppressWarnings("unchecked") - Map ownerData = (Map) data.get("SkullOwner"); - this.skullOwner = ownerData != null ? new SkullOwner(ownerData) : null; - } - - @Override - public String toString() { - return "SkullBlockEntity{" + - "noteBlockSound='" + noteBlockSound + '\'' + - ", extraType='" + extraType + '\'' + - ", skullOwner=" + skullOwner + - "} " + super.toString(); - } - - @Getter - public static class SkullOwner { - private final @Nullable UUID id; - private final @Nullable String name; - private final List textures = new ArrayList<>(); - - @SuppressWarnings("unchecked") - private SkullOwner(Map data) { - int @Nullable [] uuidInts = (int[]) data.get("Id"); - - if (uuidInts == null || uuidInts.length != 4) { - this.id = null; - } else { - this.id = new UUID((long) uuidInts[0] << 32 | uuidInts[1], (long) uuidInts[2] << 32 | uuidInts[3]); - } - - this.name = (String) data.get("Name"); - - Map properties = (Map) data.getOrDefault("Properties", Map.of()); - List> textures = (List>) properties.getOrDefault("textures", List.of()); - - for (Map compound : textures) { - this.textures.add(new Texture(compound)); - } - } - - @Override - public String toString() { - return "SkullOwner{" + - "id=" + id + - ", name='" + name + '\'' + - ", textures=" + textures + - '}'; - } - } - - @Getter - public static class Texture { - private final @Nullable String signature; - private final String value; - - private Texture(Map data) { - this.signature = (String) data.get("signature"); - this.value = (String) data.getOrDefault("value", ""); - } - - @Override - public String toString() { - return "Texture{" + - "signature='" + signature + '\'' + - ", value='" + value + '\'' + - '}'; - } - } -} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkGrid.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkGrid.java new file mode 100644 index 000000000..2ea00bc96 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkGrid.java @@ -0,0 +1,197 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca; + +import com.flowpowered.math.vector.Vector2i; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import de.bluecolored.bluemap.core.BlueMap; +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.util.Grid; +import de.bluecolored.bluemap.core.util.Vector2iCache; +import de.bluecolored.bluemap.core.util.WatchService; +import de.bluecolored.bluemap.core.world.ChunkConsumer; +import de.bluecolored.bluemap.core.world.Region; +import de.bluecolored.bluemap.core.world.mca.region.RegionType; +import lombok.RequiredArgsConstructor; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.function.Predicate; +import java.util.stream.Stream; + +@RequiredArgsConstructor +public class ChunkGrid { + private static final Grid CHUNK_GRID = new Grid(16); + private static final Grid REGION_GRID = new Grid(32).multiply(CHUNK_GRID); + + private static final Vector2iCache VECTOR_2_I_CACHE = new Vector2iCache(); + + private final ChunkLoader chunkLoader; + private final Path regionFolder; + + private final LoadingCache> regionCache = Caffeine.newBuilder() + .executor(BlueMap.THREAD_POOL) + .softValues() + .maximumSize(32) + .expireAfterWrite(10, TimeUnit.MINUTES) + .expireAfterAccess(1, TimeUnit.MINUTES) + .build(this::loadRegion); + private final LoadingCache chunkCache = Caffeine.newBuilder() + .executor(BlueMap.THREAD_POOL) + .softValues() + .maximumSize(10240) // 10 regions worth of chunks + .expireAfterWrite(10, TimeUnit.MINUTES) + .expireAfterAccess(1, TimeUnit.MINUTES) + .build(this::loadChunk); + + public Grid getChunkGrid() { + return CHUNK_GRID; + } + + public Grid getRegionGrid() { + return REGION_GRID; + } + + public T getChunk(int x, int z) { + return getChunk(VECTOR_2_I_CACHE.get(x, z)); + } + + private T getChunk(Vector2i pos) { + return chunkCache.get(pos); + } + + public Region getRegion(int x, int z) { + return getRegion(VECTOR_2_I_CACHE.get(x, z)); + } + + private Region getRegion(Vector2i pos) { + return regionCache.get(pos); + } + + public void preloadRegionChunks(int x, int z, Predicate chunkFilter) { + try { + getRegion(x, z).iterateAllChunks(new ChunkConsumer<>() { + @Override + public boolean filter(int chunkX, int chunkZ, int lastModified) { + Vector2i chunkPos = VECTOR_2_I_CACHE.get(chunkX, chunkZ); + return chunkFilter.test(chunkPos); + } + + @Override + public void accept(int chunkX, int chunkZ, T chunk) { + Vector2i chunkPos = VECTOR_2_I_CACHE.get(chunkX, chunkZ); + chunkCache.put(chunkPos, chunk); + } + }); + } catch (IOException ex) { + Logger.global.logDebug("Unexpected exception trying to load preload region ('%s' -> x:%d, z:%d): %s".formatted(regionFolder, x, z, ex)); + } + } + + public Collection listRegions() { + if (!Files.exists(regionFolder)) return Collections.emptyList(); + try (Stream stream = Files.list(regionFolder)) { + return stream + .map(file -> { + try { + if (Files.size(file) <= 0) return null; + return RegionType.regionForFileName(file.getFileName().toString()); + } catch (IOException ex) { + Logger.global.logError("Failed to read region-file: " + file, ex); + return null; + } + }) + .filter(Objects::nonNull) + .toList(); + } catch (IOException ex) { + Logger.global.logError("Failed to list regions from: '%s'".formatted(regionFolder), ex); + return List.of(); + } + } + + public WatchService createRegionWatchService() throws IOException { + return new MCAWorldRegionWatchService(this.regionFolder); + } + + public void invalidateChunkCache() { + regionCache.invalidateAll(); + chunkCache.invalidateAll(); + } + + public void invalidateChunkCache(int x, int z) { + regionCache.invalidate(VECTOR_2_I_CACHE.get(x >> 5, z >> 5)); + chunkCache.invalidate(VECTOR_2_I_CACHE.get(x, z)); + } + + private Region loadRegion(Vector2i regionPos) { + return loadRegion(regionPos.getX(), regionPos.getY()); + } + + private Region loadRegion(int x, int z) { + return RegionType.loadRegion(chunkLoader, regionFolder, x, z); + } + + private T loadChunk(Vector2i chunkPos) { + return loadChunk(chunkPos.getX(), chunkPos.getY()); + } + + private T loadChunk(int x, int z) { + final int tries = 3; + final int tryInterval = 1000; + + Exception loadException = null; + for (int i = 0; i < tries; i++) { + try { + return getRegion(x >> 5, z >> 5) + .loadChunk(x, z); + } catch (IOException | RuntimeException e) { + if (loadException != null && loadException != e) + e.addSuppressed(loadException); + + loadException = e; + + if (i + 1 < tries) { + try { + Thread.sleep(tryInterval); + } catch (InterruptedException ex) { + Thread.currentThread().interrupt(); + break; + } + } + } + } + + Logger.global.logDebug("Unexpected exception trying to load chunk ('%s' -> x:%d, z:%d): %s".formatted(regionFolder, x, z, loadException)); + return chunkLoader.erroredChunk(); + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkLoader.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkLoader.java index 17e4b1055..19d36b765 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkLoader.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/ChunkLoader.java @@ -34,4 +34,6 @@ public interface ChunkLoader { T emptyChunk(); + T erroredChunk(); + } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java index 2c8bcce19..42c00bfa9 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java @@ -24,26 +24,42 @@ */ package de.bluecolored.bluemap.core.world.mca; +import com.flowpowered.math.vector.Vector2f; +import com.flowpowered.math.vector.Vector2i; +import com.flowpowered.math.vector.Vector3d; import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.world.BlockState; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; -import de.bluecolored.bluemap.core.world.mca.data.BlockStateDeserializer; -import de.bluecolored.bluemap.core.world.mca.data.KeyDeserializer; +import de.bluecolored.bluemap.core.world.BlockEntity; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluemap.core.world.mca.blockentity.SignBlockEntity; +import de.bluecolored.bluemap.core.world.mca.data.*; import de.bluecolored.bluenbt.BlueNBT; import de.bluecolored.bluenbt.NamingStrategy; import de.bluecolored.bluenbt.TypeToken; import org.jetbrains.annotations.Contract; +import java.util.UUID; + public class MCAUtil { - public static final BlueNBT BLUENBT = addCommonNbtAdapters(new BlueNBT()); + public static final BlueNBT BLUENBT = addCommonNbtSettings(new BlueNBT()); @Contract(value = "_ -> param1", mutates = "param1") - public static BlueNBT addCommonNbtAdapters(BlueNBT nbt) { + public static BlueNBT addCommonNbtSettings(BlueNBT nbt) { + nbt.setNamingStrategy(NamingStrategy.lowerCaseWithDelimiter("_")); + nbt.register(TypeToken.of(BlockState.class), new BlockStateDeserializer()); nbt.register(TypeToken.of(Key.class), new KeyDeserializer()); - nbt.register(TypeToken.of(BlockEntity.class), new BlockEntity.BlockEntityDeserializer(nbt)); + nbt.register(TypeToken.of(UUID.class), new UUIDDeserializer()); + nbt.register(TypeToken.of(Vector3d.class), new Vector3dDeserializer()); + nbt.register(TypeToken.of(Vector2i.class), new Vector2iDeserializer()); + nbt.register(TypeToken.of(Vector2f.class), new Vector2fDeserializer()); + + nbt.register(TypeToken.of(BlockEntity.class), new BlockEntityTypeResolver()); + nbt.register(TypeToken.of(SignBlockEntity.class), new SignBlockEntityTypeResolver()); + nbt.register(TypeToken.of(Entity.class), new EntityTypeResolver()); + return nbt; } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java index 258f0b98f..3c5f318c5 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java @@ -25,22 +25,20 @@ package de.bluecolored.bluemap.core.world.mca; import com.flowpowered.math.vector.Vector2i; +import com.flowpowered.math.vector.Vector3d; import com.flowpowered.math.vector.Vector3i; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.core.BlueMap; import de.bluecolored.bluemap.core.logger.Logger; import de.bluecolored.bluemap.core.resources.pack.datapack.DataPack; import de.bluecolored.bluemap.core.storage.compression.Compression; import de.bluecolored.bluemap.core.util.Grid; import de.bluecolored.bluemap.core.util.Key; -import de.bluecolored.bluemap.core.util.Vector2iCache; import de.bluecolored.bluemap.core.util.WatchService; import de.bluecolored.bluemap.core.world.*; import de.bluecolored.bluemap.core.world.mca.chunk.MCAChunkLoader; import de.bluecolored.bluemap.core.world.mca.data.DimensionTypeDeserializer; import de.bluecolored.bluemap.core.world.mca.data.LevelData; -import de.bluecolored.bluemap.core.world.mca.region.RegionType; +import de.bluecolored.bluemap.core.world.mca.entity.chunk.MCAEntityChunk; +import de.bluecolored.bluemap.core.world.mca.entity.chunk.MCAEntityChunkLoader; import de.bluecolored.bluenbt.BlueNBT; import de.bluecolored.bluenbt.TypeToken; import lombok.Getter; @@ -51,22 +49,13 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; import java.util.function.Predicate; -import java.util.stream.Stream; @Getter @ToString public class MCAWorld implements World { - private static final Grid CHUNK_GRID = new Grid(16); - private static final Grid REGION_GRID = new Grid(32).multiply(CHUNK_GRID); - - private static final Vector2iCache VECTOR_2_I_CACHE = new Vector2iCache(); - private final String id; private final Path worldFolder; private final Key dimension; @@ -76,23 +65,9 @@ public class MCAWorld implements World { private final DimensionType dimensionType; private final Vector3i spawnPoint; private final Path dimensionFolder; - private final Path regionFolder; - private final MCAChunkLoader chunkLoader = new MCAChunkLoader(this); - private final LoadingCache> regionCache = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .softValues() - .maximumSize(32) - .expireAfterWrite(10, TimeUnit.MINUTES) - .expireAfterAccess(1, TimeUnit.MINUTES) - .build(this::loadRegion); - private final LoadingCache chunkCache = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .softValues() - .maximumSize(10240) // 10 regions worth of chunks - .expireAfterWrite(10, TimeUnit.MINUTES) - .expireAfterAccess(1, TimeUnit.MINUTES) - .build(this::loadChunk); + private final ChunkGrid blockChunkGrid; + private final ChunkGrid entityChunkGrid; private MCAWorld(Path worldFolder, Key dimension, DataPack dataPack, LevelData levelData) { this.id = World.id(worldFolder, dimension); @@ -120,7 +95,10 @@ private MCAWorld(Path worldFolder, Key dimension, DataPack dataPack, LevelData l levelData.getData().getSpawnZ() ); this.dimensionFolder = resolveDimensionFolder(worldFolder, dimension); - this.regionFolder = dimensionFolder.resolve("region"); + + this.blockChunkGrid = new ChunkGrid<>(new MCAChunkLoader(this), dimensionFolder.resolve("region")); + this.entityChunkGrid = new ChunkGrid<>(new MCAEntityChunkLoader(), dimensionFolder.resolve("entities")); + } @Override @@ -130,12 +108,12 @@ public String getName() { @Override public Grid getChunkGrid() { - return CHUNK_GRID; + return blockChunkGrid.getChunkGrid(); } @Override public Grid getRegionGrid() { - return REGION_GRID; + return blockChunkGrid.getRegionGrid(); } @Override @@ -145,122 +123,66 @@ public Chunk getChunkAtBlock(int x, int z) { @Override public Chunk getChunk(int x, int z) { - return getChunk(VECTOR_2_I_CACHE.get(x, z)); - } - - private Chunk getChunk(Vector2i pos) { - return chunkCache.get(pos); + return blockChunkGrid.getChunk(x, z); } @Override public Region getRegion(int x, int z) { - return getRegion(VECTOR_2_I_CACHE.get(x, z)); - } - - private Region getRegion(Vector2i pos) { - return regionCache.get(pos); + return blockChunkGrid.getRegion(x, z); } @Override public Collection listRegions() { - if (!Files.exists(regionFolder)) return Collections.emptyList(); - try (Stream stream = Files.list(regionFolder)) { - return stream - .map(file -> { - try { - if (Files.size(file) <= 0) return null; - return RegionType.regionForFileName(file.getFileName().toString()); - } catch (IOException ex) { - Logger.global.logError("Failed to read region-file: " + file, ex); - return null; - } - }) - .filter(Objects::nonNull) - .toList(); - } catch (IOException ex) { - Logger.global.logError("Failed to list regions for world: '" + getId() + "'", ex); - return List.of(); - } + return blockChunkGrid.listRegions(); } @Override public WatchService createRegionWatchService() throws IOException { - return new MCAWorldRegionWatchService(this.regionFolder); + return blockChunkGrid.createRegionWatchService(); } @Override public void preloadRegionChunks(int x, int z, Predicate chunkFilter) { - try { - getRegion(x, z).iterateAllChunks(new ChunkConsumer<>() { - @Override - public boolean filter(int chunkX, int chunkZ, int lastModified) { - Vector2i chunkPos = VECTOR_2_I_CACHE.get(chunkX, chunkZ); - return chunkFilter.test(chunkPos); - } - - @Override - public void accept(int chunkX, int chunkZ, Chunk chunk) { - Vector2i chunkPos = VECTOR_2_I_CACHE.get(chunkX, chunkZ); - chunkCache.put(chunkPos, chunk); - } - }); - } catch (IOException ex) { - Logger.global.logDebug("Unexpected exception trying to load preload region (x:" + x + ", z:" + z + "): " + ex); - } + blockChunkGrid.preloadRegionChunks(x, z, chunkFilter); + entityChunkGrid.preloadRegionChunks(x, z, chunkFilter); } @Override public void invalidateChunkCache() { - regionCache.invalidateAll(); - chunkCache.invalidateAll(); + blockChunkGrid.invalidateChunkCache(); + entityChunkGrid.invalidateChunkCache(); } @Override public void invalidateChunkCache(int x, int z) { - regionCache.invalidate(VECTOR_2_I_CACHE.get(x >> 5, z >> 5)); - chunkCache.invalidate(VECTOR_2_I_CACHE.get(x, z)); - } - - private Region loadRegion(Vector2i regionPos) { - return loadRegion(regionPos.getX(), regionPos.getY()); - } - - private Region loadRegion(int x, int z) { - return RegionType.loadRegion(chunkLoader, getRegionFolder(), x, z); - } - - private Chunk loadChunk(Vector2i chunkPos) { - return loadChunk(chunkPos.getX(), chunkPos.getY()); + blockChunkGrid.invalidateChunkCache(x, z); + entityChunkGrid.invalidateChunkCache(x, z); } - private Chunk loadChunk(int x, int z) { - final int tries = 3; - final int tryInterval = 1000; - - Exception loadException = null; - for (int i = 0; i < tries; i++) { - try { - return getRegion(x >> 5, z >> 5) - .loadChunk(x, z); - } catch (IOException | RuntimeException e) { - if (loadException != null && loadException != e) - e.addSuppressed(loadException); - - loadException = e; - - if (i + 1 < tries) { - try { - Thread.sleep(tryInterval); - } catch (InterruptedException ex) { - Thread.currentThread().interrupt(); - break; + @Override + public void iterateEntities(int minX, int minZ, int maxX, int maxZ, Consumer entityConsumer) { + int minChunkX = minX >> 4, minChunkZ = minZ >> 4; + int maxChunkX = maxX >> 4, maxChunkZ = maxZ >> 4; + + for (int x = minChunkX; x <= maxChunkX; x++) { + for (int z = minChunkZ; z <= maxChunkZ; z++) { + Entity[] entities = entityChunkGrid.getChunk(x, z).getEntities(); + //noinspection ForLoopReplaceableByForEach + for (int i = 0; i < entities.length; i++) { + Entity entity = entities[i]; + Vector3d pos = entity.getPos(); + int pX = pos.getFloorX(); + int pZ = pos.getFloorZ(); + + if ( + pX >= minX && pX <= maxX && + pZ >= minZ && pZ <= maxZ + ) { + entityConsumer.accept(entities[i]); } } } } - - Logger.global.logDebug("Unexpected exception trying to load chunk (x:" + x + ", z:" + z + "): " + loadException); - return Chunk.ERRORED_CHUNK; } public static MCAWorld load(Path worldFolder, Key dimension, DataPack dataPack) throws IOException, InterruptedException { @@ -285,7 +207,7 @@ public static Path resolveDimensionFolder(Path worldFolder, Key dimension) { } private static BlueNBT createBlueNBTForDataPack(DataPack dataPack) { - BlueNBT blueNBT = MCAUtil.addCommonNbtAdapters(new BlueNBT()); + BlueNBT blueNBT = MCAUtil.addCommonNbtSettings(new BlueNBT()); blueNBT.register(TypeToken.of(DimensionType.class), new DimensionTypeDeserializer(blueNBT, dataPack)); return blueNBT; } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/BannerBlockEntity.java similarity index 52% rename from core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/BannerBlockEntity.java index 940baaaa5..108683640 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/BannerBlockEntity.java @@ -22,65 +22,46 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.world.block.entity; +package de.bluecolored.bluemap.core.world.mca.blockentity; + +import de.bluecolored.bluenbt.NBTName; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; import java.util.Map; -public class BannerBlockEntity extends BlockEntity { - private final List patterns = new ArrayList<>(); - - protected BannerBlockEntity(Map data) { - super(data); - - @SuppressWarnings("unchecked") - List> patterns = (List>) data.getOrDefault("Patterns", List.of()); - - for (Map compound : patterns) { - this.patterns.add(new Pattern(compound)); - } - } +@Getter +@EqualsAndHashCode(callSuper = true) +@ToString +@SuppressWarnings("FieldMayBeFinal") +public class BannerBlockEntity extends MCABlockEntity { - public List getPatterns() { - return patterns; - } + @NBTName("CustomName") + @Nullable String customName; - @Override - public String toString() { - return "BannerBlockEntity{" + - "patterns=" + patterns + - "} " + super.toString(); - } + List patterns = List.of(); + @Getter + @EqualsAndHashCode + @ToString + @SuppressWarnings("FieldMayBeFinal") public static class Pattern { - private final String code; - private final Color color; - - private Pattern(Map data) { - this.code = (String) data.get("Pattern"); - this.color = Color.values()[(int) data.get("Color")]; - } - public String getCode() { - return code; - } + // TODO: proper pattern-data implementation + Object pattern; + Object color; - public Color getColor() { - return color; - } - - @Override - public String toString() { - return "Pattern{" + - "code='" + code + '\'' + - ", color=" + color + - '}'; - } } + /* public enum Color { WHITE, ORANGE, MAGENTA, LIGHT_BLUE, YELLOW, LIME, PINK, GRAY, LIGHT_GRAY, CYAN, PURPLE, BLUE, BROWN, GREEN, RED, BLACK } + */ + } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/BlockEntityType.java similarity index 82% rename from core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/BlockEntityType.java index 08448d6f1..161bd03de 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/BlockEntityType.java @@ -22,22 +22,21 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -package de.bluecolored.bluemap.core.world.block.entity; +package de.bluecolored.bluemap.core.world.mca.blockentity; import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.util.Keyed; import de.bluecolored.bluemap.core.util.Registry; +import de.bluecolored.bluemap.core.world.BlockEntity; import lombok.Getter; import lombok.RequiredArgsConstructor; -import java.util.Map; +public interface BlockEntityType extends Keyed { -public interface BlockEntityType extends Keyed, BlockEntityLoader { - - BlockEntityType SIGN = new Impl(Key.minecraft("sign"), SignBlockEntity::new); - BlockEntityType HANGING_SIGN = new Impl(Key.minecraft("hanging_sign"), SignBlockEntity::new); - BlockEntityType SKULL = new Impl(Key.minecraft("skull"), SkullBlockEntity::new); - BlockEntityType BANNER = new Impl(Key.minecraft("banner"), BannerBlockEntity::new); + BlockEntityType SIGN = new Impl(Key.minecraft("sign"), SignBlockEntity.class); + BlockEntityType HANGING_SIGN = new Impl(Key.minecraft("hanging_sign"), SignBlockEntity.class); + BlockEntityType SKULL = new Impl(Key.minecraft("skull"), SkullBlockEntity.class); + BlockEntityType BANNER = new Impl(Key.minecraft("banner"), BannerBlockEntity.class); Registry REGISTRY = new Registry<>( SIGN, @@ -46,17 +45,14 @@ public interface BlockEntityType extends Keyed, BlockEntityLoader { BANNER ); + Class getBlockEntityClass(); + @RequiredArgsConstructor + @Getter class Impl implements BlockEntityType { - @Getter private final Key key; - private final BlockEntityLoader loader; - - @Override - public BlockEntity load(Map raw) { - return loader.load(raw); - } + private final Class blockEntityClass; } diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/MCABlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/MCABlockEntity.java new file mode 100644 index 000000000..df2ff5cff --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/MCABlockEntity.java @@ -0,0 +1,46 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.blockentity; + +import de.bluecolored.bluemap.core.util.Key; +import de.bluecolored.bluemap.core.world.BlockEntity; +import de.bluecolored.bluenbt.NBTName; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; + +@Getter +@EqualsAndHashCode +@ToString +@SuppressWarnings("FieldMayBeFinal") +public class MCABlockEntity implements BlockEntity { + + Key id; + int x, y, z; + + @NBTName("keepPacked") + boolean keepPacked; + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/SignBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/SignBlockEntity.java new file mode 100644 index 000000000..a44a2de5f --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/SignBlockEntity.java @@ -0,0 +1,76 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.blockentity; + +import de.bluecolored.bluenbt.NBTName; +import lombok.*; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +@Getter +@EqualsAndHashCode(callSuper = true) +@ToString +@SuppressWarnings({"FieldMayBeFinal", "unused"}) +public class SignBlockEntity extends MCABlockEntity { + + @Nullable TextData frontText; + @Nullable TextData backText; + + @NoArgsConstructor + @AllArgsConstructor + @Getter + @EqualsAndHashCode + @ToString + public static class TextData { + + boolean hasGlowingText; + String color = "black"; + List messages = List.of(); + + } + + @Getter + @EqualsAndHashCode(callSuper = true) + @ToString + public static class LegacySignBlockEntity extends SignBlockEntity { + + @NBTName("GlowingText") boolean hasGlowingText; + @NBTName("Color") String color = "black"; + @NBTName("Text1") String text1; + @NBTName("Text2") String text2; + @NBTName("Text3") String text3; + @NBTName("Text4") String text4; + + @Override + public TextData getFrontText() { + if (frontText == null) + frontText = new TextData(hasGlowingText, color, List.of(text1, text2, text3, text4)); + return frontText; + } + + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/SkullBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/SkullBlockEntity.java new file mode 100644 index 000000000..6aa5fd1da --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/blockentity/SkullBlockEntity.java @@ -0,0 +1,72 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.blockentity; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; +import java.util.UUID; + +@Getter +@EqualsAndHashCode(callSuper = true) +@ToString +@SuppressWarnings({"FieldMayBeFinal", "unused"}) +public class SkullBlockEntity extends MCABlockEntity { + + @Nullable String customName; + @Nullable String noteBlockSound; + @Nullable Profile profile; + + @Getter + @EqualsAndHashCode + @ToString + public static class Profile { + + @Nullable UUID id; + @Nullable String name; + List properties = List.of(); + + } + + @Getter + @EqualsAndHashCode + @ToString + public static class Property { + + String name; + String value; + @Nullable String signature; + + private Property(Map data) { + this.signature = (String) data.get("signature"); + this.value = (String) data.getOrDefault("value", ""); + } + + } +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java index 9a238e769..098fd5b54 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java @@ -30,7 +30,7 @@ import de.bluecolored.bluemap.core.world.DimensionType; import de.bluecolored.bluemap.core.world.LightData; import de.bluecolored.bluemap.core.world.biome.Biome; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; +import de.bluecolored.bluemap.core.world.BlockEntity; import de.bluecolored.bluemap.core.world.mca.MCAUtil; import de.bluecolored.bluemap.core.world.mca.MCAWorld; import de.bluecolored.bluemap.core.world.mca.data.LenientBlockEntityArrayDeserializer; @@ -123,7 +123,7 @@ public Chunk_1_13(MCAWorld world, Data data) { } // load block-entities - this.blockEntities = new HashMap<>(); + this.blockEntities = new HashMap<>(level.blockEntities.length); for (int i = 0; i < level.blockEntities.length; i++) { BlockEntity be = level.blockEntities[i]; if (be == null) continue; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java index 1d98a9f80..0ae67cb0e 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java @@ -30,7 +30,7 @@ import de.bluecolored.bluemap.core.world.DimensionType; import de.bluecolored.bluemap.core.world.LightData; import de.bluecolored.bluemap.core.world.biome.Biome; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; +import de.bluecolored.bluemap.core.world.BlockEntity; import de.bluecolored.bluemap.core.world.mca.MCAUtil; import de.bluecolored.bluemap.core.world.mca.MCAWorld; import de.bluecolored.bluemap.core.world.mca.PackedIntArrayAccess; @@ -122,7 +122,7 @@ public Chunk_1_16(MCAWorld world, Data data) { } // load block-entities - this.blockEntities = new HashMap<>(); + this.blockEntities = new HashMap<>(level.blockEntities.length); for (int i = 0; i < level.blockEntities.length; i++) { BlockEntity be = level.blockEntities[i]; if (be == null) continue; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java index 26b22f8ab..b81167ca2 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java @@ -30,7 +30,7 @@ import de.bluecolored.bluemap.core.world.DimensionType; import de.bluecolored.bluemap.core.world.LightData; import de.bluecolored.bluemap.core.world.biome.Biome; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; +import de.bluecolored.bluemap.core.world.BlockEntity; import de.bluecolored.bluemap.core.world.mca.MCAUtil; import de.bluecolored.bluemap.core.world.mca.MCAWorld; import de.bluecolored.bluemap.core.world.mca.PackedIntArrayAccess; @@ -119,7 +119,7 @@ public Chunk_1_18(MCAWorld world, Data data) { } // load block-entities - this.blockEntities = new HashMap<>(); + this.blockEntities = new HashMap<>(data.blockEntities.length); for (int i = 0; i < data.blockEntities.length; i++) { BlockEntity be = data.blockEntities[i]; if (be == null) continue; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java index 0954484ce..b5d217570 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java @@ -27,7 +27,7 @@ import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.world.BlockState; import de.bluecolored.bluemap.core.world.Chunk; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; +import de.bluecolored.bluemap.core.world.BlockEntity; import de.bluecolored.bluemap.core.world.mca.MCAWorld; import de.bluecolored.bluenbt.NBTName; import lombok.Getter; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunkLoader.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunkLoader.java index bb49d7a9a..44a41dce4 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunkLoader.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunkLoader.java @@ -86,6 +86,11 @@ public Chunk emptyChunk() { return Chunk.EMPTY_CHUNK; } + @Override + public Chunk erroredChunk() { + return Chunk.ERRORED_CHUNK; + } + private @Nullable ChunkVersionLoader findBestLoaderForVersion(int version) { for (ChunkVersionLoader loader : CHUNK_VERSION_LOADERS) { if (loader.mightSupport(version)) return loader; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockEntityTypeResolver.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockEntityTypeResolver.java new file mode 100644 index 000000000..2dd4786fa --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockEntityTypeResolver.java @@ -0,0 +1,71 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.world.BlockEntity; +import de.bluecolored.bluemap.core.world.mca.blockentity.BlockEntityType; +import de.bluecolored.bluemap.core.world.mca.blockentity.MCABlockEntity; +import de.bluecolored.bluenbt.TypeResolver; +import de.bluecolored.bluenbt.TypeToken; + +import java.io.IOException; +import java.util.stream.Stream; + +public class BlockEntityTypeResolver implements TypeResolver { + + private static final TypeToken TYPE_TOKEN = TypeToken.of(MCABlockEntity.class); + + @Override + public TypeToken getBaseType() { + return TYPE_TOKEN; + } + + @Override + public TypeToken resolve(MCABlockEntity base) { + BlockEntityType type = BlockEntityType.REGISTRY.get(base.getId()); + if (type == null) return TYPE_TOKEN; + return TypeToken.of(type.getBlockEntityClass()); + } + + @Override + public Iterable> getPossibleTypes() { + return Stream.concat( + Stream.of(TYPE_TOKEN), + BlockEntityType.REGISTRY.values().stream() + .map(BlockEntityType::getBlockEntityClass) + .> map(TypeToken::of) + ) + .toList(); + } + + @Override + public BlockEntity onException(IOException parseException, MCABlockEntity base) { + Logger.global.logDebug("Failed to parse block-entity of type '%s': %s" + .formatted(base.getId(), parseException)); + return base; + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/EntityTypeResolver.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/EntityTypeResolver.java new file mode 100644 index 000000000..c0fc492d8 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/EntityTypeResolver.java @@ -0,0 +1,71 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import de.bluecolored.bluemap.core.logger.Logger; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluemap.core.world.mca.entity.EntityType; +import de.bluecolored.bluemap.core.world.mca.entity.MCAEntity; +import de.bluecolored.bluenbt.TypeResolver; +import de.bluecolored.bluenbt.TypeToken; + +import java.io.IOException; +import java.util.stream.Stream; + +public class EntityTypeResolver implements TypeResolver { + + private static final TypeToken TYPE_TOKEN = TypeToken.of(MCAEntity.class); + + @Override + public TypeToken getBaseType() { + return TYPE_TOKEN; + } + + @Override + public TypeToken resolve(MCAEntity base) { + EntityType type = EntityType.REGISTRY.get(base.getId()); + if (type == null) return TYPE_TOKEN; + return TypeToken.of(type.getEntityClass()); + } + + @Override + public Iterable> getPossibleTypes() { + return Stream.concat( + Stream.of(TYPE_TOKEN), + EntityType.REGISTRY.values().stream() + .map(EntityType::getEntityClass) + .> map(TypeToken::of) + ) + .toList(); + } + + @Override + public Entity onException(IOException parseException, MCAEntity base) { + Logger.global.logDebug("Failed to parse block-entity of type '%s': %s" + .formatted(base.getId(), parseException)); + return base; + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java index 0d07c5f19..82dc60a2e 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java @@ -24,7 +24,7 @@ */ package de.bluecolored.bluemap.core.world.mca.data; -import de.bluecolored.bluemap.core.world.block.entity.BlockEntity; +import de.bluecolored.bluemap.core.world.BlockEntity; import de.bluecolored.bluenbt.*; import java.io.IOException; diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/SignBlockEntityTypeResolver.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/SignBlockEntityTypeResolver.java new file mode 100644 index 000000000..22dd54839 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/SignBlockEntityTypeResolver.java @@ -0,0 +1,60 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import de.bluecolored.bluemap.core.world.mca.blockentity.SignBlockEntity; +import de.bluecolored.bluenbt.TypeResolver; +import de.bluecolored.bluenbt.TypeToken; + +import java.util.Collection; +import java.util.List; + +public class SignBlockEntityTypeResolver implements TypeResolver { + + private static final TypeToken BASE_TYPE_TOKEN = TypeToken.of(SignBlockEntity.class); + private static final TypeToken LEGACY_TYPE_TOKEN = TypeToken.of(SignBlockEntity.LegacySignBlockEntity.class); + + private static final Collection> POSSIBLE_TYPES = List.of( + BASE_TYPE_TOKEN, + LEGACY_TYPE_TOKEN + ); + + @Override + public TypeToken getBaseType() { + return BASE_TYPE_TOKEN; + } + + @Override + public TypeToken resolve(SignBlockEntity base) { + if (base.getFrontText() == null) return LEGACY_TYPE_TOKEN; + return BASE_TYPE_TOKEN; + } + + @Override + public Iterable> getPossibleTypes() { + return POSSIBLE_TYPES; + } + +} \ No newline at end of file diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/UUIDDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/UUIDDeserializer.java new file mode 100644 index 000000000..3355cea95 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/UUIDDeserializer.java @@ -0,0 +1,54 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import de.bluecolored.bluenbt.NBTReader; +import de.bluecolored.bluenbt.TagType; +import de.bluecolored.bluenbt.TypeDeserializer; + +import java.io.IOException; +import java.util.UUID; + +public class UUIDDeserializer implements TypeDeserializer { + + @Override + public UUID read(NBTReader reader) throws IOException { + TagType tagType = reader.peek(); + + if (tagType == TagType.STRING) + return UUID.fromString(reader.nextString()); + + if (tagType == TagType.INT_ARRAY) { + int[] ints = reader.nextIntArray(); + if (ints.length != 4) throw new IOException("Unexpected number of UUID-ints, expected 4, got " + ints.length); + return new UUID((long) ints[0] << 32 | ints[1], (long) ints[2] << 32 | ints[3]); + } + + long[] longs = reader.nextLongArray(); + if (longs.length != 2) throw new IOException("Unexpected number of UUID-longs, expected 2, got " + longs.length); + return new UUID(longs[0], longs[1]); + } + +} \ No newline at end of file diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector2fDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector2fDeserializer.java new file mode 100644 index 000000000..d220f41ff --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector2fDeserializer.java @@ -0,0 +1,81 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import com.flowpowered.math.vector.Vector2f; +import com.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluenbt.NBTReader; +import de.bluecolored.bluenbt.TagType; +import de.bluecolored.bluenbt.TypeDeserializer; + +import java.io.IOException; + +public class Vector2fDeserializer implements TypeDeserializer { + + @Override + public Vector2f read(NBTReader reader) throws IOException { + TagType tag = reader.peek(); + + return switch (tag) { + + case INT_ARRAY, LONG_ARRAY, BYTE_ARRAY -> { + long[] values = reader.nextArrayAsLongArray(); + if (values.length != 2) throw new IllegalStateException("Unexpected array length: " + values.length); + yield new Vector2f( + values[0], + values[1] + ); + } + + case LIST -> { + reader.beginList(); + Vector2f value = new Vector2f( + reader.nextFloat(), + reader.nextFloat() + ); + reader.endList(); + yield value; + } + + case COMPOUND -> { + double x = 0, y = 0, z = 0; + reader.beginCompound(); + while (reader.peek() != TagType.END) { + switch (reader.name()) { + case "x", "yaw": x = reader.nextFloat(); break; + case "y", "z", "pitch": y = reader.nextFloat(); break; + default: reader.skip(); + } + } + reader.endCompound(); + yield new Vector2f(x, y); + } + + case null, default -> throw new IllegalStateException("Unexpected tag-type: " + tag); + + }; + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector2iDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector2iDeserializer.java new file mode 100644 index 000000000..c6790f49f --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector2iDeserializer.java @@ -0,0 +1,80 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import com.flowpowered.math.vector.Vector2i; +import de.bluecolored.bluenbt.NBTReader; +import de.bluecolored.bluenbt.TagType; +import de.bluecolored.bluenbt.TypeDeserializer; + +import java.io.IOException; + +public class Vector2iDeserializer implements TypeDeserializer { + + @Override + public Vector2i read(NBTReader reader) throws IOException { + TagType tag = reader.peek(); + + return switch (tag) { + + case INT_ARRAY, LONG_ARRAY, BYTE_ARRAY -> { + long[] values = reader.nextArrayAsLongArray(); + if (values.length != 2) throw new IllegalStateException("Unexpected array length: " + values.length); + yield new Vector2i( + values[0], + values[1] + ); + } + + case LIST -> { + reader.beginList(); + Vector2i value = new Vector2i( + reader.nextDouble(), + reader.nextDouble() + ); + reader.endList(); + yield value; + } + + case COMPOUND -> { + double x = 0, y = 0; + reader.beginCompound(); + while (reader.peek() != TagType.END) { + switch (reader.name()) { + case "x": x = reader.nextDouble(); break; + case "y", "z": y = reader.nextDouble(); break; + default: reader.skip(); + } + } + reader.endCompound(); + yield new Vector2i(x, y); + } + + case null, default -> throw new IllegalStateException("Unexpected tag-type: " + tag); + + }; + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector3dDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector3dDeserializer.java new file mode 100644 index 000000000..7eb32ee52 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/Vector3dDeserializer.java @@ -0,0 +1,83 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.data; + +import com.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluenbt.NBTReader; +import de.bluecolored.bluenbt.TagType; +import de.bluecolored.bluenbt.TypeDeserializer; + +import java.io.IOException; + +public class Vector3dDeserializer implements TypeDeserializer { + + @Override + public Vector3d read(NBTReader reader) throws IOException { + TagType tag = reader.peek(); + + return switch (tag) { + + case INT_ARRAY, LONG_ARRAY, BYTE_ARRAY -> { + long[] values = reader.nextArrayAsLongArray(); + if (values.length != 3) throw new IllegalStateException("Unexpected array length: " + values.length); + yield new Vector3d( + values[0], + values[1], + values[2] + ); + } + + case LIST -> { + reader.beginList(); + Vector3d value = new Vector3d( + reader.nextDouble(), + reader.nextDouble(), + reader.nextDouble() + ); + reader.endList(); + yield value; + } + + case COMPOUND -> { + double x = 0, y = 0, z = 0; + reader.beginCompound(); + while (reader.peek() != TagType.END) { + switch (reader.name()) { + case "x": x = reader.nextDouble(); break; + case "y": y = reader.nextDouble(); break; + case "z": z = reader.nextDouble(); break; + default: reader.skip(); + } + } + reader.endCompound(); + yield new Vector3d(x, y, z); + } + + case null, default -> throw new IllegalStateException("Unexpected tag-type: " + tag); + + }; + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/EntityType.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/EntityType.java new file mode 100644 index 000000000..9b871c26e --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/EntityType.java @@ -0,0 +1,49 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.entity; + +import de.bluecolored.bluemap.core.util.Key; +import de.bluecolored.bluemap.core.util.Keyed; +import de.bluecolored.bluemap.core.util.Registry; +import de.bluecolored.bluemap.core.world.Entity; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +public interface EntityType extends Keyed { + + Registry REGISTRY = new Registry<>(); + + Class getEntityClass(); + + @RequiredArgsConstructor + @Getter + class Impl implements EntityType { + + private final Key key; + private final Class entityClass; + + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/MCAEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/MCAEntity.java new file mode 100644 index 000000000..26a6b52ca --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/MCAEntity.java @@ -0,0 +1,52 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.entity; + +import com.flowpowered.math.vector.Vector2f; +import com.flowpowered.math.vector.Vector3d; +import de.bluecolored.bluemap.core.util.Key; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluenbt.NBTName; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; + +import java.util.UUID; + +@Getter +@EqualsAndHashCode +@ToString +@SuppressWarnings("FieldMayBeFinal") +public class MCAEntity implements Entity { + + Key id; + @NBTName("UUID") UUID uuid; + @NBTName("CustomName") String customName; + @NBTName("CustomNameVisible") boolean customNameVisible; + @NBTName("Pos") Vector3d pos; + @NBTName("Motion") Vector3d motion; + @NBTName("Rotation") Vector2f rotation; + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/chunk/MCAEntityChunk.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/chunk/MCAEntityChunk.java new file mode 100644 index 000000000..46652ae4d --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/chunk/MCAEntityChunk.java @@ -0,0 +1,49 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.entity.chunk; + +import com.flowpowered.math.vector.Vector2i; +import de.bluecolored.bluemap.core.world.Entity; +import de.bluecolored.bluenbt.NBTName; +import lombok.Getter; + +@Getter +public class MCAEntityChunk { + + private static final Entity[] EMPTY_ENTITIES = new Entity[0]; + + public static final MCAEntityChunk EMPTY_CHUNK = new MCAEntityChunk(); + public static final MCAEntityChunk ERRORED_CHUNK = new MCAEntityChunk(); + + @NBTName("Entities") + public Entity[] entities = EMPTY_ENTITIES; + + @NBTName("DataVersion") + public int dataVersion = -1; + + @NBTName("Position") + public Vector2i position = Vector2i.ZERO; + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/chunk/MCAEntityChunkLoader.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/chunk/MCAEntityChunkLoader.java new file mode 100644 index 000000000..5ee1dde93 --- /dev/null +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/entity/chunk/MCAEntityChunkLoader.java @@ -0,0 +1,57 @@ +/* + * This file is part of BlueMap, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.core.world.mca.entity.chunk; + +import de.bluecolored.bluemap.core.storage.compression.Compression; +import de.bluecolored.bluemap.core.world.mca.ChunkLoader; +import de.bluecolored.bluemap.core.world.mca.MCAUtil; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +public class MCAEntityChunkLoader implements ChunkLoader { + + @Override + public MCAEntityChunk load(byte[] data, int offset, int length, Compression compression) throws IOException { + try ( + InputStream in = new ByteArrayInputStream(data, offset, length); + InputStream decompressedIn = compression.decompress(in) + ) { + return MCAUtil.BLUENBT.read(decompressedIn, MCAEntityChunk.class); + } + } + + @Override + public MCAEntityChunk emptyChunk() { + return MCAEntityChunk.EMPTY_CHUNK; + } + + @Override + public MCAEntityChunk erroredChunk() { + return MCAEntityChunk.ERRORED_CHUNK; + } + +} diff --git a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java index 4f4ffcf6a..7674bc783 100644 --- a/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java +++ b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java @@ -25,13 +25,11 @@ package de.bluecolored.bluemap.core.world.mca.region; import com.flowpowered.math.vector.Vector2i; -import de.bluecolored.bluemap.core.logger.Logger; import de.bluecolored.bluemap.core.util.Key; import de.bluecolored.bluemap.core.util.Keyed; import de.bluecolored.bluemap.core.util.Registry; import de.bluecolored.bluemap.core.world.Region; import de.bluecolored.bluemap.core.world.mca.ChunkLoader; -import de.bluecolored.bluemap.core.world.mca.chunk.MCAChunkLoader; import lombok.Getter; import lombok.RequiredArgsConstructor; import org.jetbrains.annotations.Nullable; diff --git a/core/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json b/core/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json index 55827a939..803c28520 100644 --- a/core/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json +++ b/core/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json @@ -1,5 +1,8 @@ { "variants": { - "": { "model": "bluemap:block/missing" } + "": { + "renderer": "bluemap:missing", + "model": "bluemap:block/missing" + } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/bluemap/entitystates/missing.json b/core/src/main/resourceExtensions/assets/bluemap/entitystates/missing.json new file mode 100644 index 000000000..5f44fc120 --- /dev/null +++ b/core/src/main/resourceExtensions/assets/bluemap/entitystates/missing.json @@ -0,0 +1,8 @@ +{ + "parts": [ + { + "renderer": "bluemap:missing", + "model": "bluemap:entity/missing" + } + ] +} \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/bluemap/models/block/missing.json b/core/src/main/resourceExtensions/assets/bluemap/models/block/missing.json index e185348a5..206494b39 100644 --- a/core/src/main/resourceExtensions/assets/bluemap/models/block/missing.json +++ b/core/src/main/resourceExtensions/assets/bluemap/models/block/missing.json @@ -1,5 +1,4 @@ { - "renderer": "bluemap:missing", "parent": "block/cube_all", "textures": { "all": "bluemap:block/missing" diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/left.json b/core/src/main/resourceExtensions/assets/bluemap/models/entity/missing.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/left.json rename to core/src/main/resourceExtensions/assets/bluemap/models/entity/missing.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json index 2531cfe80..d6bfda4c0 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/acacia_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/acacia_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/acacia_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/acacia_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/acacia_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/acacia_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/acacia_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/acacia_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/acacia_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/acacia_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/acacia_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/acacia_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/acacia_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/acacia_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/acacia_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/acacia_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/acacia_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/acacia_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json index b955118af..b04bc1563 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/acacia" }, + "rotation=1": { "model": "entity/signs/acacia", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/acacia", "y": 45 }, + "rotation=3": { "model": "entity/signs/acacia", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/acacia", "y": 90 }, + "rotation=5": { "model": "entity/signs/acacia", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/acacia", "y": 135 }, + "rotation=7": { "model": "entity/signs/acacia", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/acacia", "y": 180 }, + "rotation=9": { "model": "entity/signs/acacia", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/acacia", "y": 225 }, + "rotation=11": { "model": "entity/signs/acacia", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/acacia", "y": 270 }, + "rotation=13": { "model": "entity/signs/acacia", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/acacia", "y": 315 }, + "rotation=15": { "model": "entity/signs/acacia", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json index 04a2f7020..8310e6eda 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/acacia_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/acacia_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/acacia_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/acacia_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/acacia_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/acacia_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/acacia_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/acacia_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json index 3c93859cc..2de0fe790 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_acacia" }, + "facing=west": { "model": "entity/signs/wall_acacia", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_acacia", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_acacia", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json index aa8587a3e..51365dc16 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/bamboo_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/bamboo_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/bamboo_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/bamboo_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json index 2b267af71..619d5980f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/bamboo_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/bamboo_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/bamboo_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/bamboo_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/bamboo_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/bamboo_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/bamboo_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/bamboo_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json index 6858dfa05..521b977c6 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/birch_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/birch_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/birch_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/birch_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/birch_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/birch_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/birch_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/birch_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/birch_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/birch_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/birch_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/birch_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/birch_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/birch_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/birch_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/birch_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/birch_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/birch_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json index 996e831bf..d61f31e09 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/birch" }, + "rotation=1": { "model": "entity/signs/birch", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/birch", "y": 45 }, + "rotation=3": { "model": "entity/signs/birch", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/birch", "y": 90 }, + "rotation=5": { "model": "entity/signs/birch", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/birch", "y": 135 }, + "rotation=7": { "model": "entity/signs/birch", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/birch", "y": 180 }, + "rotation=9": { "model": "entity/signs/birch", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/birch", "y": 225 }, + "rotation=11": { "model": "entity/signs/birch", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/birch", "y": 270 }, + "rotation=13": { "model": "entity/signs/birch", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/birch", "y": 315 }, + "rotation=15": { "model": "entity/signs/birch", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json index 9c860d087..1d066f7bf 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/birch_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/birch_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/birch_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/birch_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/birch_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/birch_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/birch_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/birch_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json index 488d0d85c..d71b5bcda 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_birch" }, + "facing=west": { "model": "entity/signs/wall_birch", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_birch", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_birch", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json index c1d14174b..12d6f40ba 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/black_head" }, + "part=head,facing=east": { "model": "entity/bed/black_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/black_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/black_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/black_foot" }, + "part=foot,facing=east": { "model": "entity/bed/black_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/black_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/black_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json index 7ee41097e..c43d6f559 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/blue_head" }, + "part=head,facing=east": { "model": "entity/bed/blue_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/blue_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/blue_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/blue_foot" }, + "part=foot,facing=east": { "model": "entity/bed/blue_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/blue_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/blue_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json index b334dce17..94d721dce 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/brown_head" }, + "part=head,facing=east": { "model": "entity/bed/brown_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/brown_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/brown_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/brown_foot" }, + "part=foot,facing=east": { "model": "entity/bed/brown_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/brown_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/brown_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json index 7ecf26273..52b484d07 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/cherry_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/cherry_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/cherry_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/cherry_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/cherry_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/cherry_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/cherry_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/cherry_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/cherry_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/cherry_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/cherry_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/cherry_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/cherry_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/cherry_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/cherry_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/cherry_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/cherry_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/cherry_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json index 60bb9be75..a455c2eed 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/cherry_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/cherry_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/cherry_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/cherry_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/cherry_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/cherry_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/cherry_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/cherry_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json index 765228487..64d29700c 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json @@ -1,13 +1,13 @@ { "variants": { - "type=single,facing=north": { "model": "block/chest/normal", "y": 180 }, - "type=single,facing=east": { "model": "block/chest/normal", "y": 270 }, - "type=single,facing=south": { "model": "block/chest/normal" }, - "type=single,facing=west": { "model": "block/chest/normal", "y": 90 }, - "type=right,facing=north": { "model": "block/chest/normal_double", "y": 180 }, - "type=right,facing=east": { "model": "block/chest/normal_double", "y": 270 }, - "type=right,facing=south": { "model": "block/chest/normal_double" }, - "type=right,facing=west": { "model": "block/chest/normal_double", "y": 90 }, - "type=left": { "model": "block/chest/left" } + "type=single,facing=north": { "model": "entity/chest/normal", "y": 180 }, + "type=single,facing=east": { "model": "entity/chest/normal", "y": 270 }, + "type=single,facing=south": { "model": "entity/chest/normal" }, + "type=single,facing=west": { "model": "entity/chest/normal", "y": 90 }, + "type=right,facing=north": { "model": "entity/chest/normal_double", "y": 180 }, + "type=right,facing=east": { "model": "entity/chest/normal_double", "y": 270 }, + "type=right,facing=south": { "model": "entity/chest/normal_double" }, + "type=right,facing=west": { "model": "entity/chest/normal_double", "y": 90 }, + "type=left": { "model": "entity/chest/left" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json index 373cae39b..749f96719 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/crimson_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/crimson_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/crimson_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/crimson_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/crimson_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/crimson_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/crimson_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/crimson_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/crimson_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/crimson_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/crimson_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/crimson_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/crimson_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/crimson_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/crimson_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/crimson_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/crimson_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/crimson_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json index 05ebd657f..e0255c5e6 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/crimson" }, + "rotation=1": { "model": "entity/signs/crimson", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/crimson", "y": 45 }, + "rotation=3": { "model": "entity/signs/crimson", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/crimson", "y": 90 }, + "rotation=5": { "model": "entity/signs/crimson", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/crimson", "y": 135 }, + "rotation=7": { "model": "entity/signs/crimson", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/crimson", "y": 180 }, + "rotation=9": { "model": "entity/signs/crimson", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/crimson", "y": 225 }, + "rotation=11": { "model": "entity/signs/crimson", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/crimson", "y": 270 }, + "rotation=13": { "model": "entity/signs/crimson", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/crimson", "y": 315 }, + "rotation=15": { "model": "entity/signs/crimson", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json index bb58a897b..504141708 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/crimson_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/crimson_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/crimson_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/crimson_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/crimson_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/crimson_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/crimson_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/crimson_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json index a618d125c..24e6d19ce 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_crimson" }, + "facing=west": { "model": "entity/signs/wall_crimson", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_crimson", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_crimson", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json index f14cb28a2..833cfa370 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/cyan_head" }, + "part=head,facing=east": { "model": "entity/bed/cyan_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/cyan_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/cyan_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/cyan_foot" }, + "part=foot,facing=east": { "model": "entity/bed/cyan_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/cyan_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/cyan_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json index c7f4ef8d2..4503c954f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/dark_oak_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/dark_oak_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/dark_oak_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/dark_oak_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json index ec59ec534..a2b08c78a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/dark_oak" }, + "rotation=1": { "model": "entity/signs/dark_oak", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/dark_oak", "y": 45 }, + "rotation=3": { "model": "entity/signs/dark_oak", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/dark_oak", "y": 90 }, + "rotation=5": { "model": "entity/signs/dark_oak", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/dark_oak", "y": 135 }, + "rotation=7": { "model": "entity/signs/dark_oak", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/dark_oak", "y": 180 }, + "rotation=9": { "model": "entity/signs/dark_oak", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/dark_oak", "y": 225 }, + "rotation=11": { "model": "entity/signs/dark_oak", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/dark_oak", "y": 270 }, + "rotation=13": { "model": "entity/signs/dark_oak", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/dark_oak", "y": 315 }, + "rotation=15": { "model": "entity/signs/dark_oak", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json index c8ad76dd8..d00429c6b 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/dark_oak_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/dark_oak_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/dark_oak_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/dark_oak_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/dark_oak_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/dark_oak_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/dark_oak_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/dark_oak_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json index 3f0cac412..455e9f5bf 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_dark_oak" }, + "facing=west": { "model": "entity/signs/wall_dark_oak", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_dark_oak", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_dark_oak", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json index 47542c67b..b90570f47 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json @@ -1,8 +1,8 @@ { "variants": { - "facing=north": { "model": "block/chest/ender", "y": 180 }, - "facing=east": { "model": "block/chest/ender", "y": 270 }, - "facing=south": { "model": "block/chest/ender" }, - "facing=west": { "model": "block/chest/ender", "y": 90 } + "facing=north": { "model": "entity/chest/ender", "y": 180 }, + "facing=east": { "model": "entity/chest/ender", "y": 270 }, + "facing=south": { "model": "entity/chest/ender" }, + "facing=west": { "model": "entity/chest/ender", "y": 90 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json index 2c58888c0..1273ca2bf 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/gray_head" }, + "part=head,facing=east": { "model": "entity/bed/gray_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/gray_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/gray_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/gray_foot" }, + "part=foot,facing=east": { "model": "entity/bed/gray_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/gray_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/gray_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json index af72506f5..67c13c67f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/green_head" }, + "part=head,facing=east": { "model": "entity/bed/green_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/green_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/green_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/green_foot" }, + "part=foot,facing=east": { "model": "entity/bed/green_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/green_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/green_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json index 72c301a00..192cb9bc6 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/jungle_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/jungle_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/jungle_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/jungle_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/jungle_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/jungle_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/jungle_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/jungle_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/jungle_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/jungle_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/jungle_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/jungle_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/jungle_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/jungle_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/jungle_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/jungle_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/jungle_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/jungle_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json index 82f954d67..a1f957036 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/jungle" }, + "rotation=1": { "model": "entity/signs/jungle", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/jungle", "y": 45 }, + "rotation=3": { "model": "entity/signs/jungle", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/jungle", "y": 90 }, + "rotation=5": { "model": "entity/signs/jungle", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/jungle", "y": 135 }, + "rotation=7": { "model": "entity/signs/jungle", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/jungle", "y": 180 }, + "rotation=9": { "model": "entity/signs/jungle", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/jungle", "y": 225 }, + "rotation=11": { "model": "entity/signs/jungle", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/jungle", "y": 270 }, + "rotation=13": { "model": "entity/signs/jungle", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/jungle", "y": 315 }, + "rotation=15": { "model": "entity/signs/jungle", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json index e6f4f6e8e..2f4ed5a17 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/jungle_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/jungle_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/jungle_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/jungle_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/jungle_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/jungle_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/jungle_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/jungle_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json index 9eb47dccb..62052e6c6 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_jungle" }, + "facing=west": { "model": "entity/signs/wall_jungle", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_jungle", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_jungle", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json index 0ca283840..aba57984a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json @@ -1,5 +1,8 @@ { "variants": { - "": { "model": "block/lava" } + "": { + "renderer": "bluemap:liquid", + "model": "block/lava" + } } } diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json index 5dea0bc52..076a5f10c 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/light_blue_head" }, + "part=head,facing=east": { "model": "entity/bed/light_blue_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/light_blue_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/light_blue_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/light_blue_foot" }, + "part=foot,facing=east": { "model": "entity/bed/light_blue_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/light_blue_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/light_blue_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json index f762127d0..7e8a4d5f2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/light_gray_head" }, + "part=head,facing=east": { "model": "entity/bed/light_gray_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/light_gray_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/light_gray_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/light_gray_foot" }, + "part=foot,facing=east": { "model": "entity/bed/light_gray_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/light_gray_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/light_gray_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json index c7f6c93cc..840faf64b 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/lime_head" }, + "part=head,facing=east": { "model": "entity/bed/lime_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/lime_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/lime_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/lime_foot" }, + "part=foot,facing=east": { "model": "entity/bed/lime_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/lime_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/lime_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json index 6feff92b7..1dff49056 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/magenta_head" }, + "part=head,facing=east": { "model": "entity/bed/magenta_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/magenta_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/magenta_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/magenta_foot" }, + "part=foot,facing=east": { "model": "entity/bed/magenta_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/magenta_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/magenta_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json index 4af847834..2eba3ef1a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/mangrove_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/mangrove_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/mangrove_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/mangrove_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json index ebd3b2c0c..2b6e364ac 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/mangrove" }, + "rotation=1": { "model": "entity/signs/mangrove", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/mangrove", "y": 45 }, + "rotation=3": { "model": "entity/signs/mangrove", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/mangrove", "y": 90 }, + "rotation=5": { "model": "entity/signs/mangrove", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/mangrove", "y": 135 }, + "rotation=7": { "model": "entity/signs/mangrove", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/mangrove", "y": 180 }, + "rotation=9": { "model": "entity/signs/mangrove", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/mangrove", "y": 225 }, + "rotation=11": { "model": "entity/signs/mangrove", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/mangrove", "y": 270 }, + "rotation=13": { "model": "entity/signs/mangrove", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/mangrove", "y": 315 }, + "rotation=15": { "model": "entity/signs/mangrove", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json index 059b6546c..d34855b45 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/mangrove_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/mangrove_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/mangrove_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/mangrove_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/mangrove_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/mangrove_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/mangrove_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/mangrove_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json index 1cde352ec..71591c515 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_mangrove" }, + "facing=west": { "model": "entity/signs/wall_mangrove", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_mangrove", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_mangrove", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json index e1dac7392..80365c005 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/oak_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/oak_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/oak_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/oak_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/oak_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/oak_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/oak_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/oak_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/oak_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/oak_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/oak_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/oak_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/oak_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/oak_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/oak_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/oak_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/oak_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/oak_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json index c22f0ca7c..d8ef9cbeb 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/oak" }, + "rotation=1": { "model": "entity/signs/oak", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/oak", "y": 45 }, + "rotation=3": { "model": "entity/signs/oak", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/oak", "y": 90 }, + "rotation=5": { "model": "entity/signs/oak", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/oak", "y": 135 }, + "rotation=7": { "model": "entity/signs/oak", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/oak", "y": 180 }, + "rotation=9": { "model": "entity/signs/oak", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/oak", "y": 225 }, + "rotation=11": { "model": "entity/signs/oak", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/oak", "y": 270 }, + "rotation=13": { "model": "entity/signs/oak", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/oak", "y": 315 }, + "rotation=15": { "model": "entity/signs/oak", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json index 900e40f8d..e2a76a82a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/oak_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/oak_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/oak_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/oak_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/oak_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/oak_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/oak_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/oak_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json index c64ba4eba..ba19d8e11 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_oak" }, + "facing=west": { "model": "entity/signs/wall_oak", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_oak", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_oak", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json index bc91bcfc3..62fb9ad34 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/orange_head" }, + "part=head,facing=east": { "model": "entity/bed/orange_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/orange_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/orange_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/orange_foot" }, + "part=foot,facing=east": { "model": "entity/bed/orange_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/orange_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/orange_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json index ecc701623..80cb0f81f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/pink_head" }, + "part=head,facing=east": { "model": "entity/bed/pink_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/pink_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/pink_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/pink_foot" }, + "part=foot,facing=east": { "model": "entity/bed/pink_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/pink_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/pink_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json index 0d728b5ab..b317d9ea2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/purple_head" }, + "part=head,facing=east": { "model": "entity/bed/purple_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/purple_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/purple_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/purple_foot" }, + "part=foot,facing=east": { "model": "entity/bed/purple_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/purple_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/purple_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json index b68b410f1..2b340a294 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/red_head" }, + "part=head,facing=east": { "model": "entity/bed/red_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/red_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/red_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/red_foot" }, + "part=foot,facing=east": { "model": "entity/bed/red_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/red_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/red_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/sign.json index 18ad7a2dc..caa960746 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "block/sign/old_sign" }, - "rotation=1": { "model": "block/sign/old_sign", "y": 22.5 }, - "rotation=2": { "model": "block/sign/old_sign", "y": 45 }, - "rotation=3": { "model": "block/sign/old_sign", "y": 67.5 }, - "rotation=4": { "model": "block/sign/old_sign", "y": 90 }, - "rotation=5": { "model": "block/sign/old_sign", "y": 112.5 }, - "rotation=6": { "model": "block/sign/old_sign", "y": 135 }, - "rotation=7": { "model": "block/sign/old_sign", "y": 157.5 }, - "rotation=8": { "model": "block/sign/old_sign", "y": 180 }, - "rotation=9": { "model": "block/sign/old_sign", "y": 202.5 }, - "rotation=10": { "model": "block/sign/old_sign", "y": 225 }, - "rotation=11": { "model": "block/sign/old_sign", "y": 247.5 }, - "rotation=12": { "model": "block/sign/old_sign", "y": 270 }, - "rotation=13": { "model": "block/sign/old_sign", "y": 292.5 }, - "rotation=14": { "model": "block/sign/old_sign", "y": 315 }, - "rotation=15": { "model": "block/sign/old_sign", "y": 337.5 } + "rotation=0": { "model": "entity/signs/old_sign" }, + "rotation=1": { "model": "entity/signs/old_sign", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/old_sign", "y": 45 }, + "rotation=3": { "model": "entity/signs/old_sign", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/old_sign", "y": 90 }, + "rotation=5": { "model": "entity/signs/old_sign", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/old_sign", "y": 135 }, + "rotation=7": { "model": "entity/signs/old_sign", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/old_sign", "y": 180 }, + "rotation=9": { "model": "entity/signs/old_sign", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/old_sign", "y": 225 }, + "rotation=11": { "model": "entity/signs/old_sign", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/old_sign", "y": 270 }, + "rotation=13": { "model": "entity/signs/old_sign", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/old_sign", "y": 315 }, + "rotation=15": { "model": "entity/signs/old_sign", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json index f6790367a..88e717c19 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/spruce_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/spruce_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/spruce_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/spruce_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/spruce_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/spruce_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/spruce_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/spruce_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/spruce_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/spruce_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/spruce_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/spruce_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/spruce_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/spruce_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/spruce_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/spruce_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/spruce_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/spruce_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json index a3b63484c..0f9b123fe 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/spruce" }, + "rotation=1": { "model": "entity/signs/spruce", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/spruce", "y": 45 }, + "rotation=3": { "model": "entity/signs/spruce", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/spruce", "y": 90 }, + "rotation=5": { "model": "entity/signs/spruce", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/spruce", "y": 135 }, + "rotation=7": { "model": "entity/signs/spruce", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/spruce", "y": 180 }, + "rotation=9": { "model": "entity/signs/spruce", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/spruce", "y": 225 }, + "rotation=11": { "model": "entity/signs/spruce", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/spruce", "y": 270 }, + "rotation=13": { "model": "entity/signs/spruce", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/spruce", "y": 315 }, + "rotation=15": { "model": "entity/signs/spruce", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json index f9ebeb95b..14f4fa27a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/spruce_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/spruce_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/spruce_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/spruce_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/spruce_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/spruce_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/spruce_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/spruce_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json index d405959fb..e47a58def 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_spruce" }, + "facing=west": { "model": "entity/signs/wall_spruce", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_spruce", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_spruce", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json index 2f455bb37..9f7fe39a7 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json @@ -1,13 +1,13 @@ { "variants": { - "type=single,facing=north": { "model": "block/chest/trapped", "y": 180 }, - "type=single,facing=east": { "model": "block/chest/trapped", "y": 270 }, - "type=single,facing=south": { "model": "block/chest/trapped" }, - "type=single,facing=west": { "model": "block/chest/trapped", "y":90 }, - "type=right,facing=north": { "model": "block/chest/trapped_double", "y": 180 }, - "type=right,facing=east": { "model": "block/chest/trapped_double", "y": 270 }, - "type=right,facing=south": { "model": "block/chest/trapped_double" }, - "type=right,facing=west": { "model": "block/chest/trapped_double", "y":90 }, - "type=left": { "model": "block/chest/left" } + "type=single,facing=north": { "model": "entity/chest/trapped", "y": 180 }, + "type=single,facing=east": { "model": "entity/chest/trapped", "y": 270 }, + "type=single,facing=south": { "model": "entity/chest/trapped" }, + "type=single,facing=west": { "model": "entity/chest/trapped", "y":90 }, + "type=right,facing=north": { "model": "entity/chest/trapped_double", "y": 180 }, + "type=right,facing=east": { "model": "entity/chest/trapped_double", "y": 270 }, + "type=right,facing=south": { "model": "entity/chest/trapped_double" }, + "type=right,facing=west": { "model": "entity/chest/trapped_double", "y":90 }, + "type=left": { "model": "entity/chest/left" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/wall_sign.json index 7f8626224..30ef8238f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/wall_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=south": { "model": "block/sign/old_wall_sign" }, - "facing=west": { "model": "block/sign/old_wall_sign", "y": 90 }, - "facing=north": { "model": "block/sign/old_wall_sign", "y": 180 }, - "facing=east": { "model": "block/sign/old_wall_sign", "y": 270 } + "facing=south": { "model": "entity/signs/old_wall_sign" }, + "facing=west": { "model": "entity/signs/old_wall_sign", "y": 90 }, + "facing=north": { "model": "entity/signs/old_wall_sign", "y": 180 }, + "facing=east": { "model": "entity/signs/old_wall_sign", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json index c48e7820f..60fd00582 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json @@ -1,20 +1,20 @@ { "variants": { - "rotation=0": { "model": "minecraft:entity/warped_hanging_sign", "y": 180 }, - "rotation=1": { "model": "minecraft:entity/warped_hanging_sign", "y": 202 }, - "rotation=2": { "model": "minecraft:entity/warped_hanging_sign", "y": 225 }, - "rotation=3": { "model": "minecraft:entity/warped_hanging_sign", "y": 247 }, - "rotation=4": { "model": "minecraft:entity/warped_hanging_sign", "y": 270 }, - "rotation=5": { "model": "minecraft:entity/warped_hanging_sign", "y": 292 }, - "rotation=6": { "model": "minecraft:entity/warped_hanging_sign", "y": 315 }, - "rotation=7": { "model": "minecraft:entity/warped_hanging_sign", "y": 337 }, - "rotation=8": { "model": "minecraft:entity/warped_hanging_sign" }, - "rotation=9": { "model": "minecraft:entity/warped_hanging_sign", "y": 22 }, - "rotation=10": { "model": "minecraft:entity/warped_hanging_sign", "y": 45 }, - "rotation=11": { "model": "minecraft:entity/warped_hanging_sign", "y": 67 }, - "rotation=12": { "model": "minecraft:entity/warped_hanging_sign", "y": 90 }, - "rotation=13": { "model": "minecraft:entity/warped_hanging_sign", "y": 112 }, - "rotation=14": { "model": "minecraft:entity/warped_hanging_sign", "y": 135 }, - "rotation=15": { "model": "minecraft:entity/warped_hanging_sign", "y": 157 } + "rotation=0": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 180 }, + "rotation=1": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 202 }, + "rotation=2": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 225 }, + "rotation=3": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 247 }, + "rotation=4": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 270 }, + "rotation=5": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 292 }, + "rotation=6": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 315 }, + "rotation=7": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 337 }, + "rotation=8": { "model": "minecraft:entity/signs/warped_hanging_sign" }, + "rotation=9": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 22 }, + "rotation=10": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 45 }, + "rotation=11": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 67 }, + "rotation=12": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 90 }, + "rotation=13": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 112 }, + "rotation=14": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 135 }, + "rotation=15": { "model": "minecraft:entity/signs/warped_hanging_sign", "y": 157 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json index 59eabf864..08213c25b 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json @@ -1,20 +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 } + "rotation=0": { "model": "entity/signs/warped" }, + "rotation=1": { "model": "entity/signs/warped", "y": 22.5 }, + "rotation=2": { "model": "entity/signs/warped", "y": 45 }, + "rotation=3": { "model": "entity/signs/warped", "y": 67.5 }, + "rotation=4": { "model": "entity/signs/warped", "y": 90 }, + "rotation=5": { "model": "entity/signs/warped", "y": 112.5 }, + "rotation=6": { "model": "entity/signs/warped", "y": 135 }, + "rotation=7": { "model": "entity/signs/warped", "y": 157.5 }, + "rotation=8": { "model": "entity/signs/warped", "y": 180 }, + "rotation=9": { "model": "entity/signs/warped", "y": 202.5 }, + "rotation=10": { "model": "entity/signs/warped", "y": 225 }, + "rotation=11": { "model": "entity/signs/warped", "y": 247.5 }, + "rotation=12": { "model": "entity/signs/warped", "y": 270 }, + "rotation=13": { "model": "entity/signs/warped", "y": 292.5 }, + "rotation=14": { "model": "entity/signs/warped", "y": 315 }, + "rotation=15": { "model": "entity/signs/warped", "y": 337.5 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json index 6f7e19c6c..80efadd60 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json @@ -1,8 +1,8 @@ { "variants": { - "facing=east": { "model": "minecraft:entity/warped_wall_hanging_sign", "y": 90 }, - "facing=south": { "model": "minecraft:entity/warped_wall_hanging_sign", "y": 180 }, - "facing=west": { "model": "minecraft:entity/warped_wall_hanging_sign", "y": 270 }, - "facing=north": { "model": "minecraft:entity/warped_wall_hanging_sign" } + "facing=east": { "model": "minecraft:entity/signs/warped_wall_hanging_sign", "y": 90 }, + "facing=south": { "model": "minecraft:entity/signs/warped_wall_hanging_sign", "y": 180 }, + "facing=west": { "model": "minecraft:entity/signs/warped_wall_hanging_sign", "y": 270 }, + "facing=north": { "model": "minecraft:entity/signs/warped_wall_hanging_sign" } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json index 16b35c364..581749cbd 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json @@ -1,8 +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 } + "facing=south": { "model": "entity/signs/wall_warped" }, + "facing=west": { "model": "entity/signs/wall_warped", "y": 90 }, + "facing=north": { "model": "entity/signs/wall_warped", "y": 180 }, + "facing=east": { "model": "entity/signs/wall_warped", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/water.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/water.json index 358729bf5..7a766ffd4 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/water.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/water.json @@ -1,5 +1,8 @@ { "variants": { - "": { "model": "block/water" } + "": { + "renderer": "bluemap:liquid", + "model": "block/water" + } } } diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json index 9f4fd61b7..be2e427af 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/white_head" }, + "part=head,facing=east": { "model": "entity/bed/white_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/white_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/white_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/white_foot" }, + "part=foot,facing=east": { "model": "entity/bed/white_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/white_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/white_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json index 60bf04cd8..43a6d7066 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json +++ b/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json @@ -1,12 +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 } + "part=head,facing=north": { "model": "entity/bed/yellow_head" }, + "part=head,facing=east": { "model": "entity/bed/yellow_head", "y": 90 }, + "part=head,facing=south": { "model": "entity/bed/yellow_head", "y": 180 }, + "part=head,facing=west": { "model": "entity/bed/yellow_head", "y": 270 }, + "part=foot,facing=north": { "model": "entity/bed/yellow_foot" }, + "part=foot,facing=east": { "model": "entity/bed/yellow_foot", "y": 90 }, + "part=foot,facing=south": { "model": "entity/bed/yellow_foot", "y": 180 }, + "part=foot,facing=west": { "model": "entity/bed/yellow_foot", "y": 270 } } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/entitystates/cow.json b/core/src/main/resourceExtensions/assets/minecraft/entitystates/cow.json new file mode 100644 index 000000000..3a1d4c92f --- /dev/null +++ b/core/src/main/resourceExtensions/assets/minecraft/entitystates/cow.json @@ -0,0 +1,5 @@ +{ + "parts": [ + { "model": "minecraft:entity/cow/cow" } + ] +} \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/lava.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/lava.json index 51c0b0d9e..db482171d 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/lava.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/block/lava.json @@ -1,5 +1,4 @@ { - "renderer": "bluemap:liquid", "textures": { "particle": "block/lava_still", "still": "block/lava_still", diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/water.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/water.json index 47316ea37..8f24d8dd0 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/water.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/block/water.json @@ -1,5 +1,4 @@ { - "renderer": "bluemap:liquid", "textures": { "particle": "block/water_still", "still": "block/water_still", diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/bed_foot.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/bed_foot.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/bed_head.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/bed_head.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/black_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/black_foot.json index 0a80336fd..4f2efd9c4 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/black_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/black" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/black_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/black_head.json index f1c7582c4..15ed3ca2b 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/black_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/black" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/blue_foot.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/blue_foot.json index 92e90490b..5ab382cea 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/blue_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/blue" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/blue_head.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/blue_head.json index f1b29785e..eca41ef68 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/blue_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/blue" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/brown_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/brown_foot.json index cd2e6bbe4..e14dc8796 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/brown_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/brown" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/brown_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/brown_head.json index 16747568f..c4a4fb43f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/brown_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/brown" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/cyan_foot.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/cyan_foot.json index 10b724927..90d62113e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/cyan_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/cyan" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/cyan_head.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/cyan_head.json index 85b8be1f8..494c9df6d 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/cyan_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/cyan" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/gray_foot.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/gray_foot.json index c927a5833..d84ed36ce 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/gray_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/gray" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/gray_head.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/gray_head.json index 8384cb16a..2cae8e31c 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/gray_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/gray" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/green_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/green_foot.json index 45a4a74f7..96e30b7f1 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/green_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/green" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/green_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/green_head.json index 147d64099..450a26ca0 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/green_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/green" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_blue_foot.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_blue_foot.json index e43b31f58..793adf68d 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_blue_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/light_blue" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_blue_head.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_blue_head.json index 5e9d5ed16..d213571a5 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_blue_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/light_blue" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_gray_foot.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_gray_foot.json index 6edd85964..c135ec4a8 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_gray_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/light_gray" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_gray_head.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_gray_head.json index 56e77cca9..0987d937f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/light_gray_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/light_gray" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/lime_foot.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/lime_foot.json index d44c5b1c4..6e5369328 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/lime_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/lime" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/lime_head.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/lime_head.json index 5850e0723..19d10e0b1 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/lime_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/lime" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/magenta_foot.json similarity index 61% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/magenta_foot.json index 063a8aafe..781545f24 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/magenta_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/magenta" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/magenta_head.json similarity index 61% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/magenta_head.json index 316bc1301..28cd70ab0 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/magenta_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/magenta" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/orange_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/orange_foot.json index 13c29d09d..7105cd181 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/orange_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/orange" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/orange_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/orange_head.json index ee1666165..ec6fe78a4 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/orange_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/orange" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/pink_foot.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/pink_foot.json index 09e82671b..ee583d6c5 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/pink_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/pink" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/pink_head.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/pink_head.json index de3edc7de..835928cc2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/pink_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/pink" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/purple_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/purple_foot.json index 347f76ec6..ea12b9698 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/purple_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/purple" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/purple_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/purple_head.json index c3b688350..819b2978e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/purple_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/purple" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/red_foot.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/red_foot.json index 4e9397f1b..17931c385 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/red_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/red" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/red_head.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/red_head.json index 9fc8b3411..1f9f87601 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/red_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/red" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/white_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/white_foot.json index 89f9d5122..e2f71360b 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/white_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/white" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/white_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/white_head.json index 31c82e761..71f2f4850 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/white_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/white" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/yellow_foot.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/yellow_foot.json index dfec84f22..0a6195c79 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/yellow_foot.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_foot", + "parent": "entity/bed/bed_foot", "textures": { "bed": "entity/bed/yellow" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/yellow_head.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/yellow_head.json index a1692647e..b9d14ecb2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bed/yellow_head.json @@ -1,5 +1,5 @@ { - "parent": "block/bed/bed_head", + "parent": "entity/bed/bed_head", "textures": { "bed": "entity/bed/yellow" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/chest.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/chest.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest_double.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/chest_double.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest_double.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/chest_double.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/ender.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/ender.json index 5fd48911d..22b4dd078 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/ender.json @@ -1,5 +1,5 @@ { - "parent": "block/chest/chest", + "parent": "entity/chest/chest", "textures": { "chest": "entity/chest/ender" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/left.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/left.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/left.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/normal.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/normal.json index 2d5afc2b9..047978c39 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/normal.json @@ -1,5 +1,5 @@ { - "parent": "block/chest/chest", + "parent": "entity/chest/chest", "textures": { "chest": "entity/chest/normal" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/normal_double.json similarity index 61% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/normal_double.json index 711a0022a..b0668f71d 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/normal_double.json @@ -1,5 +1,5 @@ { - "parent": "block/chest/chest_double", + "parent": "entity/chest/chest_double", "textures": { "chest": "entity/chest/normal_double" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/trapped.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/trapped.json index 9ab9df7a7..fb9634b2c 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/trapped.json @@ -1,5 +1,5 @@ { - "parent": "block/chest/chest", + "parent": "entity/chest/chest", "textures": { "chest": "entity/chest/trapped" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/trapped_double.json similarity index 61% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/trapped_double.json index 8f55b9435..a77f0b43c 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/chest/trapped_double.json @@ -1,5 +1,5 @@ { - "parent": "block/chest/chest_double", + "parent": "entity/chest/chest_double", "textures": { "chest": "entity/chest/trapped_double" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/cow/cow.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/cow/cow.json new file mode 100644 index 000000000..c64b83c7a --- /dev/null +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/cow/cow.json @@ -0,0 +1,135 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [64, 32], + "textures": { + "particle": "entity/cow/cow", + "body": "entity/cow/cow" + }, + "elements": [ + { + "name": "head", + "from": [-4, 16, -14], + "to": [4, 24, -8], + "rotation": {"angle": 0, "axis": "x", "origin": [2, 22, -14]}, + "faces": { + "north": {"uv": [1.5, 3, 3.5, 7], "texture": "#body"}, + "east": {"uv": [0, 3, 1.5, 7], "texture": "#body"}, + "south": {"uv": [5, 3, 7, 7], "texture": "#body"}, + "west": {"uv": [3.5, 3, 5, 7], "texture": "#body"}, + "up": {"uv": [1.5, 0, 3.5, 3], "texture": "#body"}, + "down": {"uv": [3.5, 0, 5.5, 3], "texture": "#body"} + } + }, + { + "name": "body", + "from": [-6, 12, -8], + "to": [6, 22, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [-6, 12, -8]}, + "faces": { + "north": {"uv": [7, 2, 10, 7], "texture": "#body"}, + "east": {"uv": [4.5, 7, 7, 16], "rotation": 90, "texture": "#body"}, + "south": {"uv": [10, 2, 13, 7], "texture": "#body"}, + "west": {"uv": [10, 7, 12.5, 16], "rotation": 270, "texture": "#body"}, + "up": {"uv": [12.5, 7, 15.5, 16], "texture": "#body"}, + "down": {"uv": [7, 7, 10, 16], "rotation": 180, "texture": "#body"} + } + }, + { + "name": "horn_right", + "from": [4, 22, -12], + "to": [5, 25, -11], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 22, -13]}, + "faces": { + "north": {"uv": [6.25, 0.5, 6.5, 2], "texture": "#body"}, + "east": {"uv": [6, 0.5, 6.25, 2], "texture": "#body"}, + "south": {"uv": [5.75, 0.5, 6, 2], "texture": "#body"}, + "west": {"uv": [5.5, 0.5, 5.75, 2], "texture": "#body"}, + "up": {"uv": [5.75, 0, 6, 0.5], "texture": "#body"}, + "down": {"uv": [6, 0, 6.25, 0.5], "texture": "#body"} + } + }, + { + "name": "horn_left", + "from": [-5, 22, -12], + "to": [-4, 25, -11], + "rotation": {"angle": 0, "axis": "x", "origin": [-6, 22, -13]}, + "faces": { + "north": {"uv": [6.5, 0.5, 6.25, 2], "texture": "#body"}, + "east": {"uv": [5.75, 0.5, 5.5, 2], "texture": "#body"}, + "south": {"uv": [6, 0.5, 5.75, 2], "texture": "#body"}, + "west": {"uv": [6.25, 0.5, 6, 2], "texture": "#body"}, + "up": {"uv": [6, 0, 5.75, 0.5], "texture": "#body"}, + "down": {"uv": [6.25, 0, 6, 0.5], "texture": "#body"} + } + }, + { + "name": "leg_front_right", + "from": [2, 0, -8], + "to": [6, 12, -4], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, -6]}, + "faces": { + "north": {"uv": [1, 10, 2, 16], "texture": "#body"}, + "east": {"uv": [0, 10, 1, 16], "texture": "#body"}, + "south": {"uv": [3, 10, 4, 16], "texture": "#body"}, + "west": {"uv": [2, 10, 3, 16], "texture": "#body"}, + "up": {"uv": [1, 8, 2, 10], "texture": "#body"}, + "down": {"uv": [2, 8, 3, 10], "texture": "#body"} + } + }, + { + "name": "leg_front_left", + "from": [-6, 0, -8], + "to": [-2, 12, -4], + "rotation": {"angle": 0, "axis": "y", "origin": [-4, 0, -6]}, + "faces": { + "north": {"uv": [1, 10, 2, 16], "texture": "#body"}, + "east": {"uv": [0, 10, 1, 16], "texture": "#body"}, + "south": {"uv": [3, 10, 4, 16], "texture": "#body"}, + "west": {"uv": [2, 10, 3, 16], "texture": "#body"}, + "up": {"uv": [1, 8, 2, 10], "texture": "#body"}, + "down": {"uv": [2, 8, 3, 10], "texture": "#body"} + } + }, + { + "name": "leg_back_left", + "from": [-6, 0, 5], + "to": [-2, 12, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [-4, 0, 7]}, + "faces": { + "north": {"uv": [1, 10, 2, 16], "texture": "#body"}, + "east": {"uv": [0, 10, 1, 16], "texture": "#body"}, + "south": {"uv": [3, 10, 4, 16], "texture": "#body"}, + "west": {"uv": [2, 10, 3, 16], "texture": "#body"}, + "up": {"uv": [1, 8, 2, 10], "texture": "#body"}, + "down": {"uv": [2, 8, 3, 10], "texture": "#body"} + } + }, + { + "name": "leg_back_right", + "from": [2, 0, 5], + "to": [6, 12, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 0, 7]}, + "faces": { + "north": {"uv": [1, 10, 2, 16], "texture": "#body"}, + "east": {"uv": [0, 10, 1, 16], "texture": "#body"}, + "south": {"uv": [3, 10, 4, 16], "texture": "#body"}, + "west": {"uv": [2, 10, 3, 16], "texture": "#body"}, + "up": {"uv": [1, 8, 2, 10], "texture": "#body"}, + "down": {"uv": [2, 8, 3, 10], "texture": "#body"} + } + }, + { + "name": "udder", + "from": [-2, 11, 4], + "to": [2, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 11, 5]}, + "faces": { + "north": {"uv": [13.25, 0, 14.25, 0.5], "texture": "#body"}, + "east": {"uv": [14.25, 0.5, 14.5, 3.5], "rotation": 90, "texture": "#body"}, + "south": {"uv": [14.25, 0, 15.25, 0.5], "texture": "#body"}, + "west": {"uv": [13, 0.5, 13.25, 3.5], "rotation": 90, "texture": "#body"}, + "down": {"uv": [13.25, 0.5, 14.25, 3.5], "texture": "#body"} + } + } + ] +} \ No newline at end of file diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia.json index b0b67f8a5..49c1c065f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/acacia" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia_hanging_sign.json index d3d2a6417..cf17aad85 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/acacia" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia_wall_hanging_sign.json index 8e39bd9cf..dde538004 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/acacia_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/acacia" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo.json index ed9610a41..53b4b02c2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/bamboo" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo_hanging_sign.json index 659906071..f617a2250 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/bamboo" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo_wall_hanging_sign.json index 7dbf04361..16f35466e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/bamboo_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/bamboo" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch.json index cdf739219..93e54f0d3 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/birch" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch_hanging_sign.json similarity index 73% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch_hanging_sign.json index 27a93a85c..37d724d3e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/birch" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch_wall_hanging_sign.json index 2cff5eb90..1c3b4dc8e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/birch_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/birch" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry.json index e9ad375ca..c3bcf9a79 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/cherry" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry_hanging_sign.json index 944534dd2..e723b37d3 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/cherry" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry_wall_hanging_sign.json index 8844a253a..b5716376e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/cherry_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/cherry" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson.json index e4dd0574d..6de7d3675 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/crimson" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson_hanging_sign.json index c516894c9..1b7f76218 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/crimson" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson_wall_hanging_sign.json index d89c0b57b..03daaa9c2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/crimson_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/crimson" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak.json similarity index 64% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak.json index 4f9c5d513..71a092d60 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/dark_oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak_hanging_sign.json index 26d0ca517..14d2846d5 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/dark_oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak_wall_hanging_sign.json index ec6d479ba..3c4b04a31 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/dark_oak_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/dark_oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle.json index 8814b6408..266d65acb 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/jungle" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle_hanging_sign.json index 021a9aef0..9e8ac705f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/jungle" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle_wall_hanging_sign.json index ffc8d2e47..a6f82e1a6 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/jungle_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/jungle" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove.json similarity index 64% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove.json index 64afac8cd..a30ea5356 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/mangrove" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove_hanging_sign.json index 21bfdc043..1a3fdd64d 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/mangrove" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove_wall_hanging_sign.json index 216124921..eb39c65b0 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/mangrove_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/mangrove" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak.json similarity index 62% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak.json index 08bccfb5e..58057e56b 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak_hanging_sign.json similarity index 73% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak_hanging_sign.json index 51e6cad6e..66fb6b125 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak_wall_hanging_sign.json similarity index 71% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak_wall_hanging_sign.json index 30c430902..ab622081a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/oak_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/old_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/old_sign.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/old_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/old_sign.json index b1a7aed63..86d38415f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/old_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/old_sign.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/sign" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/old_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/old_wall_sign.json similarity index 56% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/old_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/old_wall_sign.json index f4e3fd7bc..7990ebd72 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/old_wall_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/old_wall_sign.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/sign" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/sign.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/sign.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce.json index 53435ceed..2ed34773f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/spruce" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce_hanging_sign.json index ce157113c..aa1640d8e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/spruce" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce_wall_hanging_sign.json index 59dc872f1..158a5f015 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/spruce_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/spruce" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_acacia.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_acacia.json index d2ed6e5c5..5b3b64738 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_acacia.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/acacia" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_bamboo.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_bamboo.json index f3201b2b1..1652a7b9e 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_bamboo.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/bamboo" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_birch.json similarity index 59% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_birch.json index 42a55a8e5..ab450b355 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_birch.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/birch" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_cherry.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_cherry.json index ae5c0976d..d408e05d4 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_cherry.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/cherry" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_crimson.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_crimson.json index 482966bb4..b2e0bcec2 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_crimson.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/crimson" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_dark_oak.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_dark_oak.json index 185a30f2e..b1df01ffa 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_dark_oak.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/dark_oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_hanging_sign.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_hanging_sign.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_jungle.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_jungle.json index c0797f718..46929718f 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_jungle.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/jungle" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_mangrove.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_mangrove.json index 178f6430c..40b411946 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_mangrove.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/mangrove" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_oak.json similarity index 58% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_oak.json index 9c2b8e77e..037b27a9a 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_oak.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/oak" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_sign.json similarity index 100% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_sign.json diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_spruce.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_spruce.json index 20dd22689..4240fd2db 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_spruce.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/spruce" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_warped.json similarity index 60% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_warped.json index ac575fa17..cc47638f4 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/wall_warped.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/wall_sign", + "parent": "entity/signs/wall_sign", "textures": { "sign": "entity/signs/warped" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped.json similarity index 63% rename from core/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped.json index 8b5cd9ee8..4c3701620 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped.json @@ -1,5 +1,5 @@ { - "parent": "block/sign/sign", + "parent": "entity/signs/sign", "textures": { "sign": "entity/signs/warped" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped_hanging_sign.json similarity index 74% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped_hanging_sign.json index f04b36cbd..f32595284 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/hanging_sign", + "parent": "minecraft:entity/signs/hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/warped" } diff --git a/core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped_wall_hanging_sign.json similarity index 72% rename from core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped_wall_hanging_sign.json index cd9301fd1..ebaaff143 100644 --- a/core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json +++ b/core/src/main/resourceExtensions/assets/minecraft/models/entity/signs/warped_wall_hanging_sign.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench by TyBraniff for Bluemaps support.", - "parent": "minecraft:entity/wall_hanging_sign", + "parent": "minecraft:entity/signs/wall_hanging_sign", "textures": { "wood": "minecraft:entity/signs/hanging/warped" } diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json index 938530571..b15010da5 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json @@ -1,16 +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"} + "type=single,facing=north": { "model": "entity/chest/normal", "y": 90 }, + "type=single,facing=east": { "model": "entity/chest/normal", "y": 180 }, + "type=single,facing=south": { "model": "entity/chest/normal", "y": 270 }, + "type=single,facing=west": { "model": "entity/chest/normal"}, + "type=right,facing=north": { "model": "entity/chest/normal_double_right", "y": 90 }, + "type=right,facing=east": { "model": "entity/chest/normal_double_right", "y": 180 }, + "type=right,facing=south": { "model": "entity/chest/normal_double_right", "y": 270 }, + "type=right,facing=west": { "model": "entity/chest/normal_double_right"}, + "type=left,facing=north": { "model": "entity/chest/normal_double_left", "y": 90 }, + "type=left,facing=east": { "model": "entity/chest/normal_double_left","y": 180 }, + "type=left,facing=south": { "model": "entity/chest/normal_double_left", "y": 270 }, + "type=left,facing=west": { "model": "entity/chest/normal_double_left"} } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json index 9997264bb..d324cef8b 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json @@ -1,8 +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"} + "facing=north": { "model": "entity/chest/ender", "y": 90 }, + "facing=east": { "model": "entity/chest/ender", "y": 180 }, + "facing=south": { "model": "entity/chest/ender", "y":270 }, + "facing=west": { "model": "entity/chest/ender"} } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json index 7ef695c69..baf80ce6a 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json @@ -1,16 +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"} + "type=single,facing=north": { "model": "entity/chest/trapped", "y": 90 }, + "type=single,facing=east": { "model": "entity/chest/trapped", "y": 180 }, + "type=single,facing=south": { "model": "entity/chest/trapped", "y":270 }, + "type=single,facing=west": { "model": "entity/chest/trapped"}, + "type=right,facing=north": { "model": "entity/chest/trapped_double_right", "y": 90 }, + "type=right,facing=east": { "model": "entity/chest/trapped_double_right", "y": 180 }, + "type=right,facing=south": { "model": "entity/chest/trapped_double_right", "y":270 }, + "type=right,facing=west": { "model": "entity/chest/trapped_double_right"}, + "type=left,facing=north": { "model": "entity/chest/trapped_double_left", "y": 90 }, + "type=left,facing=east": { "model": "entity/chest/trapped_double_left", "y": 180 }, + "type=left,facing=south": { "model": "entity/chest/trapped_double_left", "y":270 }, + "type=left,facing=west": { "model": "entity/chest/trapped_double_left"} } } \ No newline at end of file diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/chest.json similarity index 100% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/chest.json diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_left.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/chest_double_left.json similarity index 100% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_left.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/chest_double_left.json diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_right.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/chest_double_right.json similarity index 100% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_right.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/chest_double_right.json diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/normal_double_left.json similarity index 60% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/normal_double_left.json index 1aaf047d6..38f5ca43b 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/normal_double_left.json @@ -1,5 +1,5 @@ { - "parent":"block/chest/chest_double_left", + "parent":"entity/chest/chest_double_left", "textures": { "chest": "entity/chest/normal_left" } diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/normal_double_right.json similarity index 60% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/normal_double_right.json index a831aabfc..32cee5c62 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/normal_double_right.json @@ -1,5 +1,5 @@ { - "parent":"block/chest/chest_double_right", + "parent":"entity/chest/chest_double_right", "textures": { "chest": "entity/chest/normal_right" } diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/trapped_double_left.json similarity index 61% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/trapped_double_left.json index bf0fd65b3..7b82abcb0 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/trapped_double_left.json @@ -1,5 +1,5 @@ { - "parent":"block/chest/chest_double_left", + "parent":"entity/chest/chest_double_left", "textures": { "chest": "entity/chest/trapped_left" } diff --git a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/trapped_double_right.json similarity index 60% rename from core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/trapped_double_right.json index 2ec66dcf2..fb270b710 100644 --- a/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json +++ b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/entity/chest/trapped_double_right.json @@ -1,5 +1,5 @@ { - "parent":"block/chest/chest_double_right", + "parent":"entity/chest/chest_double_right", "textures": { "chest": "entity/chest/trapped_right" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 656bbeace..a2e2621b7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ spongegradle = "2.2.0" [libraries] aircompressor = { module = "io.airlift:aircompressor", version = "0.27" } -bluenbt = { module = "de.bluecolored.bluenbt:BlueNBT", version = "3.0.2" } +bluenbt = { module = "de.bluecolored:bluenbt", version = "3.3.0" } brigadier = { module = "com.mojang:brigadier", version = "1.0.17" } bstats-bukkit = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" } bstats-sponge = { module = "org.bstats:bstats-sponge", version.ref = "bstats" } diff --git a/implementations/fabric/build.gradle.kts b/implementations/fabric/build.gradle.kts index d7e833d1c..f3a6d6ed9 100644 --- a/implementations/fabric/build.gradle.kts +++ b/implementations/fabric/build.gradle.kts @@ -34,6 +34,7 @@ dependencies { // jarInJar include ( libs.flow.math ) + include ( libs.bluenbt ) } @@ -43,14 +44,12 @@ tasks.shadowJar { // exclude jarInJar dependencies { exclude( dependency ( libs.flow.math.get() ) ) + exclude( dependency ( libs.bluenbt.get() ) ) } // airlift relocate ("io.airlift", "de.bluecolored.shadow.airlift") - // bluenbt - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - // caffeine relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") diff --git a/implementations/forge/build.gradle.kts b/implementations/forge/build.gradle.kts index 2aa25706e..cfe7bb2db 100644 --- a/implementations/forge/build.gradle.kts +++ b/implementations/forge/build.gradle.kts @@ -26,6 +26,7 @@ dependencies { minecraft ( "net.minecraftforge", "forge", "$minecraftVersion-$forgeVersion" ) jarJar ( libs.flow.math.get().group, libs.flow.math.get().name , "[${libs.flow.math.get().version},)" ) + jarJar ( libs.bluenbt.get().group, libs.bluenbt.get().name , "[${libs.bluenbt.get().version},)" ) } @@ -40,14 +41,12 @@ tasks.shadowJar { // exclude jarInJar dependencies { exclude( dependency ( libs.flow.math.get() ) ) + exclude( dependency ( libs.bluenbt.get() ) ) } // airlift relocate ("io.airlift", "de.bluecolored.shadow.airlift") - // bluenbt - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - // caffeine relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") diff --git a/implementations/neoforge/build.gradle.kts b/implementations/neoforge/build.gradle.kts index 8960713bb..3cba674ed 100644 --- a/implementations/neoforge/build.gradle.kts +++ b/implementations/neoforge/build.gradle.kts @@ -27,6 +27,7 @@ dependencies { } jarJar ( libs.flow.math.get().group, libs.flow.math.get().name , "[${libs.flow.math.get().version},)" ) + jarJar ( libs.bluenbt.get().group, libs.bluenbt.get().name , "[${libs.bluenbt.get().version},)" ) } tasks.shadowJar { @@ -35,14 +36,12 @@ tasks.shadowJar { // exclude jarInJar dependencies { exclude( dependency ( libs.flow.math.get() ) ) + exclude( dependency ( libs.bluenbt.get() ) ) } // airlift relocate ("io.airlift", "de.bluecolored.shadow.airlift") - // bluenbt - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - // caffeine relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") diff --git a/implementations/paper/build.gradle.kts b/implementations/paper/build.gradle.kts index 433ee8fc7..4f6b03c78 100644 --- a/implementations/paper/build.gradle.kts +++ b/implementations/paper/build.gradle.kts @@ -32,9 +32,6 @@ tasks.shadowJar { // airlift relocate ("io.airlift", "de.bluecolored.shadow.airlift") - // bluenbt - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - // brigadier relocate ("com.mojang.brigadier", "de.bluecolored.shadow.brigadier") diff --git a/implementations/spigot/build.gradle.kts b/implementations/spigot/build.gradle.kts index 028bb127a..828f1d4bb 100644 --- a/implementations/spigot/build.gradle.kts +++ b/implementations/spigot/build.gradle.kts @@ -28,9 +28,6 @@ tasks.shadowJar { // brigadier relocate ("com.mojang.brigadier", "de.bluecolored.shadow.brigadier") - // bluenbt - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - // caffeine relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") diff --git a/implementations/sponge/build.gradle.kts b/implementations/sponge/build.gradle.kts index 641364bd7..dc54cdc47 100644 --- a/implementations/sponge/build.gradle.kts +++ b/implementations/sponge/build.gradle.kts @@ -48,9 +48,6 @@ tasks.shadowJar { // brigadier relocate ("com.mojang.brigadier", "de.bluecolored.shadow.brigadier") - // bluenbt - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - // caffeine relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework")