diff --git a/src/main/java/com/minelittlepony/unicopia/block/PineappleCropBlock.java b/src/main/java/com/minelittlepony/unicopia/block/PineappleCropBlock.java new file mode 100644 index 00000000..3df5e75d --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/block/PineappleCropBlock.java @@ -0,0 +1,89 @@ +package com.minelittlepony.unicopia.block; + +import com.minelittlepony.unicopia.seasons.FertilizableUtil; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.CropBlock; +import net.minecraft.block.enums.BlockHalf; +import net.minecraft.registry.tag.BlockTags; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; +import net.minecraft.state.property.EnumProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.BlockView; +import net.minecraft.world.World; +import net.minecraft.world.WorldAccess; +import net.minecraft.world.WorldView; + +public class PineappleCropBlock extends CropBlock { + private static final EnumProperty HALF = Properties.BLOCK_HALF; + private static final BooleanProperty WILD = BooleanProperty.of("wild"); + + public PineappleCropBlock(Settings settings) { + super(settings); + setDefaultState(getDefaultState().with(HALF, BlockHalf.BOTTOM).with(WILD, false)); + } + + @Override + protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) { + return floor.isOf(this) || super.canPlantOnTop(floor, world, pos); + } + + @Override + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + if (state.get(WILD) && world.getBlockState(pos.down()).isIn(BlockTags.DIRT)) { + return world.getBaseLightLevel(pos, 0) >= 8 || world.isSkyVisible(pos); + } + return super.canPlaceAt(state, world, pos); + } + + @Override + public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + if (direction == Direction.UP && !neighborState.isOf(this)) { + return state.with(AGE, Math.min(state.get(AGE), getMaxAge() - 1)); + } + return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos); + } + + @Override + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + if (state.get(HALF) == BlockHalf.BOTTOM) { + super.randomTick(state, world, pos, random); + + if (!isMature(state) && isMature(world.getBlockState(pos)) && world.isAir(pos.up())) { + world.setBlockState(pos.up(), getDefaultState().with(HALF, BlockHalf.TOP)); + } + } else { + int age = getAge(state); + if (world.getBaseLightLevel(pos, 0) >= 9 && age < getMaxAge()) { + int steps = FertilizableUtil.getGrowthSteps(world, pos, state, random); + if (steps > 0) { + world.setBlockState(pos, state.with(AGE, Math.min(getMaxAge(), age + steps)), Block.NOTIFY_LISTENERS); + } + } + } + } + + @Override + public void applyGrowth(World world, BlockPos pos, BlockState state) { + world.setBlockState(pos, state.with(AGE, Math.min(getMaxAge(), getAge(state) + getGrowthAmount(world))), Block.NOTIFY_LISTENERS); + + BlockHalf half = state.get(HALF); + if (half == BlockHalf.BOTTOM && isMature(world.getBlockState(pos))) { + if (world.isAir(pos.up())) { + world.setBlockState(pos.up(), getDefaultState().with(HALF, BlockHalf.TOP)); + } + } + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + super.appendProperties(builder); + builder.add(HALF, WILD); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java index 9870044e..bb82d012 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java +++ b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java @@ -70,7 +70,9 @@ public interface UBlocks { Block PALM_WALL_HANGING_SIGN = register("palm_wall_hanging_sign", new WallHangingSignBlock(Settings.create().mapColor(PALM_LOG.getDefaultMapColor()).solid().instrument(Instrument.BASS).noCollision().strength(1.0f).burnable().dropsLike(PALM_HANGING_SIGN), UWoodTypes.PALM)); Block PALM_LEAVES = register("palm_leaves", BlockConstructionUtils.createLeavesBlock(BlockSoundGroup.GRASS), ItemGroups.BUILDING_BLOCKS); - Block BANANAS = register("bananas", new FruitBlock(Settings.create().mapColor(MapColor.YELLOW).sounds(BlockSoundGroup.WOOD).hardness(3).pistonBehavior(PistonBehavior.DESTROY), Direction.DOWN, PALM_LEAVES, VoxelShapes.fullCube())); + Block BANANAS = register("bananas", new FruitBlock(Settings.create().mapColor(MapColor.YELLOW).sounds(BlockSoundGroup.WOOD).noCollision().ticksRandomly().breakInstantly().pistonBehavior(PistonBehavior.DESTROY), Direction.DOWN, PALM_LEAVES, VoxelShapes.fullCube())); + + Block PINEAPPLE = register("pineapple", new PineappleCropBlock(Settings.create().sounds(BlockSoundGroup.GRASS).noCollision().breakInstantly().pistonBehavior(PistonBehavior.DESTROY))); Block MANGO_LEAVES = register("mango_leaves", new FruitBearingBlock(FabricBlockSettings.copy(Blocks.JUNGLE_LEAVES), 0xCCFFAA00, diff --git a/src/main/java/com/minelittlepony/unicopia/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java index 9e709fbd..42f5878e 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -76,6 +76,7 @@ public interface UItems { Item MANGO = register("mango", new Item(new Item.Settings().food(UFoodComponents.MANGO)), ItemGroups.FOOD_AND_DRINK); Item BANANA = register("banana", new Item(new Item.Settings().food(UFoodComponents.BANANA)), ItemGroups.FOOD_AND_DRINK); Item PINEAPPLE = register("pineapple", new PineappleItem(new Item.Settings().food(UFoodComponents.BANANA).maxDamage(3)), ItemGroups.FOOD_AND_DRINK); + Item PINEAPPLE_CROWN = register("pineapple_crown", new AliasedBlockItem(UBlocks.PINEAPPLE, new Item.Settings()), ItemGroups.NATURAL); Item PEBBLES = register("pebbles", new RacePredicatedAliasedBlockItem(UBlocks.ROCKS, new Item.Settings(), Race::canUseEarth), ItemGroups.NATURAL); Item ROCK = register("rock", new HeavyProjectileItem(new Item.Settings(), 3), ItemGroups.NATURAL); diff --git a/src/main/resources/assets/unicopia/blockstates/pineapple.json b/src/main/resources/assets/unicopia/blockstates/pineapple.json new file mode 100644 index 00000000..976377d8 --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/pineapple.json @@ -0,0 +1,21 @@ +{ + "variants": { + "age=0,half=bottom": { "model": "unicopia:block/pineapple_stem_stage0" }, + "age=1,half=bottom": { "model": "unicopia:block/pineapple_stem_stage1" }, + "age=2,half=bottom": { "model": "unicopia:block/pineapple_stem_stage2" }, + "age=3,half=bottom": { "model": "unicopia:block/pineapple_stem_stage3" }, + "age=4,half=bottom": { "model": "unicopia:block/pineapple_stem_stage4" }, + "age=5,half=bottom": { "model": "unicopia:block/pineapple_stem_stage5" }, + "age=6,half=bottom": { "model": "unicopia:block/pineapple_stem_stage5" }, + "age=7,half=bottom": { "model": "unicopia:block/pineapple_stem_stage6" }, + + "age=0,half=top": { "model": "unicopia:block/pineapple_stage0" }, + "age=1,half=top": { "model": "unicopia:block/pineapple_stage0" }, + "age=2,half=top": { "model": "unicopia:block/pineapple_stage1" }, + "age=3,half=top": { "model": "unicopia:block/pineapple_stage2" }, + "age=4,half=top": { "model": "unicopia:block/pineapple_stage3" }, + "age=5,half=top": { "model": "unicopia:block/pineapple_stage4" }, + "age=6,half=top": { "model": "unicopia:block/pineapple_stage5" }, + "age=7,half=top": { "model": "unicopia:block/pineapple_stage6" } + } +} diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 87d92a4c..db501f6a 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -91,6 +91,7 @@ "item.unicopia.mango": "Mango", "item.unicopia.banana": "Banana", "item.unicopia.pineapple": "Pineapple", + "item.unicopia.pineapple_crown": "Pineapple Crown", "item.unicopia.sunglasses": "Sunglasses", "item.unicopia.broken_sunglasses": "Broken Sunglasses", @@ -185,6 +186,7 @@ "block.unicopia.mango": "Mango", "block.unicopia.mango_leaves": "Mango Leaves", "block.unicopia.mango_sapling": "Mango Sapling", + "block.unicopia.pineapple": "Pineapple Plant", "block.unicopia.green_apple_leaves": "Granny Smith Leaves", "block.unicopia.green_apple_sapling": "Granny Smith Sapling", diff --git a/src/main/resources/assets/unicopia/models/block/pineapple.json b/src/main/resources/assets/unicopia/models/block/pineapple.json new file mode 100644 index 00000000..92ecb5cd --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple.json @@ -0,0 +1,350 @@ +{ + "textures": { + "bananas": "unicopia:block/bananas", + "particle": "#bananas" + }, + "elements": [ + { + "from": [3, 1, 4], + "to": [13, 11, 14], + "faces": { + "north": {"uv": [0.25, 0.25, 10.25, 10.25], "texture": "#bananas"}, + "east": {"uv": [1.25, 0.25, 11.25, 10.25], "texture": "#bananas"}, + "south": {"uv": [2.25, 0.25, 12.25, 10.25], "texture": "#bananas"}, + "west": {"uv": [3.25, 0.25, 13.25, 10.25], "texture": "#bananas"}, + "up": {"uv": [4.25, 0.25, 14.25, 10.25], "texture": "#bananas"}, + "down": {"uv": [5.25, 0.25, 15.25, 10.25], "texture": "#bananas"} + } + }, + { + "from": [8, -3, 5], + "to": [10, 3, 7], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [10, 0, 6], + "to": [12, 6, 8], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [10, 4, 7], + "to": [12, 10, 9], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [8, 4, 7], + "to": [10, 10, 9], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [12, 5, 10], + "to": [14, 11, 12], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [7, 0, 6], + "to": [9, 6, 8], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [8, 5, 2], + "to": [10, 11, 4], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [6, -2, 4], + "to": [8, 4, 6], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [10, -3, 6], + "to": [12, 3, 8], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [11, 2, 4], + "to": [13, 8, 6], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [13, 5, 6], + "to": [15, 11, 8], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [5, 5, 14], + "to": [11, 11, 16], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [1, 5, 6], + "to": [3, 11, 11], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [4, 2, 3], + "to": [6, 8, 5], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [5, 2, 6], + "to": [7, 8, 8], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [7, -10, 9], + "to": [9, -1, 11], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [9, -7, 10], + "to": [11, -1, 12], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [9, -3, 11], + "to": [11, 3, 13], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [7, -3, 11], + "to": [9, 3, 13], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [11, -1, 9], + "to": [13, 5, 11], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [6, -7, 10], + "to": [8, 2, 12], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [7, -8, 6], + "to": [9, -2, 8], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [5, -9, 8], + "to": [7, -3, 10], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [9, -10, 7], + "to": [11, -1, 9], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [10, -6, 8], + "to": [12, 1, 10], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [9, -5, 5], + "to": [11, 1, 7], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [6, 0, 3], + "to": [8, 6, 5], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [4, -5, 5], + "to": [6, 1, 7], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [3, -5, 7], + "to": [5, 1, 9], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + }, + { + "from": [4, -3, 9], + "to": [6, 3, 11], + "faces": { + "north": {"uv": [0, 6, 2, 12], "texture": "#bananas"}, + "east": {"uv": [2, 6, 4, 12], "texture": "#bananas"}, + "south": {"uv": [0, 0, 2, 6], "texture": "#bananas"}, + "west": {"uv": [2, 0, 4, 6], "texture": "#bananas"}, + "down": {"uv": [2, 12, 0, 14], "texture": "#bananas"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage0.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage0.json new file mode 100644 index 00000000..31080c7e --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage1.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage1.json new file mode 100644 index 00000000..90dc9e67 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage2.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage2.json new file mode 100644 index 00000000..bb96bb97 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage3.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage3.json new file mode 100644 index 00000000..a4d17c24 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage3" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage4.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage4.json new file mode 100644 index 00000000..9dddc1f3 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage4" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage5.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage5.json new file mode 100644 index 00000000..705bc988 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stage6.json b/src/main/resources/assets/unicopia/models/block/pineapple_stage6.json new file mode 100644 index 00000000..41719887 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stage6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stage6" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage0.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage0.json new file mode 100644 index 00000000..458221f1 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage1.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage1.json new file mode 100644 index 00000000..6c656c8c --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage2.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage2.json new file mode 100644 index 00000000..7c0a1566 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage3.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage3.json new file mode 100644 index 00000000..42fdad3a --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage3" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage4.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage4.json new file mode 100644 index 00000000..045528d6 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage4" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage5.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage5.json new file mode 100644 index 00000000..354ca245 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage6.json b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage6.json new file mode 100644 index 00000000..235ee57b --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/pineapple_stem_stage6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:block/pineapple_stem_stage6" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/item/pineapple_crown.json b/src/main/resources/assets/unicopia/models/item/pineapple_crown.json new file mode 100644 index 00000000..c7ded5a0 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/item/pineapple_crown.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "unicopia:item/pineapple_crown" + } +} diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage0.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage0.png new file mode 100644 index 00000000..0a07bab3 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage0.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage1.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage1.png new file mode 100644 index 00000000..725c6544 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage1.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage2.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage2.png new file mode 100644 index 00000000..ddb698f2 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage2.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage3.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage3.png new file mode 100644 index 00000000..a366ea8f Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage3.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage4.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage4.png new file mode 100644 index 00000000..5e8d35e0 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage4.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage5.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage5.png new file mode 100644 index 00000000..644ed182 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage5.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stage6.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stage6.png new file mode 100644 index 00000000..208827ae Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stage6.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage0.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage0.png new file mode 100644 index 00000000..9a4866fe Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage0.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage1.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage1.png new file mode 100644 index 00000000..ebd1e30e Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage1.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage2.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage2.png new file mode 100644 index 00000000..71a0aa41 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage2.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage3.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage3.png new file mode 100644 index 00000000..79deb7eb Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage3.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage4.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage4.png new file mode 100644 index 00000000..b731ac44 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage4.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage5.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage5.png new file mode 100644 index 00000000..01046c2c Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage5.png differ diff --git a/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage6.png b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage6.png new file mode 100644 index 00000000..ada9e0a0 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/pineapple_stem_stage6.png differ diff --git a/src/main/resources/assets/unicopia/textures/item/pineapple_crown.png b/src/main/resources/assets/unicopia/textures/item/pineapple_crown.png new file mode 100644 index 00000000..a37a8ee4 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/item/pineapple_crown.png differ diff --git a/src/main/resources/data/minecraft/tags/blocks/crops.json b/src/main/resources/data/minecraft/tags/blocks/crops.json index 6257b7b3..8e14052f 100644 --- a/src/main/resources/data/minecraft/tags/blocks/crops.json +++ b/src/main/resources/data/minecraft/tags/blocks/crops.json @@ -1,6 +1,7 @@ { "replace": false, "values": [ - "unicopia:rocks" + "unicopia:rocks", + "unicopia:pineapple" ] } \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/pineapple.json b/src/main/resources/data/unicopia/loot_tables/blocks/pineapple.json new file mode 100644 index 00000000..aced6181 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/pineapple.json @@ -0,0 +1,35 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "unicopia:pineapple", + "properties": { + "age": "7", + "half": "top" + } + } + ], + "name": "unicopia:pineapple" + } + ] + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/recipes/pineapple_crown.json b/src/main/resources/data/unicopia/recipes/pineapple_crown.json new file mode 100644 index 00000000..1d79690b --- /dev/null +++ b/src/main/resources/data/unicopia/recipes/pineapple_crown.json @@ -0,0 +1,7 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "unicopia:pineapple" } + ], + "result": { "item": "unicopia:pineapple_crown" } +}