From 1e25230e424cfeb191f412aa61c6810409b320e6 Mon Sep 17 00:00:00 2001 From: Fox Date: Sun, 20 Oct 2024 23:21:12 +0200 Subject: [PATCH 1/7] make cork logs regrow bark, added cork bark --- .../growthcraft/cellar/block/CorkLog.java | 59 +++++++++++++++++++ .../lib/block/GrowthcraftLogBlock.java | 6 -- .../models/item/cork_bark.json | 6 ++ 3 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 src/main/java/growthcraft/cellar/block/CorkLog.java create mode 100644 src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json diff --git a/src/main/java/growthcraft/cellar/block/CorkLog.java b/src/main/java/growthcraft/cellar/block/CorkLog.java new file mode 100644 index 00000000..92651470 --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/CorkLog.java @@ -0,0 +1,59 @@ +package growthcraft.cellar.block; + +import org.jetbrains.annotations.Nullable; + +import growthcraft.cellar.init.GrowthcraftCellarBlocks; +import growthcraft.cellar.init.GrowthcraftCellarItems; +import growthcraft.lib.block.GrowthcraftLogBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.item.AxeItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraftforge.common.ToolAction; + +public class CorkLog extends GrowthcraftLogBlock{ + public static final BooleanProperty REGROW = BooleanProperty.create("regrow"); + + @Override + public void randomTick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) { + if (pRandom.nextInt((int)(25.0F / 2) + 1) == 0){ + pLevel.setBlockAndUpdate(pPos, GrowthcraftCellarBlocks.CORK_WOOD_LOG.get().defaultBlockState().setValue(AXIS, pState.getValue(AXIS)).setValue(REGROW, pState.getValue(REGROW))); + } + } + + @Override + public boolean isRandomlyTicking(BlockState pState) { + return pState.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get()) && pState.getValue(REGROW); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder blockStateBuilder) { + super.createBlockStateDefinition(blockStateBuilder.add(REGROW)); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext pContext) { + return this.defaultBlockState().setValue(REGROW, false); + } + + @Override + public @Nullable BlockState getToolModifiedState(BlockState state, UseOnContext context, ToolAction toolAction, boolean simulate) { + if (context.getItemInHand().getItem() instanceof AxeItem) { + if(state.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG.get())) { + popResource(context.getLevel(), context.getClickedPos(), new ItemStack(GrowthcraftCellarItems.CORK_BARK.get())); + return GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)).setValue(REGROW, state.getValue(REGROW)); + } + if(state.is(GrowthcraftCellarBlocks.CORK_WOOD.get())) { + return GrowthcraftCellarBlocks.CORK_WOOD_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); + } + } + return super.getToolModifiedState(state, context, toolAction, simulate); + } +} diff --git a/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java b/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java index 2c7975e0..279cba1f 100644 --- a/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java +++ b/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java @@ -58,12 +58,6 @@ public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, if(state.is(GrowthcraftApplesBlocks.APPLE_WOOD.get())) { return GrowthcraftApplesBlocks.APPLE_WOOD_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); } - if(state.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG.get())) { - return GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); - } - if(state.is(GrowthcraftCellarBlocks.CORK_WOOD.get())) { - return GrowthcraftCellarBlocks.CORK_WOOD_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); - } } return super.getToolModifiedState(state, context, toolAction, simulate); } diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json b/src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json new file mode 100644 index 00000000..f427e300 --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "growthcraft_cellar:item/cork_bark" + } +} \ No newline at end of file From 045fd8b25e597e5d1dd647999c4bc4d02cb8e410 Mon Sep 17 00:00:00 2001 From: Fox Date: Sun, 20 Oct 2024 23:22:02 +0200 Subject: [PATCH 2/7] 3d model for the wine bottle --- .../models/item/potion_wine.json | 4988 ++++++++++++++++- .../models/item/potion_wine_old.json | 124 + 2 files changed, 5041 insertions(+), 71 deletions(-) create mode 100644 src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json index fb4e2a13..8d3f84d2 100644 --- a/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json +++ b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json @@ -1,124 +1,4970 @@ { - "parent": "item/generated", + "credit": "Made with Blockbench", "textures": { - "layer0": "growthcraft_cellar:item/potion/brew_bottle_contents", - "layer1": "growthcraft_cellar:item/potion/brew_bottle_base" + "0": "block/white_stained_glass", + "1": "block/spruce_planks", + "particle": "block/white_stained_glass" }, - "gui_light": "front", - "display": { - "ground": { - "rotation": [ - 0, - 0, - 0 + "elements": [ + { + "from": [ + 6, + 0.25, + 6 ], - "translation": [ + "to": [ + 10, + 1.25, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 4 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, 0, - 2, - 0 + 10 ], - "scale": [ - 0.5, - 0.5, - 0.5 - ] + "to": [ + 10, + 1, + 11 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } }, - "head": { - "rotation": [ + { + "from": [ + 6, 0, - 180, - 0 + 5 ], - "translation": [ + "to": [ + 10, + 1, + 6 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, 0, - 13, - 7 + 6 ], - "scale": [ + "to": [ + 6, 1, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 0, + 6 + ], + "to": [ + 11, 1, - 1 - ] + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 0.75, + 4.5 + ], + "to": [ + 10, + 11.75, + 5.5 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 0.75, + 5 + ], + "to": [ + 6, + 11.75, + 6 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 4.5, + 0.75, + 6 + ], + "to": [ + 5.5, + 11.75, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 0.75, + 10 + ], + "to": [ + 6, + 11.75, + 11 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 0.75, + 10.5 + ], + "to": [ + 10, + 11.75, + 11.5 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 0.75, + 10 + ], + "to": [ + 11, + 11.75, + 11 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10.5, + 0.75, + 6 + ], + "to": [ + 11.5, + 11.75, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 0.75, + 5 + ], + "to": [ + 11, + 11.75, + 6 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10.5, + 11.75, + 7 + ], + "to": [ + 11.5, + 13.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 11.75, + 4.5 + ], + "to": [ + 9, + 13.75, + 5.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 4.5, + 11.75, + 7 + ], + "to": [ + 5.5, + 13.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 11.75, + 10.5 + ], + "to": [ + 9, + 13.75, + 11.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 11.75, + 10 + ], + "to": [ + 10, + 13.75, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 11.75, + 9 + ], + "to": [ + 11, + 13.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 11.75, + 9 + ], + "to": [ + 6, + 13.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 11.75, + 10 + ], + "to": [ + 7, + 13.75, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 11.75, + 6 + ], + "to": [ + 6, + 13.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 11.75, + 5 + ], + "to": [ + 7, + 13.75, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 11.75, + 5 + ], + "to": [ + 10, + 13.75, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 11.75, + 6 + ], + "to": [ + 11, + 13.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 13.75, + 7 + ], + "to": [ + 11, + 14.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 13.75, + 5 + ], + "to": [ + 9, + 14.75, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 13.75, + 7 + ], + "to": [ + 6, + 14.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 13.75, + 10 + ], + "to": [ + 9, + 14.75, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 13.75, + 9.5 + ], + "to": [ + 10, + 14.75, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9.5, + 13.75, + 9 + ], + "to": [ + 10.5, + 14.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5.5, + 13.75, + 9 + ], + "to": [ + 6.5, + 14.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 13.75, + 9.5 + ], + "to": [ + 7, + 14.75, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 5.5, + 13.75, + 6 + ], + "to": [ + 6.5, + 14.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 13.75, + 5.5 + ], + "to": [ + 7, + 14.75, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 13.75, + 5.5 + ], + "to": [ + 10, + 14.75, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 9.5, + 13.75, + 6 + ], + "to": [ + 10.5, + 14.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 9.5, + 14.75, + 7 + ], + "to": [ + 10.5, + 15.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 14.75, + 5.5 + ], + "to": [ + 9, + 15.75, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } }, + { + "from": [ + 5.5, + 14.75, + 7 + ], + "to": [ + 6.5, + 15.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 14.75, + 9.5 + ], + "to": [ + 9, + 15.75, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 14.75, + 9 + ], + "to": [ + 10, + 15.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 14.75, + 9 + ], + "to": [ + 7, + 15.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 14.75, + 6 + ], + "to": [ + 7, + 15.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 14.75, + 6 + ], + "to": [ + 10, + 15.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 15.75, + 7 + ], + "to": [ + 10, + 19.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 15.75, + 6 + ], + "to": [ + 9, + 19.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 15.75, + 7 + ], + "to": [ + 7, + 19.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 15.75, + 9 + ], + "to": [ + 9, + 19.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 15.75, + 9 + ], + "to": [ + 9.5, + 19.75, + 9.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6.5, + 15.75, + 9 + ], + "to": [ + 7, + 19.75, + 9.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 15.75, + 6.5 + ], + "to": [ + 9.5, + 19.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0.5, + 0, + 0, + 0.5 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0.5, + 0, + 0, + 0.5 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6.5, + 15.75, + 6.5 + ], + "to": [ + 7, + 19.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0.5, + 0.5, + 0 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0.5, + 0.5, + 0 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 19, + 6.75 + ], + "to": [ + 9.25, + 22, + 9.25 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 15, + 27, + 15 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 2.5, + 2.5 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 0, + 2.5, + 2.5 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 9.5, + 19.25, + 7 + ], + "to": [ + 10.5, + 20.25, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 19.25, + 5.5 + ], + "to": [ + 9, + 20.25, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5.5, + 19.25, + 7 + ], + "to": [ + 6.5, + 20.25, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 19.25, + 9.5 + ], + "to": [ + 9, + 20.25, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 19.25, + 9 + ], + "to": [ + 10, + 20.25, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 19.25, + 9 + ], + "to": [ + 7, + 20.25, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 19.25, + 6 + ], + "to": [ + 7, + 20.25, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 19.25, + 6 + ], + "to": [ + 10, + 20.25, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + } + ], + "display": { "thirdperson_righthand": { "rotation": [ - 90, - 270, - 55 + 27.5, + -1, + 34.5 ], "translation": [ - 0, - 1.25, - -1.0 + 0.5, + -2.25, + -1.25 ], "scale": [ - 0.4, - 0.4, - 0.4 + 0.5, + 0.5, + 0.5 ] }, "thirdperson_lefthand": { "rotation": [ - 0, - 90, - 55 + 27.5, + -1, + 34.5 ], "translation": [ - 0, - 1.25, - -1.0 + 0.5, + -2.25, + -1.25 ], "scale": [ - 0.4, - 0.4, - 0.4 + 0.5, + 0.5, + 0.5 ] }, "firstperson_righthand": { "rotation": [ - 0, - -90, + 3, + -19, 25 ], "translation": [ - 1.13, - 3.2, - 1.13 - ], - "scale": [ - 0.68, - 0.68, - 0.68 + 3.25, + -3.5, + 0 ] }, "firstperson_lefthand": { + "rotation": [ + 3, + -19, + 25 + ], + "translation": [ + 3.25, + -3.5, + 0 + ] + }, + "ground": { "rotation": [ 0, - 90, - -25 + 74, + 72 ], + "scale": [ + 0.8, + 0.8, + 0.8 + ] + }, + "gui": { "translation": [ - 1.13, - 3.2, - 1.13 + 0, + -2.5, + 0 ], "scale": [ - 0.68, - 0.68, - 0.68 + 0.8, + 0.8, + 0.8 ] }, - "fixed": { + "head": { "rotation": [ + -116, 0, - 180, 0 ], - "scale": [ - 1, - 1, - 1 + "translation": [ + 0, + -3.5, + -2.5 + ] + }, + "fixed": { + "translation": [ + 0, + -2.25, + 0 + ] + } + }, + "groups": [ + 0, + 1, + 2, + 3, + 4, + { + "name": "group", + "origin": [ + 8, + 8, + 8 + ], + "children": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61 ] } - } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json new file mode 100644 index 00000000..fb4e2a13 --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json @@ -0,0 +1,124 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "growthcraft_cellar:item/potion/brew_bottle_contents", + "layer1": "growthcraft_cellar:item/potion/brew_bottle_base" + }, + "gui_light": "front", + "display": { + "ground": { + "rotation": [ + 0, + 0, + 0 + ], + "translation": [ + 0, + 2, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "head": { + "rotation": [ + 0, + 180, + 0 + ], + "translation": [ + 0, + 13, + 7 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + "thirdperson_righthand": { + "rotation": [ + 90, + 270, + 55 + ], + "translation": [ + 0, + 1.25, + -1.0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 0, + 90, + 55 + ], + "translation": [ + 0, + 1.25, + -1.0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "firstperson_righthand": { + "rotation": [ + 0, + -90, + 25 + ], + "translation": [ + 1.13, + 3.2, + 1.13 + ], + "scale": [ + 0.68, + 0.68, + 0.68 + ] + }, + "firstperson_lefthand": { + "rotation": [ + 0, + 90, + -25 + ], + "translation": [ + 1.13, + 3.2, + 1.13 + ], + "scale": [ + 0.68, + 0.68, + 0.68 + ] + }, + "fixed": { + "rotation": [ + 0, + 180, + 0 + ], + "scale": [ + 1, + 1, + 1 + ] + } + } +} \ No newline at end of file From a4a3490135c1cecb122075e986c66eca78bc7215 Mon Sep 17 00:00:00 2001 From: Fox Date: Sun, 20 Oct 2024 23:22:24 +0200 Subject: [PATCH 3/7] add cork coaster --- .../cellar/block/CorkCoasterBlock.java | 95 ++++++++++ .../block/entity/CorkCoasterBlockEntity.java | 168 ++++++++++++++++++ .../CorkCoasterBlockEntityRenderer.java | 38 ++++ .../init/GrowthcraftCellarBlockEntities.java | 8 + .../cellar/init/GrowthcraftCellarBlocks.java | 11 +- .../cellar/init/GrowthcraftCellarItems.java | 10 +- ...GrowthcraftCellarBlockEntityRenderers.java | 2 + .../growthcraft/cellar/shared/Reference.java | 2 + .../providers/GrowthcraftCoreBlockTags.java | 8 +- .../blockstates/cork_coaster.json | 5 + .../models/block/cork_coaster.json | 166 +++++++++++++++++ .../models/item/cork_coaster.json | 3 + .../textures/block/cork/cork_coaster.png | Bin 0 -> 2243 bytes 13 files changed, 506 insertions(+), 10 deletions(-) create mode 100644 src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java create mode 100644 src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java create mode 100644 src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java create mode 100644 src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json create mode 100644 src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json create mode 100644 src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json create mode 100644 src/main/resources/assets/growthcraft_cellar/textures/block/cork/cork_coaster.png diff --git a/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java b/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java new file mode 100644 index 00000000..876adf82 --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java @@ -0,0 +1,95 @@ +package growthcraft.cellar.block; + +import growthcraft.cellar.block.entity.CorkCoasterBlockEntity; +import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; +import growthcraft.core.utils.BlockPropertiesUtils; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.phys.BlockHitResult; + +public class CorkCoasterBlock extends BaseEntityBlock { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + + public CorkCoasterBlock() { + this(getInitProperties()); + } + + protected CorkCoasterBlock(Properties pProperties) { + super(pProperties); + } + + private static Properties getInitProperties() { + Properties properties = BlockBehaviour.Properties.copy(Blocks.OAK_PLANKS); + properties.strength(1.5F); + properties.noOcclusion(); + properties.isValidSpawn(BlockPropertiesUtils::never); + properties.isRedstoneConductor(BlockPropertiesUtils::never); + properties.isViewBlocking(BlockPropertiesUtils::never); + return properties; + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(FACING); + } + + @Override + public BlockState rotate(BlockState state, Rotation rotation) { + return state.setValue(FACING, rotation.rotate(state.getValue(FACING))); + } + + @Override + public BlockState mirror(BlockState state, Mirror mirror) { + return state.rotate(mirror.getRotation(state.getValue(FACING))); + } + + @Override + public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { + return GrowthcraftCellarBlockEntities.CORK_COASTER_BLOCK_ENTITY.get().create(pPos, pState); + } + + @Override + public RenderShape getRenderShape(BlockState blockState) { + return RenderShape.MODEL; + } + + @Override + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { + int slot = 0; + CorkCoasterBlockEntity blockEntity = (CorkCoasterBlockEntity) pLevel.getBlockEntity(pPos); + ItemStack itemInHand = pPlayer.getItemInHand(pHand); + ItemStack slotStack = blockEntity.getItem(slot); + if ((!itemInHand.isEmpty() && blockEntity.canPlaceItem(slot, itemInHand)) || !slotStack.isEmpty() && (itemInHand.isEmpty() || blockEntity.canPlaceItem(slot, itemInHand))) { + blockEntity.setItem(slot, itemInHand); + pPlayer.setItemInHand(pHand, slotStack); + +// pState = pState.setValue(SWORD, !blockEntity.isEmpty()); + pLevel.setBlock(pPos, pState, UPDATE_ALL); + return InteractionResult.SUCCESS; + } + return super.use(pState, pLevel, pPos, pPlayer, pHand, pHit); + } +} diff --git a/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java b/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java new file mode 100644 index 00000000..9c22f11e --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java @@ -0,0 +1,168 @@ +package growthcraft.cellar.block.entity; + +import java.util.Objects; + +import javax.annotation.Nullable; + +import org.jetbrains.annotations.NotNull; + +import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; +import growthcraft.cellar.init.GrowthcraftCellarItems; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.Connection; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.ClientGamePacketListener; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemStackHandler; + +public class CorkCoasterBlockEntity extends BlockEntity implements Container{ + + private static final String ITEMS_TAG = "Inventory"; + protected final ItemStackHandler itemHandler; + private LazyOptional lazyItemHandler = LazyOptional.empty(); + + public CorkCoasterBlockEntity(BlockPos blockPos, BlockState blockState) { + this(GrowthcraftCellarBlockEntities.CORK_COASTER_BLOCK_ENTITY.get(), blockPos, blockState); + } + + public CorkCoasterBlockEntity(BlockEntityType pType, BlockPos pPos, BlockState pBlockState) { + super(pType, pPos, pBlockState); + itemHandler = new ItemStackHandler(1) { + @Override + protected void onContentsChanged(int slot) { + super.onContentsChanged(slot); + setChanged(); + Objects.requireNonNull(level).sendBlockUpdated(worldPosition, getBlockState(), getBlockState(), Block.UPDATE_ALL); + } + }; + } + + @Override + public boolean canPlaceItem(int slot, ItemStack stack) { + return stack.is(GrowthcraftCellarItems.POTION_WINE.get());// || stack.is(RelicsTags.Items.SWORD_PEDESTAL_SWORDS); + } + + + @Override + public void onLoad() { + super.onLoad(); + lazyItemHandler = LazyOptional.of(() -> itemHandler); + } + + @Override + public void load(CompoundTag tag) { + if(tag.contains(ITEMS_TAG)) { + itemHandler.deserializeNBT(tag.getCompound(ITEMS_TAG)); + } + super.load(tag); + } + + @Override + public void saveAdditional(CompoundTag tag) { + super.saveAdditional(tag); + tag.put(ITEMS_TAG, itemHandler.serializeNBT()); + } + + @Override + public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { + this.load(pkt.getTag()); + } + + @Nullable + @Override + public Packet getUpdatePacket() { + return ClientboundBlockEntityDataPacket.create(this); + } + + @Override + public @NotNull CompoundTag getUpdateTag() { + return this.saveWithoutMetadata(); + } + + @Override + public void handleUpdateTag(CompoundTag tag) { + this.load(tag); + } + + @Override + public void clearContent() { + for (int i = 0; i < getContainerSize(); i++) { + itemHandler.setStackInSlot(i, ItemStack.EMPTY); + } + } + + @Override + public int getContainerSize() { + return itemHandler.getSlots(); + } + + @Override + public boolean isEmpty() { + for (int i = 0; i < getContainerSize(); i++) { + if (!itemHandler.getStackInSlot(i).isEmpty()) return false; + } + return true; + } + + @Override + public ItemStack getItem(int pSlot) { + return pSlot < getContainerSize() ? itemHandler.getStackInSlot(pSlot) : ItemStack.EMPTY; + } + + @Override + public ItemStack removeItem(int pSlot, int pAmount) { + return pSlot < getContainerSize() ? itemHandler.getStackInSlot(pSlot).split(pAmount) : ItemStack.EMPTY; + } + + @Override + public ItemStack removeItemNoUpdate(int pSlot) { + if (pSlot < getContainerSize()) { + ItemStack stack = itemHandler.getStackInSlot(pSlot); + itemHandler.setStackInSlot(pSlot, ItemStack.EMPTY); + return stack; + } + return ItemStack.EMPTY; + } + + @Override + public void setItem(int pSlot, ItemStack pStack) { + if (pSlot < getContainerSize()) { + itemHandler.setStackInSlot(pSlot, pStack); + this.setChanged(); + } + } + + @Override + public boolean stillValid(Player pPlayer) { + BlockPos pos = getBlockPos(); + return Objects.requireNonNull(level).getBlockEntity(pos) == this && pPlayer.distanceToSqr(Vec3.atCenterOf(pos)) <= 64; + } + + @Override + public @NotNull LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { + if(cap == ForgeCapabilities.ITEM_HANDLER) { + return lazyItemHandler.cast(); + } + return super.getCapability(cap, side); + } + + @Override + public void invalidateCaps() { + super.invalidateCaps(); + lazyItemHandler.invalidate(); + } +} diff --git a/src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java b/src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java new file mode 100644 index 00000000..527bc1a7 --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java @@ -0,0 +1,38 @@ +package growthcraft.cellar.block.entity.renderer; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Axis; + +import growthcraft.cellar.block.entity.CorkCoasterBlockEntity; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; + +public class CorkCoasterBlockEntityRenderer implements BlockEntityRenderer { + + @Override + public void render(CorkCoasterBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int light, int overlay) { + if(!blockEntity.isEmpty()) { + ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); + ItemStack item = blockEntity.getItem(0); + poseStack.pushPose(); + + poseStack.translate(0.5F, 0.8F, 0.5F); + poseStack.mulPose(Axis.YP.rotationDegrees(switch (blockEntity.getBlockState().getValue(BlockStateProperties.HORIZONTAL_FACING)) { + case SOUTH -> 0; + case EAST -> 90; + default -> 180; + case WEST -> 270; + })); + + poseStack.translate(0, -0.1, 0); +// poseStack.mulPose(Axis.ZP.rotationDegrees(135)); + itemRenderer.renderStatic(item, ItemDisplayContext.FIXED, 250, overlay, poseStack, multiBufferSource,blockEntity.getLevel(), 1); + poseStack.popPose(); + } + } +} diff --git a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java index 4a029cba..59798f66 100644 --- a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java +++ b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java @@ -53,6 +53,14 @@ public class GrowthcraftCellarBlockEntities { ).build(null) ); + public static final RegistryObject> CORK_COASTER_BLOCK_ENTITY = BLOCK_ENTITIES.register( + Reference.UnlocalizedName.CORK_COASTER, + () -> BlockEntityType.Builder.of( + CorkCoasterBlockEntity::new, + GrowthcraftCellarBlocks.CORK_COASTER.get() + ).build(null) + ); + public GrowthcraftCellarBlockEntities() { /* Disable automatic default public constructor */ } diff --git a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java index 11db6ab3..bd82cb59 100644 --- a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java +++ b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java @@ -3,6 +3,8 @@ import java.util.function.Supplier; import growthcraft.cellar.block.BrewKettleBlock; +import growthcraft.cellar.block.CorkCoasterBlock; +import growthcraft.cellar.block.CorkLog; import growthcraft.cellar.block.CultureJarBlock; import growthcraft.cellar.block.FermentationBarrelBlock; import growthcraft.cellar.block.FruitPressBlock; @@ -122,12 +124,12 @@ public class GrowthcraftCellarBlocks { public static final RegistryObject CORK_WOOD_LOG = registerBlock( Reference.UnlocalizedName.CORK_WOOD_LOG, - GrowthcraftLogBlock::new + CorkLog::new ); public static final RegistryObject CORK_WOOD_LOG_STRIPPED = registerBlock( Reference.UnlocalizedName.CORK_WOOD_LOG_STRIPPED, - GrowthcraftLogBlock::new + CorkLog::new ); public static final RegistryObject CORK_WOOD_STRIPPED = registerBlock( @@ -139,6 +141,11 @@ public class GrowthcraftCellarBlocks { Reference.UnlocalizedName.CORK_TREE_LEAVES, () -> new LeavesBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LEAVES)) ); + + public static final RegistryObject CORK_COASTER = registerBlock( + Reference.UnlocalizedName.CORK_COASTER, + CorkCoasterBlock::new + ); private static RegistryObject registerBlock(String name, Supplier block) { return registerBlock(name, block, false); diff --git a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java index cdc3b230..9d13c557 100644 --- a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java +++ b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java @@ -1,5 +1,8 @@ package growthcraft.cellar.init; +import java.util.ArrayList; +import java.util.List; + import growthcraft.cellar.item.CellarPotionItem; import growthcraft.cellar.item.GrapeSeedsItem; import growthcraft.cellar.item.HopsSeedsItem; @@ -12,9 +15,6 @@ import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; -import java.util.ArrayList; -import java.util.List; - public class GrowthcraftCellarItems { public static final DeferredRegister ITEMS = DeferredRegister.create( @@ -153,6 +153,10 @@ public class GrowthcraftCellarItems { GRAIN_AMBER, GRAIN_BROWN, GRAIN_COPPER, GRAIN_DARK, GRAIN_DEEP_AMBER, GRAIN_DEEP_COPPER, GRAIN_GOLDEN, GRAIN_PALE_GOLDEN ); + + public static final RegistryObject CORK_BARK = ITEMS.register( + Reference.UnlocalizedName.CORK_BARK, GrowthcraftItem::new + ); public static void registerCompostables() { float f = 0.3F; diff --git a/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java b/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java index 75013852..975e61e6 100644 --- a/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java +++ b/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java @@ -1,6 +1,7 @@ package growthcraft.cellar.init.client; import growthcraft.cellar.block.entity.renderer.BrewKettleBlockEntityRenderer; +import growthcraft.cellar.block.entity.renderer.CorkCoasterBlockEntityRenderer; import growthcraft.cellar.block.entity.renderer.CultureJarBlockEntityRenderer; import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; import net.minecraftforge.api.distmarker.Dist; @@ -14,6 +15,7 @@ public class GrowthcraftCellarBlockEntityRenderers { public static void register(EntityRenderersEvent.RegisterRenderers event) { event.registerBlockEntityRenderer(GrowthcraftCellarBlockEntities.CULTURE_JAR_BLOCK_ENTITY.get(), context -> new CultureJarBlockEntityRenderer()); event.registerBlockEntityRenderer(GrowthcraftCellarBlockEntities.BREW_KETTLE_BLOCK_ENTITY.get(), context -> new BrewKettleBlockEntityRenderer()); + event.registerBlockEntityRenderer(GrowthcraftCellarBlockEntities.CORK_COASTER_BLOCK_ENTITY.get(), context -> new CorkCoasterBlockEntityRenderer()); } private GrowthcraftCellarBlockEntityRenderers() { diff --git a/src/main/java/growthcraft/cellar/shared/Reference.java b/src/main/java/growthcraft/cellar/shared/Reference.java index 6effda0e..523a108f 100644 --- a/src/main/java/growthcraft/cellar/shared/Reference.java +++ b/src/main/java/growthcraft/cellar/shared/Reference.java @@ -119,6 +119,8 @@ public static class UnlocalizedName { public static final String CORK_WOOD_LOG = "cork_wood_log"; public static final String CORK_WOOD_LOG_STRIPPED = "cork_wood_log_stripped"; public static final String HAS_CORK_TREE = "has_cork_tree"; + public static final String CORK_BARK = "cork_bark"; + public static final String CORK_COASTER = "cork_coaster"; private UnlocalizedName() { /* Disable Automatic Creation of Public Constructor */ diff --git a/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java b/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java index fca31e46..884bb74d 100644 --- a/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java +++ b/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java @@ -2,17 +2,13 @@ import java.util.concurrent.CompletableFuture; -import growthcraft.bamboo.init.GrowthcraftBambooBlocks; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.TagEntry; import org.jetbrains.annotations.Nullable; import growthcraft.apiary.init.GrowthcraftApiaryBlocks; import growthcraft.apples.init.GrowthcraftApplesBlocks; import growthcraft.apples.init.GrowthcraftApplesTags; +import growthcraft.bamboo.init.GrowthcraftBambooBlocks; import growthcraft.cellar.init.GrowthcraftCellarBlocks; -import growthcraft.cellar.init.GrowthcraftCellarItems; -import growthcraft.cellar.init.GrowthcraftCellarTags; import growthcraft.core.init.GrowthcraftBlocks; import growthcraft.core.init.GrowthcraftTags; import growthcraft.core.shared.Reference; @@ -20,7 +16,9 @@ import growthcraft.rice.init.GrowthcraftRiceBlocks; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; +import net.minecraft.tags.TagEntry; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.Tags; import net.minecraftforge.common.data.BlockTagsProvider; diff --git a/src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json b/src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json new file mode 100644 index 00000000..1409a34c --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "growthcraft_cellar:block/cork_coaster" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json b/src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json new file mode 100644 index 00000000..ef72e05c --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json @@ -0,0 +1,166 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/cube_all", + "ambientocclusion": false, + "render_type": "cutout", + "textures": { + "1": "growthcraft_cellar:block/cork/cork_coaster", + "particle": "growthcraft_cellar:block/cork/cork_coaster" + }, + "elements": [ + { + "from": [4, 0, 13], + "to": [12, 1, 14], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#1"} + } + }, + { + "from": [3, 0, 3], + "to": [13, 1, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#1"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#1"} + } + }, + { + "from": [4, 0, 2], + "to": [12, 1, 3], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#1"} + } + }, + { + "from": [6, 0, 1], + "to": [10, 1, 2], + "faces": { + "north": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 4, 1], "texture": "#1"} + } + }, + { + "from": [6, 0, 14], + "to": [10, 1, 15], + "faces": { + "north": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 4, 1], "texture": "#1"} + } + }, + { + "from": [1, 0, 6], + "to": [2, 1, 10], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 4], "texture": "#1"} + } + }, + { + "from": [2, 0, 4], + "to": [3, 1, 12], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#1"} + } + }, + { + "from": [14, 0, 6], + "to": [15, 1, 10], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 4], "texture": "#1"} + } + }, + { + "from": [13, 0, 4], + "to": [14, 1, 12], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [27.5, -1, 34.5], + "translation": [-1.25, 4.25, 0], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "rotation": [27.5, -1, 34.5], + "translation": [-2.5, 3.5, -0.25], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "rotation": [3, -19, 25], + "translation": [3.25, 6.5, 0] + }, + "firstperson_lefthand": { + "rotation": [3, -19, 25], + "translation": [3.25, 6.5, 0] + }, + "ground": { + "rotation": [0, 74, 72], + "translation": [-0.5, 0, 4.75], + "scale": [0.8, 0.8, 0.8] + }, + "gui": { + "rotation": [36, 26, -2], + "translation": [0, 4, 0], + "scale": [0.8, 0.8, 0.8] + }, + "head": { + "rotation": [-116, 0, 0], + "translation": [0, -3.5, -2.5] + }, + "fixed": { + "rotation": [90, 0, 0], + "translation": [0, 0, 8] + } + }, + "groups": [ + { + "name": "group", + "origin": [0, 0, 0], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json b/src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json new file mode 100644 index 00000000..8532dd86 --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json @@ -0,0 +1,3 @@ +{ + "parent": "growthcraft_cellar:block/cork_coaster" +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/textures/block/cork/cork_coaster.png b/src/main/resources/assets/growthcraft_cellar/textures/block/cork/cork_coaster.png new file mode 100644 index 0000000000000000000000000000000000000000..5df929abaf85f19de199b4f5fb2026a786f8f65a GIT binary patch literal 2243 zcmV;!2t4Q58;r(K9sdI@=)g75E0&wj9H_bFqg{bzL2S?48)Wl*Ny>gbSi+tk}7=+k`8K5 z+^fd3u+A8U4J9vZAVRP3Gz~6!@cW^(Zfs^SAWP?{iAxcL&VD3%6V_F^H)R%KJB6+T zKgL{6toyY@H~9JOWJ!&sW@?4r8*M1}VB!O*{1zF6m@sNPSS7Q0Bq&)Hp|q zN_tP^JQ!n8M94rDIGbW)@U|NFW?YsU1&ppFjBEo#NX2-YJNnsBi6Vtc=QtHGY8S5e z!oE+48sCn>Nn$^gjIfrIl8mzxBgm=p?KE#B=YaoyCX#xKL6fkb%J+}LZHHlll6+Kf zxm5B#hK~eMAtfkkQDqxKZ_w@0#wo+g?ykTCJ|E?K^gLA6P3CucglcIjT z>?K@DsQiYtv0eLmBII0V_Ftu>`|1@V0$^{mayyMRH)etRcyL-|u*?rlIICi~>KQ3Fh9z1P>QFRwKNfFOMWpe5O^lS# z+d)X>>6D{!KY57KfUO%t6E92R=!10@E{kGf{P5fn8)$I>?$I#^oQQUYz#imC0@AiEhuSpZgp_+5sk|8dXRa@aza_M zcOj9o!@$Sb(bTxim7>k>ba-$|4iG;}L%q`5o_J0c=5A=7;h>`k104&dZK_zR*Tx&i<){ zK`muavaokyO2#6Mtew$LnvI}-ewi9cTFB*gWf=#HxA2afh3&|s>|Gtm(UB(Mu90$ndA)J(i9g?0wCv$> z@0$kDd@k<)eN=AII;Fc33Q@7YsC6EC(2bX=$31TIjvx05XT>^cjCpdUTr2l8kv|S4 zN#ggrk;F)@a(z&i#^QAB%5fw<&MB%QHEQi)-`#^oenhM?<-kr+3F*EyCAm&y4LrH8 z4Ar2bj7}-WBt~}RA641=%#wF5vrtW4~e^Y9x3OOE}Vym((QL~`QSSO<$-mx4Q z^CiX!>G3>&+)G30WDYfatWd+0&zn=rLS9{*JPqwmQCH(6NH&Hq8Ii0l z6wgKKaM3bDi`QOb{*#AH_fAvPA6~1WF_#|8$FE-}?wf|1Jza=&)LY^GK1W3_9>1i; zOWYT767C*460Fl;Es4#9d$hUpeV^ESVrzxgGu8!_9APDIzIv&$Ft|)3_CeQ@>n_My zBK!Gvbb70+GJPtSi*eqSx7VHbzEE9c^5EDW5}o}}xGyAL=Z)(z@!NIg%hC|n8D~&+ zg)HPh&u8B9My)Nl`TEo`>9kt7Z@yX$mUZx!T)PXuexG@EBhra~{`nMH?`4I>9ZDM? zHFI}ASRR|SQ`W!xv^Z8C+tRg8VYSobR2{;v`^r!G%Gq literal 0 HcmV?d00001 From 59f2cbe1354ef9d2578a8623e5f1116c12d4bd00 Mon Sep 17 00:00:00 2001 From: Fox Date: Sun, 20 Oct 2024 23:21:12 +0200 Subject: [PATCH 4/7] make cork logs regrow bark, added cork bark --- .../growthcraft/cellar/block/CorkLog.java | 59 +++++++++++++++++++ .../lib/block/GrowthcraftLogBlock.java | 6 -- .../models/item/cork_bark.json | 6 ++ 3 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 src/main/java/growthcraft/cellar/block/CorkLog.java create mode 100644 src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json diff --git a/src/main/java/growthcraft/cellar/block/CorkLog.java b/src/main/java/growthcraft/cellar/block/CorkLog.java new file mode 100644 index 00000000..92651470 --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/CorkLog.java @@ -0,0 +1,59 @@ +package growthcraft.cellar.block; + +import org.jetbrains.annotations.Nullable; + +import growthcraft.cellar.init.GrowthcraftCellarBlocks; +import growthcraft.cellar.init.GrowthcraftCellarItems; +import growthcraft.lib.block.GrowthcraftLogBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.item.AxeItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraftforge.common.ToolAction; + +public class CorkLog extends GrowthcraftLogBlock{ + public static final BooleanProperty REGROW = BooleanProperty.create("regrow"); + + @Override + public void randomTick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) { + if (pRandom.nextInt((int)(25.0F / 2) + 1) == 0){ + pLevel.setBlockAndUpdate(pPos, GrowthcraftCellarBlocks.CORK_WOOD_LOG.get().defaultBlockState().setValue(AXIS, pState.getValue(AXIS)).setValue(REGROW, pState.getValue(REGROW))); + } + } + + @Override + public boolean isRandomlyTicking(BlockState pState) { + return pState.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get()) && pState.getValue(REGROW); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder blockStateBuilder) { + super.createBlockStateDefinition(blockStateBuilder.add(REGROW)); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext pContext) { + return this.defaultBlockState().setValue(REGROW, false); + } + + @Override + public @Nullable BlockState getToolModifiedState(BlockState state, UseOnContext context, ToolAction toolAction, boolean simulate) { + if (context.getItemInHand().getItem() instanceof AxeItem) { + if(state.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG.get())) { + popResource(context.getLevel(), context.getClickedPos(), new ItemStack(GrowthcraftCellarItems.CORK_BARK.get())); + return GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)).setValue(REGROW, state.getValue(REGROW)); + } + if(state.is(GrowthcraftCellarBlocks.CORK_WOOD.get())) { + return GrowthcraftCellarBlocks.CORK_WOOD_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); + } + } + return super.getToolModifiedState(state, context, toolAction, simulate); + } +} diff --git a/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java b/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java index 209ceb86..c0ab75c4 100644 --- a/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java +++ b/src/main/java/growthcraft/lib/block/GrowthcraftLogBlock.java @@ -59,12 +59,6 @@ public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, if(state.is(GrowthcraftApplesBlocks.APPLE_WOOD.get())) { return GrowthcraftApplesBlocks.APPLE_WOOD_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); } - if(state.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG.get())) { - return GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); - } - if(state.is(GrowthcraftCellarBlocks.CORK_WOOD.get())) { - return GrowthcraftCellarBlocks.CORK_WOOD_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); - } } return super.getToolModifiedState(state, context, toolAction, simulate); } diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json b/src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json new file mode 100644 index 00000000..f427e300 --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/item/cork_bark.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "growthcraft_cellar:item/cork_bark" + } +} \ No newline at end of file From 50aa726b9194250566535f0b137681bc142d68d5 Mon Sep 17 00:00:00 2001 From: Fox Date: Sun, 20 Oct 2024 23:22:02 +0200 Subject: [PATCH 5/7] 3d model for the wine bottle --- .../models/item/potion_wine.json | 4988 ++++++++++++++++- .../models/item/potion_wine_old.json | 124 + 2 files changed, 5041 insertions(+), 71 deletions(-) create mode 100644 src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json index fb4e2a13..8d3f84d2 100644 --- a/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json +++ b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine.json @@ -1,124 +1,4970 @@ { - "parent": "item/generated", + "credit": "Made with Blockbench", "textures": { - "layer0": "growthcraft_cellar:item/potion/brew_bottle_contents", - "layer1": "growthcraft_cellar:item/potion/brew_bottle_base" + "0": "block/white_stained_glass", + "1": "block/spruce_planks", + "particle": "block/white_stained_glass" }, - "gui_light": "front", - "display": { - "ground": { - "rotation": [ - 0, - 0, - 0 + "elements": [ + { + "from": [ + 6, + 0.25, + 6 ], - "translation": [ + "to": [ + 10, + 1.25, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 4 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, 0, - 2, - 0 + 10 ], - "scale": [ - 0.5, - 0.5, - 0.5 - ] + "to": [ + 10, + 1, + 11 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } }, - "head": { - "rotation": [ + { + "from": [ + 6, 0, - 180, - 0 + 5 ], - "translation": [ + "to": [ + 10, + 1, + 6 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, 0, - 13, - 7 + 6 ], - "scale": [ + "to": [ + 6, 1, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 0, + 6 + ], + "to": [ + 11, 1, - 1 - ] + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 0.75, + 4.5 + ], + "to": [ + 10, + 11.75, + 5.5 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 0.75, + 5 + ], + "to": [ + 6, + 11.75, + 6 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 4.5, + 0.75, + 6 + ], + "to": [ + 5.5, + 11.75, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 0.75, + 10 + ], + "to": [ + 6, + 11.75, + 11 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 0.75, + 10.5 + ], + "to": [ + 10, + 11.75, + 11.5 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 0.75, + 10 + ], + "to": [ + 11, + 11.75, + 11 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10.5, + 0.75, + 6 + ], + "to": [ + 11.5, + 11.75, + 10 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 0.75, + 5 + ], + "to": [ + 11, + 11.75, + 6 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 11 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10.5, + 11.75, + 7 + ], + "to": [ + 11.5, + 13.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 11.75, + 4.5 + ], + "to": [ + 9, + 13.75, + 5.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 4.5, + 11.75, + 7 + ], + "to": [ + 5.5, + 13.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 11.75, + 10.5 + ], + "to": [ + 9, + 13.75, + 11.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 11.75, + 10 + ], + "to": [ + 10, + 13.75, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 11.75, + 9 + ], + "to": [ + 11, + 13.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 11.75, + 9 + ], + "to": [ + 6, + 13.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 11.75, + 10 + ], + "to": [ + 7, + 13.75, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 11.75, + 6 + ], + "to": [ + 6, + 13.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 11.75, + 5 + ], + "to": [ + 7, + 13.75, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 11.75, + 5 + ], + "to": [ + 10, + 13.75, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 11.75, + 6 + ], + "to": [ + 11, + 13.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 10, + 13.75, + 7 + ], + "to": [ + 11, + 14.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 13.75, + 5 + ], + "to": [ + 9, + 14.75, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 13.75, + 7 + ], + "to": [ + 6, + 14.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 13.75, + 10 + ], + "to": [ + 9, + 14.75, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 13.75, + 9.5 + ], + "to": [ + 10, + 14.75, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9.5, + 13.75, + 9 + ], + "to": [ + 10.5, + 14.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5.5, + 13.75, + 9 + ], + "to": [ + 6.5, + 14.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 13.75, + 9.5 + ], + "to": [ + 7, + 14.75, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 5.5, + 13.75, + 6 + ], + "to": [ + 6.5, + 14.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 13.75, + 5.5 + ], + "to": [ + 7, + 14.75, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 13.75, + 5.5 + ], + "to": [ + 10, + 14.75, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 9.5, + 13.75, + 6 + ], + "to": [ + 10.5, + 14.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 9.5, + 14.75, + 7 + ], + "to": [ + 10.5, + 15.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 14.75, + 5.5 + ], + "to": [ + 9, + 15.75, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } }, + { + "from": [ + 5.5, + 14.75, + 7 + ], + "to": [ + 6.5, + 15.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 14.75, + 9.5 + ], + "to": [ + 9, + 15.75, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 14.75, + 9 + ], + "to": [ + 10, + 15.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 14.75, + 9 + ], + "to": [ + 7, + 15.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 14.75, + 6 + ], + "to": [ + 7, + 15.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 14.75, + 6 + ], + "to": [ + 10, + 15.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 15.75, + 7 + ], + "to": [ + 10, + 19.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 15.75, + 6 + ], + "to": [ + 9, + 19.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 15.75, + 7 + ], + "to": [ + 7, + 19.75, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 15.75, + 9 + ], + "to": [ + 9, + 19.75, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 15.75, + 9 + ], + "to": [ + 9.5, + 19.75, + 9.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6.5, + 15.75, + 9 + ], + "to": [ + 7, + 19.75, + 9.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 0.5, + 0.5 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 15.75, + 6.5 + ], + "to": [ + 9.5, + 19.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0.5, + 0, + 0, + 0.5 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0.5, + 0, + 0, + 0.5 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 6.5, + 15.75, + 6.5 + ], + "to": [ + 7, + 19.75, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0.5, + 0, + 0, + 4 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0.5, + 0.5, + 0 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0.5, + 0.5, + 0 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 19, + 6.75 + ], + "to": [ + 9.25, + 22, + 9.25 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 15, + 27, + 15 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 0, + 0, + 2.5, + 3 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 2.5, + 2.5 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 0, + 2.5, + 2.5 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 9.5, + 19.25, + 7 + ], + "to": [ + 10.5, + 20.25, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 19.25, + 5.5 + ], + "to": [ + 9, + 20.25, + 6.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5.5, + 19.25, + 7 + ], + "to": [ + 6.5, + 20.25, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + }, + { + "from": [ + 7, + 19.25, + 9.5 + ], + "to": [ + 9, + 20.25, + 10.5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 19.25, + 9 + ], + "to": [ + 10, + 20.25, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 19.25, + 9 + ], + "to": [ + 7, + 20.25, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 19.25, + 6 + ], + "to": [ + 7, + 20.25, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 180, + "texture": "#0" + } + } + }, + { + "from": [ + 9, + 19.25, + 6 + ], + "to": [ + 10, + 20.25, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 20.75, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 270, + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 1 + ], + "rotation": 90, + "texture": "#0" + } + } + } + ], + "display": { "thirdperson_righthand": { "rotation": [ - 90, - 270, - 55 + 27.5, + -1, + 34.5 ], "translation": [ - 0, - 1.25, - -1.0 + 0.5, + -2.25, + -1.25 ], "scale": [ - 0.4, - 0.4, - 0.4 + 0.5, + 0.5, + 0.5 ] }, "thirdperson_lefthand": { "rotation": [ - 0, - 90, - 55 + 27.5, + -1, + 34.5 ], "translation": [ - 0, - 1.25, - -1.0 + 0.5, + -2.25, + -1.25 ], "scale": [ - 0.4, - 0.4, - 0.4 + 0.5, + 0.5, + 0.5 ] }, "firstperson_righthand": { "rotation": [ - 0, - -90, + 3, + -19, 25 ], "translation": [ - 1.13, - 3.2, - 1.13 - ], - "scale": [ - 0.68, - 0.68, - 0.68 + 3.25, + -3.5, + 0 ] }, "firstperson_lefthand": { + "rotation": [ + 3, + -19, + 25 + ], + "translation": [ + 3.25, + -3.5, + 0 + ] + }, + "ground": { "rotation": [ 0, - 90, - -25 + 74, + 72 ], + "scale": [ + 0.8, + 0.8, + 0.8 + ] + }, + "gui": { "translation": [ - 1.13, - 3.2, - 1.13 + 0, + -2.5, + 0 ], "scale": [ - 0.68, - 0.68, - 0.68 + 0.8, + 0.8, + 0.8 ] }, - "fixed": { + "head": { "rotation": [ + -116, 0, - 180, 0 ], - "scale": [ - 1, - 1, - 1 + "translation": [ + 0, + -3.5, + -2.5 + ] + }, + "fixed": { + "translation": [ + 0, + -2.25, + 0 + ] + } + }, + "groups": [ + 0, + 1, + 2, + 3, + 4, + { + "name": "group", + "origin": [ + 8, + 8, + 8 + ], + "children": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53 + ] + }, + { + "name": "group", + "origin": [ + 8, + 20.75, + 8 + ], + "children": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61 ] } - } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json new file mode 100644 index 00000000..fb4e2a13 --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/item/potion_wine_old.json @@ -0,0 +1,124 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "growthcraft_cellar:item/potion/brew_bottle_contents", + "layer1": "growthcraft_cellar:item/potion/brew_bottle_base" + }, + "gui_light": "front", + "display": { + "ground": { + "rotation": [ + 0, + 0, + 0 + ], + "translation": [ + 0, + 2, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "head": { + "rotation": [ + 0, + 180, + 0 + ], + "translation": [ + 0, + 13, + 7 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + "thirdperson_righthand": { + "rotation": [ + 90, + 270, + 55 + ], + "translation": [ + 0, + 1.25, + -1.0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 0, + 90, + 55 + ], + "translation": [ + 0, + 1.25, + -1.0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "firstperson_righthand": { + "rotation": [ + 0, + -90, + 25 + ], + "translation": [ + 1.13, + 3.2, + 1.13 + ], + "scale": [ + 0.68, + 0.68, + 0.68 + ] + }, + "firstperson_lefthand": { + "rotation": [ + 0, + 90, + -25 + ], + "translation": [ + 1.13, + 3.2, + 1.13 + ], + "scale": [ + 0.68, + 0.68, + 0.68 + ] + }, + "fixed": { + "rotation": [ + 0, + 180, + 0 + ], + "scale": [ + 1, + 1, + 1 + ] + } + } +} \ No newline at end of file From ce4d86fcf755b2311f57337f7b3fde0866ac455b Mon Sep 17 00:00:00 2001 From: Fox Date: Sun, 20 Oct 2024 23:22:24 +0200 Subject: [PATCH 6/7] add cork coaster --- .../cellar/block/CorkCoasterBlock.java | 95 ++++++++++ .../block/entity/CorkCoasterBlockEntity.java | 168 ++++++++++++++++++ .../CorkCoasterBlockEntityRenderer.java | 38 ++++ .../init/GrowthcraftCellarBlockEntities.java | 8 + .../cellar/init/GrowthcraftCellarBlocks.java | 11 +- .../cellar/init/GrowthcraftCellarItems.java | 10 +- ...GrowthcraftCellarBlockEntityRenderers.java | 2 + .../growthcraft/cellar/shared/Reference.java | 2 + .../providers/GrowthcraftCoreBlockTags.java | 8 +- .../blockstates/cork_coaster.json | 5 + .../models/block/cork_coaster.json | 166 +++++++++++++++++ .../models/item/cork_coaster.json | 3 + .../textures/block/cork/cork_coaster.png | Bin 0 -> 2243 bytes 13 files changed, 506 insertions(+), 10 deletions(-) create mode 100644 src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java create mode 100644 src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java create mode 100644 src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java create mode 100644 src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json create mode 100644 src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json create mode 100644 src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json create mode 100644 src/main/resources/assets/growthcraft_cellar/textures/block/cork/cork_coaster.png diff --git a/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java b/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java new file mode 100644 index 00000000..876adf82 --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java @@ -0,0 +1,95 @@ +package growthcraft.cellar.block; + +import growthcraft.cellar.block.entity.CorkCoasterBlockEntity; +import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; +import growthcraft.core.utils.BlockPropertiesUtils; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.phys.BlockHitResult; + +public class CorkCoasterBlock extends BaseEntityBlock { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + + public CorkCoasterBlock() { + this(getInitProperties()); + } + + protected CorkCoasterBlock(Properties pProperties) { + super(pProperties); + } + + private static Properties getInitProperties() { + Properties properties = BlockBehaviour.Properties.copy(Blocks.OAK_PLANKS); + properties.strength(1.5F); + properties.noOcclusion(); + properties.isValidSpawn(BlockPropertiesUtils::never); + properties.isRedstoneConductor(BlockPropertiesUtils::never); + properties.isViewBlocking(BlockPropertiesUtils::never); + return properties; + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(FACING); + } + + @Override + public BlockState rotate(BlockState state, Rotation rotation) { + return state.setValue(FACING, rotation.rotate(state.getValue(FACING))); + } + + @Override + public BlockState mirror(BlockState state, Mirror mirror) { + return state.rotate(mirror.getRotation(state.getValue(FACING))); + } + + @Override + public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { + return GrowthcraftCellarBlockEntities.CORK_COASTER_BLOCK_ENTITY.get().create(pPos, pState); + } + + @Override + public RenderShape getRenderShape(BlockState blockState) { + return RenderShape.MODEL; + } + + @Override + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { + int slot = 0; + CorkCoasterBlockEntity blockEntity = (CorkCoasterBlockEntity) pLevel.getBlockEntity(pPos); + ItemStack itemInHand = pPlayer.getItemInHand(pHand); + ItemStack slotStack = blockEntity.getItem(slot); + if ((!itemInHand.isEmpty() && blockEntity.canPlaceItem(slot, itemInHand)) || !slotStack.isEmpty() && (itemInHand.isEmpty() || blockEntity.canPlaceItem(slot, itemInHand))) { + blockEntity.setItem(slot, itemInHand); + pPlayer.setItemInHand(pHand, slotStack); + +// pState = pState.setValue(SWORD, !blockEntity.isEmpty()); + pLevel.setBlock(pPos, pState, UPDATE_ALL); + return InteractionResult.SUCCESS; + } + return super.use(pState, pLevel, pPos, pPlayer, pHand, pHit); + } +} diff --git a/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java b/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java new file mode 100644 index 00000000..9c22f11e --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java @@ -0,0 +1,168 @@ +package growthcraft.cellar.block.entity; + +import java.util.Objects; + +import javax.annotation.Nullable; + +import org.jetbrains.annotations.NotNull; + +import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; +import growthcraft.cellar.init.GrowthcraftCellarItems; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.Connection; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.ClientGamePacketListener; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemStackHandler; + +public class CorkCoasterBlockEntity extends BlockEntity implements Container{ + + private static final String ITEMS_TAG = "Inventory"; + protected final ItemStackHandler itemHandler; + private LazyOptional lazyItemHandler = LazyOptional.empty(); + + public CorkCoasterBlockEntity(BlockPos blockPos, BlockState blockState) { + this(GrowthcraftCellarBlockEntities.CORK_COASTER_BLOCK_ENTITY.get(), blockPos, blockState); + } + + public CorkCoasterBlockEntity(BlockEntityType pType, BlockPos pPos, BlockState pBlockState) { + super(pType, pPos, pBlockState); + itemHandler = new ItemStackHandler(1) { + @Override + protected void onContentsChanged(int slot) { + super.onContentsChanged(slot); + setChanged(); + Objects.requireNonNull(level).sendBlockUpdated(worldPosition, getBlockState(), getBlockState(), Block.UPDATE_ALL); + } + }; + } + + @Override + public boolean canPlaceItem(int slot, ItemStack stack) { + return stack.is(GrowthcraftCellarItems.POTION_WINE.get());// || stack.is(RelicsTags.Items.SWORD_PEDESTAL_SWORDS); + } + + + @Override + public void onLoad() { + super.onLoad(); + lazyItemHandler = LazyOptional.of(() -> itemHandler); + } + + @Override + public void load(CompoundTag tag) { + if(tag.contains(ITEMS_TAG)) { + itemHandler.deserializeNBT(tag.getCompound(ITEMS_TAG)); + } + super.load(tag); + } + + @Override + public void saveAdditional(CompoundTag tag) { + super.saveAdditional(tag); + tag.put(ITEMS_TAG, itemHandler.serializeNBT()); + } + + @Override + public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { + this.load(pkt.getTag()); + } + + @Nullable + @Override + public Packet getUpdatePacket() { + return ClientboundBlockEntityDataPacket.create(this); + } + + @Override + public @NotNull CompoundTag getUpdateTag() { + return this.saveWithoutMetadata(); + } + + @Override + public void handleUpdateTag(CompoundTag tag) { + this.load(tag); + } + + @Override + public void clearContent() { + for (int i = 0; i < getContainerSize(); i++) { + itemHandler.setStackInSlot(i, ItemStack.EMPTY); + } + } + + @Override + public int getContainerSize() { + return itemHandler.getSlots(); + } + + @Override + public boolean isEmpty() { + for (int i = 0; i < getContainerSize(); i++) { + if (!itemHandler.getStackInSlot(i).isEmpty()) return false; + } + return true; + } + + @Override + public ItemStack getItem(int pSlot) { + return pSlot < getContainerSize() ? itemHandler.getStackInSlot(pSlot) : ItemStack.EMPTY; + } + + @Override + public ItemStack removeItem(int pSlot, int pAmount) { + return pSlot < getContainerSize() ? itemHandler.getStackInSlot(pSlot).split(pAmount) : ItemStack.EMPTY; + } + + @Override + public ItemStack removeItemNoUpdate(int pSlot) { + if (pSlot < getContainerSize()) { + ItemStack stack = itemHandler.getStackInSlot(pSlot); + itemHandler.setStackInSlot(pSlot, ItemStack.EMPTY); + return stack; + } + return ItemStack.EMPTY; + } + + @Override + public void setItem(int pSlot, ItemStack pStack) { + if (pSlot < getContainerSize()) { + itemHandler.setStackInSlot(pSlot, pStack); + this.setChanged(); + } + } + + @Override + public boolean stillValid(Player pPlayer) { + BlockPos pos = getBlockPos(); + return Objects.requireNonNull(level).getBlockEntity(pos) == this && pPlayer.distanceToSqr(Vec3.atCenterOf(pos)) <= 64; + } + + @Override + public @NotNull LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { + if(cap == ForgeCapabilities.ITEM_HANDLER) { + return lazyItemHandler.cast(); + } + return super.getCapability(cap, side); + } + + @Override + public void invalidateCaps() { + super.invalidateCaps(); + lazyItemHandler.invalidate(); + } +} diff --git a/src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java b/src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java new file mode 100644 index 00000000..527bc1a7 --- /dev/null +++ b/src/main/java/growthcraft/cellar/block/entity/renderer/CorkCoasterBlockEntityRenderer.java @@ -0,0 +1,38 @@ +package growthcraft.cellar.block.entity.renderer; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Axis; + +import growthcraft.cellar.block.entity.CorkCoasterBlockEntity; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; + +public class CorkCoasterBlockEntityRenderer implements BlockEntityRenderer { + + @Override + public void render(CorkCoasterBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int light, int overlay) { + if(!blockEntity.isEmpty()) { + ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); + ItemStack item = blockEntity.getItem(0); + poseStack.pushPose(); + + poseStack.translate(0.5F, 0.8F, 0.5F); + poseStack.mulPose(Axis.YP.rotationDegrees(switch (blockEntity.getBlockState().getValue(BlockStateProperties.HORIZONTAL_FACING)) { + case SOUTH -> 0; + case EAST -> 90; + default -> 180; + case WEST -> 270; + })); + + poseStack.translate(0, -0.1, 0); +// poseStack.mulPose(Axis.ZP.rotationDegrees(135)); + itemRenderer.renderStatic(item, ItemDisplayContext.FIXED, 250, overlay, poseStack, multiBufferSource,blockEntity.getLevel(), 1); + poseStack.popPose(); + } + } +} diff --git a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java index 4a029cba..59798f66 100644 --- a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java +++ b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlockEntities.java @@ -53,6 +53,14 @@ public class GrowthcraftCellarBlockEntities { ).build(null) ); + public static final RegistryObject> CORK_COASTER_BLOCK_ENTITY = BLOCK_ENTITIES.register( + Reference.UnlocalizedName.CORK_COASTER, + () -> BlockEntityType.Builder.of( + CorkCoasterBlockEntity::new, + GrowthcraftCellarBlocks.CORK_COASTER.get() + ).build(null) + ); + public GrowthcraftCellarBlockEntities() { /* Disable automatic default public constructor */ } diff --git a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java index 11db6ab3..bd82cb59 100644 --- a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java +++ b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarBlocks.java @@ -3,6 +3,8 @@ import java.util.function.Supplier; import growthcraft.cellar.block.BrewKettleBlock; +import growthcraft.cellar.block.CorkCoasterBlock; +import growthcraft.cellar.block.CorkLog; import growthcraft.cellar.block.CultureJarBlock; import growthcraft.cellar.block.FermentationBarrelBlock; import growthcraft.cellar.block.FruitPressBlock; @@ -122,12 +124,12 @@ public class GrowthcraftCellarBlocks { public static final RegistryObject CORK_WOOD_LOG = registerBlock( Reference.UnlocalizedName.CORK_WOOD_LOG, - GrowthcraftLogBlock::new + CorkLog::new ); public static final RegistryObject CORK_WOOD_LOG_STRIPPED = registerBlock( Reference.UnlocalizedName.CORK_WOOD_LOG_STRIPPED, - GrowthcraftLogBlock::new + CorkLog::new ); public static final RegistryObject CORK_WOOD_STRIPPED = registerBlock( @@ -139,6 +141,11 @@ public class GrowthcraftCellarBlocks { Reference.UnlocalizedName.CORK_TREE_LEAVES, () -> new LeavesBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LEAVES)) ); + + public static final RegistryObject CORK_COASTER = registerBlock( + Reference.UnlocalizedName.CORK_COASTER, + CorkCoasterBlock::new + ); private static RegistryObject registerBlock(String name, Supplier block) { return registerBlock(name, block, false); diff --git a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java index cdc3b230..9d13c557 100644 --- a/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java +++ b/src/main/java/growthcraft/cellar/init/GrowthcraftCellarItems.java @@ -1,5 +1,8 @@ package growthcraft.cellar.init; +import java.util.ArrayList; +import java.util.List; + import growthcraft.cellar.item.CellarPotionItem; import growthcraft.cellar.item.GrapeSeedsItem; import growthcraft.cellar.item.HopsSeedsItem; @@ -12,9 +15,6 @@ import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; -import java.util.ArrayList; -import java.util.List; - public class GrowthcraftCellarItems { public static final DeferredRegister ITEMS = DeferredRegister.create( @@ -153,6 +153,10 @@ public class GrowthcraftCellarItems { GRAIN_AMBER, GRAIN_BROWN, GRAIN_COPPER, GRAIN_DARK, GRAIN_DEEP_AMBER, GRAIN_DEEP_COPPER, GRAIN_GOLDEN, GRAIN_PALE_GOLDEN ); + + public static final RegistryObject CORK_BARK = ITEMS.register( + Reference.UnlocalizedName.CORK_BARK, GrowthcraftItem::new + ); public static void registerCompostables() { float f = 0.3F; diff --git a/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java b/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java index 75013852..975e61e6 100644 --- a/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java +++ b/src/main/java/growthcraft/cellar/init/client/GrowthcraftCellarBlockEntityRenderers.java @@ -1,6 +1,7 @@ package growthcraft.cellar.init.client; import growthcraft.cellar.block.entity.renderer.BrewKettleBlockEntityRenderer; +import growthcraft.cellar.block.entity.renderer.CorkCoasterBlockEntityRenderer; import growthcraft.cellar.block.entity.renderer.CultureJarBlockEntityRenderer; import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; import net.minecraftforge.api.distmarker.Dist; @@ -14,6 +15,7 @@ public class GrowthcraftCellarBlockEntityRenderers { public static void register(EntityRenderersEvent.RegisterRenderers event) { event.registerBlockEntityRenderer(GrowthcraftCellarBlockEntities.CULTURE_JAR_BLOCK_ENTITY.get(), context -> new CultureJarBlockEntityRenderer()); event.registerBlockEntityRenderer(GrowthcraftCellarBlockEntities.BREW_KETTLE_BLOCK_ENTITY.get(), context -> new BrewKettleBlockEntityRenderer()); + event.registerBlockEntityRenderer(GrowthcraftCellarBlockEntities.CORK_COASTER_BLOCK_ENTITY.get(), context -> new CorkCoasterBlockEntityRenderer()); } private GrowthcraftCellarBlockEntityRenderers() { diff --git a/src/main/java/growthcraft/cellar/shared/Reference.java b/src/main/java/growthcraft/cellar/shared/Reference.java index 6effda0e..523a108f 100644 --- a/src/main/java/growthcraft/cellar/shared/Reference.java +++ b/src/main/java/growthcraft/cellar/shared/Reference.java @@ -119,6 +119,8 @@ public static class UnlocalizedName { public static final String CORK_WOOD_LOG = "cork_wood_log"; public static final String CORK_WOOD_LOG_STRIPPED = "cork_wood_log_stripped"; public static final String HAS_CORK_TREE = "has_cork_tree"; + public static final String CORK_BARK = "cork_bark"; + public static final String CORK_COASTER = "cork_coaster"; private UnlocalizedName() { /* Disable Automatic Creation of Public Constructor */ diff --git a/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java b/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java index fca31e46..884bb74d 100644 --- a/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java +++ b/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBlockTags.java @@ -2,17 +2,13 @@ import java.util.concurrent.CompletableFuture; -import growthcraft.bamboo.init.GrowthcraftBambooBlocks; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.TagEntry; import org.jetbrains.annotations.Nullable; import growthcraft.apiary.init.GrowthcraftApiaryBlocks; import growthcraft.apples.init.GrowthcraftApplesBlocks; import growthcraft.apples.init.GrowthcraftApplesTags; +import growthcraft.bamboo.init.GrowthcraftBambooBlocks; import growthcraft.cellar.init.GrowthcraftCellarBlocks; -import growthcraft.cellar.init.GrowthcraftCellarItems; -import growthcraft.cellar.init.GrowthcraftCellarTags; import growthcraft.core.init.GrowthcraftBlocks; import growthcraft.core.init.GrowthcraftTags; import growthcraft.core.shared.Reference; @@ -20,7 +16,9 @@ import growthcraft.rice.init.GrowthcraftRiceBlocks; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; +import net.minecraft.tags.TagEntry; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.Tags; import net.minecraftforge.common.data.BlockTagsProvider; diff --git a/src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json b/src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json new file mode 100644 index 00000000..1409a34c --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/blockstates/cork_coaster.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "growthcraft_cellar:block/cork_coaster" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json b/src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json new file mode 100644 index 00000000..ef72e05c --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/block/cork_coaster.json @@ -0,0 +1,166 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/cube_all", + "ambientocclusion": false, + "render_type": "cutout", + "textures": { + "1": "growthcraft_cellar:block/cork/cork_coaster", + "particle": "growthcraft_cellar:block/cork/cork_coaster" + }, + "elements": [ + { + "from": [4, 0, 13], + "to": [12, 1, 14], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#1"} + } + }, + { + "from": [3, 0, 3], + "to": [13, 1, 13], + "faces": { + "north": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 10, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 10, 10], "texture": "#1"}, + "down": {"uv": [0, 0, 10, 10], "texture": "#1"} + } + }, + { + "from": [4, 0, 2], + "to": [12, 1, 3], + "faces": { + "north": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 8, 1], "texture": "#1"} + } + }, + { + "from": [6, 0, 1], + "to": [10, 1, 2], + "faces": { + "north": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 4, 1], "texture": "#1"} + } + }, + { + "from": [6, 0, 14], + "to": [10, 1, 15], + "faces": { + "north": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "down": {"uv": [0, 0, 4, 1], "texture": "#1"} + } + }, + { + "from": [1, 0, 6], + "to": [2, 1, 10], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 4], "texture": "#1"} + } + }, + { + "from": [2, 0, 4], + "to": [3, 1, 12], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#1"} + } + }, + { + "from": [14, 0, 6], + "to": [15, 1, 10], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 4, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 4], "texture": "#1"} + } + }, + { + "from": [13, 0, 4], + "to": [14, 1, 12], + "faces": { + "north": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "east": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#1"}, + "west": {"uv": [0, 0, 8, 1], "texture": "#1"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#1"}, + "down": {"uv": [0, 0, 1, 8], "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [27.5, -1, 34.5], + "translation": [-1.25, 4.25, 0], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "rotation": [27.5, -1, 34.5], + "translation": [-2.5, 3.5, -0.25], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "rotation": [3, -19, 25], + "translation": [3.25, 6.5, 0] + }, + "firstperson_lefthand": { + "rotation": [3, -19, 25], + "translation": [3.25, 6.5, 0] + }, + "ground": { + "rotation": [0, 74, 72], + "translation": [-0.5, 0, 4.75], + "scale": [0.8, 0.8, 0.8] + }, + "gui": { + "rotation": [36, 26, -2], + "translation": [0, 4, 0], + "scale": [0.8, 0.8, 0.8] + }, + "head": { + "rotation": [-116, 0, 0], + "translation": [0, -3.5, -2.5] + }, + "fixed": { + "rotation": [90, 0, 0], + "translation": [0, 0, 8] + } + }, + "groups": [ + { + "name": "group", + "origin": [0, 0, 0], + "color": 0, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json b/src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json new file mode 100644 index 00000000..8532dd86 --- /dev/null +++ b/src/main/resources/assets/growthcraft_cellar/models/item/cork_coaster.json @@ -0,0 +1,3 @@ +{ + "parent": "growthcraft_cellar:block/cork_coaster" +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_cellar/textures/block/cork/cork_coaster.png b/src/main/resources/assets/growthcraft_cellar/textures/block/cork/cork_coaster.png new file mode 100644 index 0000000000000000000000000000000000000000..5df929abaf85f19de199b4f5fb2026a786f8f65a GIT binary patch literal 2243 zcmV;!2t4Q58;r(K9sdI@=)g75E0&wj9H_bFqg{bzL2S?48)Wl*Ny>gbSi+tk}7=+k`8K5 z+^fd3u+A8U4J9vZAVRP3Gz~6!@cW^(Zfs^SAWP?{iAxcL&VD3%6V_F^H)R%KJB6+T zKgL{6toyY@H~9JOWJ!&sW@?4r8*M1}VB!O*{1zF6m@sNPSS7Q0Bq&)Hp|q zN_tP^JQ!n8M94rDIGbW)@U|NFW?YsU1&ppFjBEo#NX2-YJNnsBi6Vtc=QtHGY8S5e z!oE+48sCn>Nn$^gjIfrIl8mzxBgm=p?KE#B=YaoyCX#xKL6fkb%J+}LZHHlll6+Kf zxm5B#hK~eMAtfkkQDqxKZ_w@0#wo+g?ykTCJ|E?K^gLA6P3CucglcIjT z>?K@DsQiYtv0eLmBII0V_Ftu>`|1@V0$^{mayyMRH)etRcyL-|u*?rlIICi~>KQ3Fh9z1P>QFRwKNfFOMWpe5O^lS# z+d)X>>6D{!KY57KfUO%t6E92R=!10@E{kGf{P5fn8)$I>?$I#^oQQUYz#imC0@AiEhuSpZgp_+5sk|8dXRa@aza_M zcOj9o!@$Sb(bTxim7>k>ba-$|4iG;}L%q`5o_J0c=5A=7;h>`k104&dZK_zR*Tx&i<){ zK`muavaokyO2#6Mtew$LnvI}-ewi9cTFB*gWf=#HxA2afh3&|s>|Gtm(UB(Mu90$ndA)J(i9g?0wCv$> z@0$kDd@k<)eN=AII;Fc33Q@7YsC6EC(2bX=$31TIjvx05XT>^cjCpdUTr2l8kv|S4 zN#ggrk;F)@a(z&i#^QAB%5fw<&MB%QHEQi)-`#^oenhM?<-kr+3F*EyCAm&y4LrH8 z4Ar2bj7}-WBt~}RA641=%#wF5vrtW4~e^Y9x3OOE}Vym((QL~`QSSO<$-mx4Q z^CiX!>G3>&+)G30WDYfatWd+0&zn=rLS9{*JPqwmQCH(6NH&Hq8Ii0l z6wgKKaM3bDi`QOb{*#AH_fAvPA6~1WF_#|8$FE-}?wf|1Jza=&)LY^GK1W3_9>1i; zOWYT767C*460Fl;Es4#9d$hUpeV^ESVrzxgGu8!_9APDIzIv&$Ft|)3_CeQ@>n_My zBK!Gvbb70+GJPtSi*eqSx7VHbzEE9c^5EDW5}o}}xGyAL=Z)(z@!NIg%hC|n8D~&+ zg)HPh&u8B9My)Nl`TEo`>9kt7Z@yX$mUZx!T)PXuexG@EBhra~{`nMH?`4I>9ZDM? zHFI}ASRR|SQ`W!xv^Z8C+tRg8VYSobR2{;v`^r!G%Gq literal 0 HcmV?d00001 From b07c4b4ab462fe1cb5f31a058a958509c7b4416e Mon Sep 17 00:00:00 2001 From: Fox Date: Tue, 19 Nov 2024 22:14:08 +0100 Subject: [PATCH 7/7] resized bottle model, added BOP and BWG biomes for apple tree. added proper voxel size for coaster --- .../cellar/block/CorkCoasterBlock.java | 25 +- .../growthcraft/cellar/block/CorkLog.java | 9 +- .../block/entity/CorkCoasterBlockEntity.java | 2 +- .../GrowthcraftCoreBiomeTagsProvider.java | 15 +- .../models/item/potion_wine.json | 5513 ++--------------- 5 files changed, 583 insertions(+), 4981 deletions(-) diff --git a/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java b/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java index 876adf82..8758fb72 100644 --- a/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java +++ b/src/main/java/growthcraft/cellar/block/CorkCoasterBlock.java @@ -4,11 +4,13 @@ import growthcraft.cellar.init.GrowthcraftCellarBlockEntities; import growthcraft.core.utils.BlockPropertiesUtils; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.Block; @@ -21,12 +23,19 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; public class CorkCoasterBlock extends BaseEntityBlock { public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; - + public static final BooleanProperty ITEM = BooleanProperty.create("item"); + private static VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 2.0D, 15.0D); + private static VoxelShape SHAPE_WITH_BOTTLE = Shapes.or(Block.box(5.0D, 0.0D, 5.0D, 11.0D, 16.0D, 11.0D), SHAPE); + public CorkCoasterBlock() { this(getInitProperties()); } @@ -45,15 +54,21 @@ private static Properties getInitProperties() { return properties; } + @Override + public VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return state.getValue(ITEM).booleanValue() ? SHAPE_WITH_BOTTLE : SHAPE; + } + @Override public BlockState getStateForPlacement(BlockPlaceContext context) { - return defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); + return defaultBlockState() + .setValue(FACING, context.getHorizontalDirection().getOpposite()) + .setValue(ITEM, Boolean.FALSE); } @Override protected void createBlockStateDefinition(StateDefinition.Builder builder) { - super.createBlockStateDefinition(builder); - builder.add(FACING); + super.createBlockStateDefinition(builder.add(FACING).add(ITEM)); } @Override @@ -86,7 +101,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla blockEntity.setItem(slot, itemInHand); pPlayer.setItemInHand(pHand, slotStack); -// pState = pState.setValue(SWORD, !blockEntity.isEmpty()); + pState = pState.setValue(ITEM, !blockEntity.isEmpty()); pLevel.setBlock(pPos, pState, UPDATE_ALL); return InteractionResult.SUCCESS; } diff --git a/src/main/java/growthcraft/cellar/block/CorkLog.java b/src/main/java/growthcraft/cellar/block/CorkLog.java index 92651470..d6345fdd 100644 --- a/src/main/java/growthcraft/cellar/block/CorkLog.java +++ b/src/main/java/growthcraft/cellar/block/CorkLog.java @@ -8,7 +8,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; -import net.minecraft.world.item.AxeItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; @@ -17,6 +16,8 @@ import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraftforge.common.ToolAction; +import net.minecraftforge.common.ToolActions; +import oshi.driver.windows.perfmon.SystemInformation.ContextSwitchProperty; public class CorkLog extends GrowthcraftLogBlock{ public static final BooleanProperty REGROW = BooleanProperty.create("regrow"); @@ -45,9 +46,11 @@ public BlockState getStateForPlacement(BlockPlaceContext pContext) { @Override public @Nullable BlockState getToolModifiedState(BlockState state, UseOnContext context, ToolAction toolAction, boolean simulate) { - if (context.getItemInHand().getItem() instanceof AxeItem) { + if (context.getItemInHand().canPerformAction(ToolActions.AXE_STRIP)) { if(state.is(GrowthcraftCellarBlocks.CORK_WOOD_LOG.get())) { - popResource(context.getLevel(), context.getClickedPos(), new ItemStack(GrowthcraftCellarItems.CORK_BARK.get())); + System.out.println("hello " + context.getClickedPos()); + System.out.println("hello2 " + context.getClickedPos().relative(context.getClickedFace(), 1)); + popResource(context.getLevel(), context.getClickedPos().relative(context.getClickedFace(), 1), new ItemStack(GrowthcraftCellarItems.CORK_BARK.get())); return GrowthcraftCellarBlocks.CORK_WOOD_LOG_STRIPPED.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)).setValue(REGROW, state.getValue(REGROW)); } if(state.is(GrowthcraftCellarBlocks.CORK_WOOD.get())) { diff --git a/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java b/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java index 9c22f11e..1efdd538 100644 --- a/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java +++ b/src/main/java/growthcraft/cellar/block/entity/CorkCoasterBlockEntity.java @@ -53,7 +53,7 @@ protected void onContentsChanged(int slot) { @Override public boolean canPlaceItem(int slot, ItemStack stack) { - return stack.is(GrowthcraftCellarItems.POTION_WINE.get());// || stack.is(RelicsTags.Items.SWORD_PEDESTAL_SWORDS); + return stack.is(GrowthcraftCellarItems.POTION_WINE.get()); } diff --git a/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBiomeTagsProvider.java b/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBiomeTagsProvider.java index 67b0d5c5..880e6b5b 100644 --- a/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBiomeTagsProvider.java +++ b/src/main/java/growthcraft/core/datagen/providers/GrowthcraftCoreBiomeTagsProvider.java @@ -11,6 +11,8 @@ import net.minecraft.core.HolderLookup.Provider; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.BiomeTagsProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagEntry; import net.minecraft.world.level.biome.Biomes; import net.minecraftforge.common.data.ExistingFileHelper; @@ -22,9 +24,14 @@ public GrowthcraftCoreBiomeTagsProvider(PackOutput output, CompletableFuture