diff --git a/src/main/java/net/yyc12345/teyvatcraft/RegisterManager.java b/src/main/java/net/yyc12345/teyvatcraft/RegisterManager.java index 3703500..25ee098 100644 --- a/src/main/java/net/yyc12345/teyvatcraft/RegisterManager.java +++ b/src/main/java/net/yyc12345/teyvatcraft/RegisterManager.java @@ -15,12 +15,14 @@ import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; import net.minecraft.util.Identifier; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; +import net.minecraft.sound.BlockSoundGroup; import net.minecraft.block.Blocks; import net.minecraft.util.Rarity; import net.minecraft.block.Block; import net.minecraft.block.Material; import net.minecraft.block.MaterialColor; import net.minecraft.block.OreBlock; +import net.minecraft.item.AliasedBlockItem; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.world.gen.GenerationStep; @@ -30,6 +32,7 @@ import net.minecraft.world.gen.feature.ConfiguredFeature; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.OreFeatureConfig; +import net.yyc12345.teyvatcraft.blocks.*; import net.yyc12345.teyvatcraft.items.gnosis.*; public class RegisterManager { @@ -98,6 +101,17 @@ public class RegisterManager { public static final Item FINE_ENHANCEMENT_ORE = new Item(new FabricItemSettings().group(ITEM_GROUP)); public static final Item ENHANCEMENT_ORE = new Item(new FabricItemSettings().group(ITEM_GROUP)); + // ==================== crops + + public static final Block RICE_block = new TeyvatCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP)); + public static final Block TOMATO = new TeyvatCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP)); + public static final Block ONION = new TeyvatCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP)); + public static final Block CABBAGE = new TeyvatCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP)); + public static final Block RADDISH = new TeyvatCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP)); + + public static final Item RICE_SEED = new AliasedBlockItem(RICE_block, new FabricItemSettings().group(ITEM_GROUP)); + public static final Item RICE_item = new Item(new FabricItemSettings().group(ITEM_GROUP)); + // ==================== ore gen private static ConfiguredFeature OREGEN_MAGICAL_CRYSTAL_CHUNK_ORE = Feature.ORE .configure(new OreFeatureConfig( @@ -160,6 +174,7 @@ public class RegisterManager { Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "gnosis_anemo"), GNOSIS_ANEMO); Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "gnosis_cryo"), GNOSIS_CRYO); + // ore Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "magical_crystal_chunk"), MAGICAL_CRYSTAL_CHUNK); Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "crystal_chunk"), CRYSTAL_CHUNK); Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "white_iron_chunk"), WHITE_IRON_CHUNK); @@ -186,11 +201,31 @@ public class RegisterManager { Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "starsilver_ore"), new BlockItem(STARSILVER_ORE, new Item.Settings().group(ITEM_GROUP))); + + // crops + Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "rice_seed"), RICE_SEED); + Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "rice"), RICE_item); + + ((TeyvatCropBlock)RICE_block).setSeedsItem(RICE_SEED); + Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "rice"), RICE_block); + Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "tomato"), TOMATO); + Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "onion"), ONION); + Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "cabbage"), CABBAGE); + Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "raddish"), RADDISH); + Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "tomato"), + new BlockItem(TOMATO, new Item.Settings().group(ITEM_GROUP))); + Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "onion"), + new BlockItem(ONION, new Item.Settings().group(ITEM_GROUP))); + Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "cabbage"), + new BlockItem(CABBAGE, new Item.Settings().group(ITEM_GROUP))); + Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "raddish"), + new BlockItem(RADDISH, new Item.Settings().group(ITEM_GROUP))); + + // ore gen RegisterOreGeneration("oregen_magical_crystal_ore", OREGEN_MAGICAL_CRYSTAL_CHUNK_ORE); RegisterOreGeneration("oregen_crystal_ore", OREGEN_CRYSTAL_CHUNK_ORE); RegisterOreGeneration("oregen_white_iron_ore", OREGEN_WHITE_IRON_CHUNK_ORE); RegisterOreGeneration("oregen_iron_ore", OREGEN_IRON_CHUNK_ORE); RegisterOreGeneration("oregen_starsilver_ore", OREGEN_STARSILVER_ORE); - } } diff --git a/src/main/java/net/yyc12345/teyvatcraft/blocks/TeyvatCropBlock.java b/src/main/java/net/yyc12345/teyvatcraft/blocks/TeyvatCropBlock.java new file mode 100644 index 0000000..84a95ba --- /dev/null +++ b/src/main/java/net/yyc12345/teyvatcraft/blocks/TeyvatCropBlock.java @@ -0,0 +1,64 @@ +package net.yyc12345.teyvatcraft.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.CropBlock; +import net.minecraft.block.ShapeContext; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemConvertible; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.world.BlockView; +import net.minecraft.world.World; + +public class TeyvatCropBlock extends CropBlock { + protected static final VoxelShape[] AGE_TO_SHAPE = new VoxelShape[]{ + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 3.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 4.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 5.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 6.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D), + Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 9.0D, 16.0D)}; + + private Item seed; + + public TeyvatCropBlock(Settings settings) { + super(settings); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + return AGE_TO_SHAPE[state.get(this.getAgeProperty())]; + } + + public void setSeedsItem(Item seed) { + this.seed = seed; + } + + @Override + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + if (getAge(state) == getMaxAge()) { + world.setBlockState(pos, this.withAge(0), 2); + dropStacks(state, world, pos); + return ActionResult.CONSUME; + } + return ActionResult.PASS; + } + + @Override + public void onLandedUpon(World world, BlockPos pos, Entity entity, float distance) { + super.onLandedUpon(world, pos, entity, distance); + } + + @Override + protected ItemConvertible getSeedsItem() { + return seed; + } +} diff --git a/src/main/resources/assets/teyvatcraft/blockstates/cabbage.json b/src/main/resources/assets/teyvatcraft/blockstates/cabbage.json new file mode 100644 index 0000000..6cd013b --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/blockstates/cabbage.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "teyvatcraft:block/cabbage_stage0" + }, + "age=1": { + "model": "teyvatcraft:block/cabbage_stage0" + }, + "age=2": { + "model": "teyvatcraft:block/cabbage_stage1" + }, + "age=3": { + "model": "teyvatcraft:block/cabbage_stage1" + }, + "age=4": { + "model": "teyvatcraft:block/cabbage_stage2" + }, + "age=5": { + "model": "teyvatcraft:block/cabbage_stage2" + }, + "age=6": { + "model": "teyvatcraft:block/cabbage_stage2" + }, + "age=7": { + "model": "teyvatcraft:block/cabbage_stage3" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/blockstates/onion.json b/src/main/resources/assets/teyvatcraft/blockstates/onion.json new file mode 100644 index 0000000..97be907 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/blockstates/onion.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "teyvatcraft:block/onion_stage0" + }, + "age=1": { + "model": "teyvatcraft:block/onion_stage0" + }, + "age=2": { + "model": "teyvatcraft:block/onion_stage1" + }, + "age=3": { + "model": "teyvatcraft:block/onion_stage1" + }, + "age=4": { + "model": "teyvatcraft:block/onion_stage2" + }, + "age=5": { + "model": "teyvatcraft:block/onion_stage2" + }, + "age=6": { + "model": "teyvatcraft:block/onion_stage2" + }, + "age=7": { + "model": "teyvatcraft:block/onion_stage3" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/blockstates/raddish.json b/src/main/resources/assets/teyvatcraft/blockstates/raddish.json new file mode 100644 index 0000000..3876aa9 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/blockstates/raddish.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "teyvatcraft:block/raddish_stage0" + }, + "age=1": { + "model": "teyvatcraft:block/raddish_stage0" + }, + "age=2": { + "model": "teyvatcraft:block/raddish_stage1" + }, + "age=3": { + "model": "teyvatcraft:block/raddish_stage1" + }, + "age=4": { + "model": "teyvatcraft:block/raddish_stage2" + }, + "age=5": { + "model": "teyvatcraft:block/raddish_stage2" + }, + "age=6": { + "model": "teyvatcraft:block/raddish_stage2" + }, + "age=7": { + "model": "teyvatcraft:block/raddish_stage3" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/blockstates/rice.json b/src/main/resources/assets/teyvatcraft/blockstates/rice.json new file mode 100644 index 0000000..f14d86b --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/blockstates/rice.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "teyvatcraft:block/rice_stage0" + }, + "age=1": { + "model": "teyvatcraft:block/rice_stage1" + }, + "age=2": { + "model": "teyvatcraft:block/rice_stage2" + }, + "age=3": { + "model": "teyvatcraft:block/rice_stage3" + }, + "age=4": { + "model": "teyvatcraft:block/rice_stage4" + }, + "age=5": { + "model": "teyvatcraft:block/rice_stage5" + }, + "age=6": { + "model": "teyvatcraft:block/rice_stage6" + }, + "age=7": { + "model": "teyvatcraft:block/rice_stage7" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/blockstates/tomato.json b/src/main/resources/assets/teyvatcraft/blockstates/tomato.json new file mode 100644 index 0000000..4fe0a20 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/blockstates/tomato.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "teyvatcraft:block/tomato_stage0" + }, + "age=1": { + "model": "teyvatcraft:block/tomato_stage0" + }, + "age=2": { + "model": "teyvatcraft:block/tomato_stage1" + }, + "age=3": { + "model": "teyvatcraft:block/tomato_stage1" + }, + "age=4": { + "model": "teyvatcraft:block/tomato_stage2" + }, + "age=5": { + "model": "teyvatcraft:block/tomato_stage2" + }, + "age=6": { + "model": "teyvatcraft:block/tomato_stage2" + }, + "age=7": { + "model": "teyvatcraft:block/tomato_stage3" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage0.json b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage0.json new file mode 100644 index 0000000..01aa0b2 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage0.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/cabbage_stage0" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage1.json b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage1.json new file mode 100644 index 0000000..5e5192b --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage1.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/cabbage_stage1" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage2.json b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage2.json new file mode 100644 index 0000000..33c80ad --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage2.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/cabbage_stage2" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage3.json b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage3.json new file mode 100644 index 0000000..767d9dc --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/cabbage_stage3.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/cabbage_stage3" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/onion_stage0.json b/src/main/resources/assets/teyvatcraft/models/block/onion_stage0.json new file mode 100644 index 0000000..a6e3ae4 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/onion_stage0.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/onion_stage0" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/onion_stage1.json b/src/main/resources/assets/teyvatcraft/models/block/onion_stage1.json new file mode 100644 index 0000000..24b7a6a --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/onion_stage1.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/onion_stage1" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/onion_stage2.json b/src/main/resources/assets/teyvatcraft/models/block/onion_stage2.json new file mode 100644 index 0000000..97a3537 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/onion_stage2.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/onion_stage2" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/onion_stage3.json b/src/main/resources/assets/teyvatcraft/models/block/onion_stage3.json new file mode 100644 index 0000000..a6d315b --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/onion_stage3.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/onion_stage3" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/raddish_stage0.json b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage0.json new file mode 100644 index 0000000..96e8257 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage0.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/raddish_stage0" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/raddish_stage1.json b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage1.json new file mode 100644 index 0000000..29aa76f --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage1.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/raddish_stage1" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/raddish_stage2.json b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage2.json new file mode 100644 index 0000000..21d5c3a --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage2.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/raddish_stage2" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/raddish_stage3.json b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage3.json new file mode 100644 index 0000000..4e4c1fa --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/raddish_stage3.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/raddish_stage3" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage0.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage0.json new file mode 100644 index 0000000..82aa0e7 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage0.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage0" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage1.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage1.json new file mode 100644 index 0000000..5306972 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage1.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage1" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage2.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage2.json new file mode 100644 index 0000000..cad1364 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage2.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage2" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage3.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage3.json new file mode 100644 index 0000000..71edc86 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage3.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage3" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage4.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage4.json new file mode 100644 index 0000000..5d2867d --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage4.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage4" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage5.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage5.json new file mode 100644 index 0000000..0c59d02 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage5.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage5" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage6.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage6.json new file mode 100644 index 0000000..e11cc88 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage6.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage6" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/rice_stage7.json b/src/main/resources/assets/teyvatcraft/models/block/rice_stage7.json new file mode 100644 index 0000000..d0be5d9 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/rice_stage7.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/rice_stage7" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/tomato_stage0.json b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage0.json new file mode 100644 index 0000000..f0bde70 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage0.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/tomato_stage0" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/tomato_stage1.json b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage1.json new file mode 100644 index 0000000..00e7258 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage1.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/tomato_stage1" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/tomato_stage2.json b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage2.json new file mode 100644 index 0000000..08338cc --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage2.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/tomato_stage2" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/block/tomato_stage3.json b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage3.json new file mode 100644 index 0000000..5a73d5f --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/block/tomato_stage3.json @@ -0,0 +1,7 @@ + +{ +"parent": "minecraft:block/crop", +"textures": { + "crop": "teyvatcraft:block/tomato_stage3" +} +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/item/cabbage.json b/src/main/resources/assets/teyvatcraft/models/item/cabbage.json new file mode 100644 index 0000000..da8515a --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/item/cabbage.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "teyvatcraft:item/cabbage" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/item/onion.json b/src/main/resources/assets/teyvatcraft/models/item/onion.json new file mode 100644 index 0000000..2635699 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/item/onion.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "teyvatcraft:item/onion" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/item/raddish.json b/src/main/resources/assets/teyvatcraft/models/item/raddish.json new file mode 100644 index 0000000..3d4dd2a --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/item/raddish.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "teyvatcraft:item/raddish" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/item/rice.json b/src/main/resources/assets/teyvatcraft/models/item/rice.json new file mode 100644 index 0000000..59061f7 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/item/rice.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "teyvatcraft:item/rice" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/item/rice_seed.json b/src/main/resources/assets/teyvatcraft/models/item/rice_seed.json new file mode 100644 index 0000000..7d16049 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/item/rice_seed.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "teyvatcraft:item/rice_seed" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/models/item/tomato.json b/src/main/resources/assets/teyvatcraft/models/item/tomato.json new file mode 100644 index 0000000..02ebb92 --- /dev/null +++ b/src/main/resources/assets/teyvatcraft/models/item/tomato.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "teyvatcraft:item/tomato" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage0.png b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage0.png new file mode 100644 index 0000000..5f48597 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage0.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage1.png b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage1.png new file mode 100644 index 0000000..7733679 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage1.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage2.png b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage2.png new file mode 100644 index 0000000..a12e124 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage2.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage3.png b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage3.png new file mode 100644 index 0000000..d581a59 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/cabbage_stage3.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/onion_stage0.png b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage0.png new file mode 100644 index 0000000..d31ceb6 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage0.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/onion_stage1.png b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage1.png new file mode 100644 index 0000000..2c4d65c Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage1.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/onion_stage2.png b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage2.png new file mode 100644 index 0000000..9aa0e17 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage2.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/onion_stage3.png b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage3.png new file mode 100644 index 0000000..b2472d3 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/onion_stage3.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage0.png b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage0.png new file mode 100644 index 0000000..d31ceb6 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage0.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage1.png b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage1.png new file mode 100644 index 0000000..2c4d65c Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage1.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage2.png b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage2.png new file mode 100644 index 0000000..9aa0e17 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage2.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage3.png b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage3.png new file mode 100644 index 0000000..80d050a Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/raddish_stage3.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage0.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage0.png new file mode 100644 index 0000000..a931be8 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage0.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage1.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage1.png new file mode 100644 index 0000000..e2fde9e Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage1.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage2.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage2.png new file mode 100644 index 0000000..8cf9cb2 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage2.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage3.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage3.png new file mode 100644 index 0000000..b2a1e91 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage3.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage4.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage4.png new file mode 100644 index 0000000..867c64a Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage4.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage5.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage5.png new file mode 100644 index 0000000..8bb08de Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage5.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage6.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage6.png new file mode 100644 index 0000000..8c6320a Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage6.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/rice_stage7.png b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage7.png new file mode 100644 index 0000000..c472dfd Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/rice_stage7.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage0.png b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage0.png new file mode 100644 index 0000000..b48bd41 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage0.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage1.png b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage1.png new file mode 100644 index 0000000..aa5f465 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage1.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage2.png b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage2.png new file mode 100644 index 0000000..9722276 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage2.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage3.png b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage3.png new file mode 100644 index 0000000..9c052a7 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/block/tomato_stage3.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/item/cabbage.png b/src/main/resources/assets/teyvatcraft/textures/item/cabbage.png new file mode 100644 index 0000000..78cd16b Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/item/cabbage.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/item/onion.png b/src/main/resources/assets/teyvatcraft/textures/item/onion.png new file mode 100644 index 0000000..87842c5 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/item/onion.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/item/raddish.png b/src/main/resources/assets/teyvatcraft/textures/item/raddish.png new file mode 100644 index 0000000..a8680a6 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/item/raddish.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/item/rice.png b/src/main/resources/assets/teyvatcraft/textures/item/rice.png new file mode 100644 index 0000000..e2eaa6f Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/item/rice.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/item/rice_seed.png b/src/main/resources/assets/teyvatcraft/textures/item/rice_seed.png new file mode 100644 index 0000000..f3961f8 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/item/rice_seed.png differ diff --git a/src/main/resources/assets/teyvatcraft/textures/item/tomato.png b/src/main/resources/assets/teyvatcraft/textures/item/tomato.png new file mode 100644 index 0000000..7f43ee6 Binary files /dev/null and b/src/main/resources/assets/teyvatcraft/textures/item/tomato.png differ diff --git a/src/main/resources/data/teyvatcraft/loot_tables/blocks/cabbage.json b/src/main/resources/data/teyvatcraft/loot_tables/blocks/cabbage.json new file mode 100644 index 0000000..568f0e1 --- /dev/null +++ b/src/main/resources/data/teyvatcraft/loot_tables/blocks/cabbage.json @@ -0,0 +1,48 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "name": "teyvatcraft:cabbage" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "teyvatcraft:cabbage" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "teyvatcraft:cabbage", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/teyvatcraft/loot_tables/blocks/onion.json b/src/main/resources/data/teyvatcraft/loot_tables/blocks/onion.json new file mode 100644 index 0000000..099404b --- /dev/null +++ b/src/main/resources/data/teyvatcraft/loot_tables/blocks/onion.json @@ -0,0 +1,48 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "name": "teyvatcraft:onion" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "teyvatcraft:onion" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "teyvatcraft:onion", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/teyvatcraft/loot_tables/blocks/raddish.json b/src/main/resources/data/teyvatcraft/loot_tables/blocks/raddish.json new file mode 100644 index 0000000..863b4b9 --- /dev/null +++ b/src/main/resources/data/teyvatcraft/loot_tables/blocks/raddish.json @@ -0,0 +1,48 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "name": "teyvatcraft:raddish" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "teyvatcraft:raddish" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "teyvatcraft:raddish", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/teyvatcraft/loot_tables/blocks/rice.json b/src/main/resources/data/teyvatcraft/loot_tables/blocks/rice.json new file mode 100644 index 0000000..8c2ce08 --- /dev/null +++ b/src/main/resources/data/teyvatcraft/loot_tables/blocks/rice.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "teyvatcraft:rice", + "properties": { + "age": "7" + } + } + ], + "name": "teyvatcraft:rice" + }, + { + "type": "minecraft:item", + "name": "teyvatcraft:rice_seed" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "teyvatcraft:rice_seed" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "teyvatcraft:rice", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/teyvatcraft/loot_tables/blocks/tomato.json b/src/main/resources/data/teyvatcraft/loot_tables/blocks/tomato.json new file mode 100644 index 0000000..6560e81 --- /dev/null +++ b/src/main/resources/data/teyvatcraft/loot_tables/blocks/tomato.json @@ -0,0 +1,48 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "name": "teyvatcraft:tomato" + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "teyvatcraft:tomato" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "teyvatcraft:tomato", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file