diff --git a/src/main/java/com/minelittlepony/unicopia/block/FruitBearingBlock.java b/src/main/java/com/minelittlepony/unicopia/block/FruitBearingBlock.java index 34236f23..7dcb29c1 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/FruitBearingBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/FruitBearingBlock.java @@ -8,6 +8,7 @@ import org.jetbrains.annotations.Nullable; import com.minelittlepony.unicopia.USounds; import com.minelittlepony.unicopia.ability.EarthPonyKickAbility.Buckable; +import net.fabricmc.fabric.api.registry.FlammableBlockRegistry; import net.minecraft.block.*; import net.minecraft.item.ItemStack; import net.minecraft.server.world.ServerWorld; @@ -46,6 +47,7 @@ public class FruitBearingBlock extends LeavesBlock implements TintedBlock, Bucka this.fruit = fruit; this.rottenFruitSupplier = rottenFruitSupplier; REGISTRY.add(this); + FlammableBlockRegistry.getDefaultInstance().add(this, 30, 60); } @Override @@ -63,7 +65,7 @@ public class FruitBearingBlock extends LeavesBlock implements TintedBlock, Bucka public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { super.randomTick(state, world, pos, random); - if (shouldDecay(state)) { + if (shouldDecay(state) || state.get(PERSISTENT)) { return; } diff --git a/src/main/java/com/minelittlepony/unicopia/block/FruitBlock.java b/src/main/java/com/minelittlepony/unicopia/block/FruitBlock.java index ff690c5e..d3992b56 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/FruitBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/FruitBlock.java @@ -4,6 +4,7 @@ import java.util.List; import com.minelittlepony.unicopia.ability.EarthPonyKickAbility.Buckable; +import net.fabricmc.fabric.api.registry.FlammableBlockRegistry; import net.minecraft.block.*; import net.minecraft.item.ItemStack; import net.minecraft.server.world.ServerWorld; @@ -29,10 +30,18 @@ public class FruitBlock extends Block implements Buckable { } public FruitBlock(Settings settings, Direction attachmentFace, Block stem, VoxelShape shape) { + this(settings, attachmentFace, stem, shape, true); + } + + public FruitBlock(Settings settings, Direction attachmentFace, Block stem, VoxelShape shape, boolean flammable) { super(settings.nonOpaque().suffocates(UBlocks::never).blockVision(UBlocks::never)); this.attachmentFace = attachmentFace; this.stem = stem; this.shape = shape; + + if (flammable) { + FlammableBlockRegistry.getDefaultInstance().add(this, 20, 50); + } } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java index b2cb7f61..b1d90a9d 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java +++ b/src/main/java/com/minelittlepony/unicopia/block/UBlocks.java @@ -8,7 +8,6 @@ import com.minelittlepony.unicopia.item.UItems; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricMaterialBuilder; -import net.fabricmc.fabric.api.registry.FlammableBlockRegistry; import net.fabricmc.fabric.api.registry.StrippableBlockRegistry; import net.minecraft.block.*; import net.minecraft.entity.EntityType; @@ -40,8 +39,8 @@ public interface UBlocks { Block STRIPPED_ZAP_WOOD = register("stripped_zap_wood", new ZapAppleLogBlock(Blocks.STRIPPED_OAK_WOOD, MapColor.GRAY, MapColor.GRAY), ItemGroup.MATERIALS); Block ZAP_LEAVES = register("zap_leaves", new ZapAppleLeavesBlock(), ItemGroup.DECORATIONS); - Block ZAP_BULB = register("zap_bulb", new FruitBlock(FabricBlockSettings.of(Material.GOURD, MapColor.GRAY).strength(500, 1200).sounds(BlockSoundGroup.AZALEA_LEAVES), Direction.DOWN, ZAP_LEAVES, FruitBlock.DEFAULT_SHAPE)); - Block ZAP_APPLE = register("zap_apple", new FruitBlock(FabricBlockSettings.of(Material.GOURD, MapColor.GRAY).sounds(BlockSoundGroup.AZALEA_LEAVES), Direction.DOWN, ZAP_LEAVES, FruitBlock.DEFAULT_SHAPE)); + Block ZAP_BULB = register("zap_bulb", new FruitBlock(FabricBlockSettings.of(Material.GOURD, MapColor.GRAY).strength(500, 1200).sounds(BlockSoundGroup.AZALEA_LEAVES), Direction.DOWN, ZAP_LEAVES, FruitBlock.DEFAULT_SHAPE, false)); + Block ZAP_APPLE = register("zap_apple", new FruitBlock(FabricBlockSettings.of(Material.GOURD, MapColor.GRAY).sounds(BlockSoundGroup.AZALEA_LEAVES), Direction.DOWN, ZAP_LEAVES, FruitBlock.DEFAULT_SHAPE, false)); Block GREEN_APPLE_LEAVES = register("green_apple_leaves", new FruitBearingBlock(FabricBlockSettings.copy(Blocks.OAK_LEAVES), 0xE5FFFF88, @@ -51,6 +50,14 @@ public interface UBlocks { Block GREEN_APPLE = register("green_apple", new FruitBlock(FabricBlockSettings.of(Material.GOURD, MapColor.GREEN).sounds(BlockSoundGroup.WOOD), Direction.DOWN, GREEN_APPLE_LEAVES, FruitBlock.DEFAULT_SHAPE)); Block GREEN_APPLE_SPROUT = register("green_apple_sprout", new SproutBlock(0xE5FFFF88, () -> UItems.GREEN_APPLE_SEEDS, () -> UTreeGen.GREEN_APPLE_TREE.sapling().map(Block::getDefaultState).get())); + Block SWEET_APPLE_LEAVES = register("sweet_apple_leaves", new FruitBearingBlock(FabricBlockSettings.copy(Blocks.OAK_LEAVES), + 0xE5FFCC88, + () -> UBlocks.SWEET_APPLE, + () -> UItems.SWEET_APPLE.getDefaultStack() + ), ItemGroup.DECORATIONS); + Block SWEET_APPLE = register("sweet_apple", new FruitBlock(FabricBlockSettings.of(Material.GOURD, MapColor.GREEN).sounds(BlockSoundGroup.WOOD), Direction.DOWN, SWEET_APPLE_LEAVES, FruitBlock.DEFAULT_SHAPE)); + Block SWEET_APPLE_SPROUT = register("sweet_apple_sprout", new SproutBlock(0xE5FFCC88, () -> UItems.SWEET_APPLE_SEEDS, () -> UTreeGen.SWEET_APPLE_TREE.sapling().map(Block::getDefaultState).get())); + static T register(String name, T item) { return register(Unicopia.id(name), item); } @@ -77,8 +84,6 @@ public interface UBlocks { static void bootstrap() { StrippableBlockRegistry.register(ZAP_LOG, STRIPPED_ZAP_LOG); StrippableBlockRegistry.register(ZAP_WOOD, STRIPPED_ZAP_WOOD); - FlammableBlockRegistry.getDefaultInstance().add(GREEN_APPLE_LEAVES, 30, 60); - FlammableBlockRegistry.getDefaultInstance().add(GREEN_APPLE, 20, 50); } static boolean never(BlockState state, BlockView world, BlockPos pos) { diff --git a/src/main/java/com/minelittlepony/unicopia/block/UTreeGen.java b/src/main/java/com/minelittlepony/unicopia/block/UTreeGen.java index 18ae4002..99cdba17 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/UTreeGen.java +++ b/src/main/java/com/minelittlepony/unicopia/block/UTreeGen.java @@ -32,6 +32,7 @@ public interface UTreeGen { .count(0, 0.01F, 1) .build(); Tree GREEN_APPLE_TREE = createAppleTree("green_apple", UBlocks.GREEN_APPLE_LEAVES); + Tree SWEET_APPLE_TREE = createAppleTree("sweet_apple", UBlocks.SWEET_APPLE_LEAVES); static Tree createAppleTree(String name, Block leaves) { return Tree.Builder.create(Unicopia.id(name + "_tree"), diff --git a/src/main/java/com/minelittlepony/unicopia/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java index 096dcb25..12fcec61 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -80,6 +80,7 @@ public interface UItems { Item ROCK_STEW = register("rock_stew", new Item(new Item.Settings().group(ItemGroup.FOOD).food(FoodComponents.MUSHROOM_STEW))); Item GREEN_APPLE_SEEDS = register("green_apple_seeds", new AliasedBlockItem(UBlocks.GREEN_APPLE_SPROUT, new Item.Settings().group(ItemGroup.MATERIALS))); + Item SWEET_APPLE_SEEDS = register("sweet_apple_seeds", new AliasedBlockItem(UBlocks.SWEET_APPLE_SPROUT, new Item.Settings().group(ItemGroup.MATERIALS))); Item MUG = register("mug", new Item(new Settings().group(ItemGroup.MATERIALS).maxCount(16))); Item CIDER = register("cider", new DrinkableItem(new Item.Settings().group(ItemGroup.FOOD).food(UFoodComponents.CIDER).maxCount(1).recipeRemainder(MUG))); diff --git a/src/main/resources/assets/unicopia/blockstates/green_apple_sprout.json b/src/main/resources/assets/unicopia/blockstates/green_apple_sprout.json index 7f3b2549..f88ff7ea 100644 --- a/src/main/resources/assets/unicopia/blockstates/green_apple_sprout.json +++ b/src/main/resources/assets/unicopia/blockstates/green_apple_sprout.json @@ -1,28 +1,28 @@ { "variants": { "age=0": { - "model": "unicopia:block/green_apple_sprout_stage0" + "model": "unicopia:block/apple_sprout_stage0" }, "age=1": { - "model": "unicopia:block/green_apple_sprout_stage1" + "model": "unicopia:block/apple_sprout_stage1" }, "age=2": { - "model": "unicopia:block/green_apple_sprout_stage2" + "model": "unicopia:block/apple_sprout_stage2" }, "age=3": { - "model": "unicopia:block/green_apple_sprout_stage3" + "model": "unicopia:block/apple_sprout_stage3" }, "age=4": { - "model": "unicopia:block/green_apple_sprout_stage4" + "model": "unicopia:block/apple_sprout_stage4" }, "age=5": { - "model": "unicopia:block/green_apple_sprout_stage5" + "model": "unicopia:block/apple_sprout_stage5" }, "age=6": { - "model": "unicopia:block/green_apple_sprout_stage6" + "model": "unicopia:block/apple_sprout_stage6" }, "age=7": { - "model": "unicopia:block/green_apple_sprout_stage7" + "model": "unicopia:block/apple_sprout_stage7" } } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/blockstates/sweet_apple.json b/src/main/resources/assets/unicopia/blockstates/sweet_apple.json new file mode 100644 index 00000000..9438a847 --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/sweet_apple.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "unicopia:block/sweet_apple" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/blockstates/sweet_apple_leaves.json b/src/main/resources/assets/unicopia/blockstates/sweet_apple_leaves.json new file mode 100644 index 00000000..c6e7da22 --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/sweet_apple_leaves.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "unicopia:block/sweet_apple_leaves" + } + } +} diff --git a/src/main/resources/assets/unicopia/blockstates/sweet_apple_sapling.json b/src/main/resources/assets/unicopia/blockstates/sweet_apple_sapling.json new file mode 100644 index 00000000..ab178dc2 --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/sweet_apple_sapling.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "unicopia:block/sweet_apple_sapling" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/blockstates/sweet_apple_sprout.json b/src/main/resources/assets/unicopia/blockstates/sweet_apple_sprout.json new file mode 100644 index 00000000..f88ff7ea --- /dev/null +++ b/src/main/resources/assets/unicopia/blockstates/sweet_apple_sprout.json @@ -0,0 +1,28 @@ +{ + "variants": { + "age=0": { + "model": "unicopia:block/apple_sprout_stage0" + }, + "age=1": { + "model": "unicopia:block/apple_sprout_stage1" + }, + "age=2": { + "model": "unicopia:block/apple_sprout_stage2" + }, + "age=3": { + "model": "unicopia:block/apple_sprout_stage3" + }, + "age=4": { + "model": "unicopia:block/apple_sprout_stage4" + }, + "age=5": { + "model": "unicopia:block/apple_sprout_stage5" + }, + "age=6": { + "model": "unicopia:block/apple_sprout_stage6" + }, + "age=7": { + "model": "unicopia:block/apple_sprout_stage7" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index d78689e3..d46a8859 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -58,6 +58,7 @@ "item.unicopia.weird_rock": "Weird Rock", "item.unicopia.rock_stew": "Rock Stew", "item.unicopia.green_apple_seeds": "Granny Smith Apple Seeds", + "item.unicopia.sweet_apple_seeds": "Sweet Apple Seeds", "item.unicopia.daffodil_daisy_sandwich": "Daffodil Daisy Sandwich", "item.unicopia.hay_burger": "Hay Burger", @@ -97,9 +98,13 @@ "block.unicopia.zap_leaves": "Zap Apple Leaves", "block.unicopia.zap_apple": "Zap Apple", "block.unicopia.zap_bulb": "Unripened Zap Apple", + "block.unicopia.green_apple_leaves": "Granny Smith Leaves", "block.unicopia.green_apple_sapling": "Granny Smith Sapling", "block.unicopia.green_apple_sprout": "Granny Smith Sprout", + "block.unicopia.sweet_apple_leaves": "Sweet Apple Leaves", + "block.unicopia.sweet_apple_sapling": "Sweet Apple Sapling", + "block.unicopia.sweet_apple_sprout": "Sweet Apple Sprout", "entity.unicopia.butterfly": "Butterfly", "entity.unicopia.twittermite": "Twittermite", diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage0.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage0.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage0.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage0.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage1.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage1.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage1.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage1.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage2.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage2.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage2.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage2.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage3.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage3.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage3.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage3.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage4.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage4.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage4.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage4.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage5.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage5.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage5.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage5.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage6.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage6.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage6.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage6.json diff --git a/src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage7.json b/src/main/resources/assets/unicopia/models/block/apple_sprout_stage7.json similarity index 100% rename from src/main/resources/assets/unicopia/models/block/green_apple_sprout_stage7.json rename to src/main/resources/assets/unicopia/models/block/apple_sprout_stage7.json diff --git a/src/main/resources/assets/unicopia/models/block/sweet_apple.json b/src/main/resources/assets/unicopia/models/block/sweet_apple.json new file mode 100644 index 00000000..fb677dfa --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/sweet_apple.json @@ -0,0 +1,6 @@ +{ + "parent": "unicopia:block/fruit", + "textures": { + "cross": "unicopia:item/sweet_apple" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/sweet_apple_leaves.json b/src/main/resources/assets/unicopia/models/block/sweet_apple_leaves.json new file mode 100644 index 00000000..fbf5020c --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/sweet_apple_leaves.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/leaves", + "textures": { + "all": "unicopia:block/sweet_apple_leaves" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/block/sweet_apple_sapling.json b/src/main/resources/assets/unicopia/models/block/sweet_apple_sapling.json new file mode 100644 index 00000000..2193d3a2 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/block/sweet_apple_sapling.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "unicopia:item/sweet_apple_sapling" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/item/sweet_apple_leaves.json b/src/main/resources/assets/unicopia/models/item/sweet_apple_leaves.json new file mode 100644 index 00000000..0892ce32 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/item/sweet_apple_leaves.json @@ -0,0 +1,3 @@ +{ + "parent": "unicopia:block/sweet_apple_leaves" +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/models/item/sweet_apple_sapling.json b/src/main/resources/assets/unicopia/models/item/sweet_apple_sapling.json new file mode 100644 index 00000000..824db059 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/item/sweet_apple_sapling.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "unicopia:item/sweet_apple_sapling" + } +} diff --git a/src/main/resources/assets/unicopia/models/item/sweet_apple_seeds.json b/src/main/resources/assets/unicopia/models/item/sweet_apple_seeds.json new file mode 100644 index 00000000..cdbcc586 --- /dev/null +++ b/src/main/resources/assets/unicopia/models/item/sweet_apple_seeds.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "unicopia:item/sweet_apple_seeds" + } +} diff --git a/src/main/resources/assets/unicopia/textures/block/sweet_apple_leaves.png b/src/main/resources/assets/unicopia/textures/block/sweet_apple_leaves.png new file mode 100644 index 00000000..2f7822b4 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/block/sweet_apple_leaves.png differ diff --git a/src/main/resources/assets/unicopia/textures/item/sweet_apple_sapling.png b/src/main/resources/assets/unicopia/textures/item/sweet_apple_sapling.png new file mode 100644 index 00000000..e0486c65 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/item/sweet_apple_sapling.png differ diff --git a/src/main/resources/assets/unicopia/textures/item/sweet_apple_seeds.png b/src/main/resources/assets/unicopia/textures/item/sweet_apple_seeds.png new file mode 100644 index 00000000..3b846ff4 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/item/sweet_apple_seeds.png differ diff --git a/src/main/resources/data/minecraft/tags/blocks/leaves.json b/src/main/resources/data/minecraft/tags/blocks/leaves.json index 154300bb..1bc14183 100644 --- a/src/main/resources/data/minecraft/tags/blocks/leaves.json +++ b/src/main/resources/data/minecraft/tags/blocks/leaves.json @@ -2,6 +2,7 @@ "replace": false, "values": [ "unicopia:zap_leaves", - "unicopia:green_apple_leaves" + "unicopia:green_apple_leaves", + "unicopia:sweet_apple_leaves" ] } diff --git a/src/main/resources/data/minecraft/tags/items/leaves.json b/src/main/resources/data/minecraft/tags/items/leaves.json index 154300bb..1bc14183 100644 --- a/src/main/resources/data/minecraft/tags/items/leaves.json +++ b/src/main/resources/data/minecraft/tags/items/leaves.json @@ -2,6 +2,7 @@ "replace": false, "values": [ "unicopia:zap_leaves", - "unicopia:green_apple_leaves" + "unicopia:green_apple_leaves", + "unicopia:sweet_apple_leaves" ] } diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple.json b/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple.json new file mode 100644 index 00000000..b8ed57c5 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:sweet_apple" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple_leaves.json b/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple_leaves.json new file mode 100644 index 00000000..551be586 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple_leaves.json @@ -0,0 +1,116 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:alternative", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": [ + "minecraft:shears" + ] + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ] + } + ], + "name": "unicopia:sweet_apple_leaves" + } + ] + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:alternative", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": [ + "minecraft:shears" + ] + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ] + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "chances": [ + 0.02, + 0.022222223, + 0.025, + 0.033333335, + 0.1 + ], + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune" + } + ], + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:stick" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple_sapling.json b/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple_sapling.json new file mode 100644 index 00000000..7e34d5f6 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/sweet_apple_sapling.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:sweet_apple_sapling" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/recipes/sweet_apple_to_seeds.json b/src/main/resources/data/unicopia/recipes/sweet_apple_to_seeds.json new file mode 100644 index 00000000..efdbcc70 --- /dev/null +++ b/src/main/resources/data/unicopia/recipes/sweet_apple_to_seeds.json @@ -0,0 +1,7 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "unicopia:sweet_apple" } + ], + "result": { "item": "unicopia:sweet_apple_seeds", "count": 3 } +} diff --git a/src/main/resources/data/unicopia/tree_types/sweet_apple.json b/src/main/resources/data/unicopia/tree_types/sweet_apple.json new file mode 100644 index 00000000..e133a32c --- /dev/null +++ b/src/main/resources/data/unicopia/tree_types/sweet_apple.json @@ -0,0 +1,6 @@ +{ + "logs": [ "minecraft:oak_log", "minecraft:oak_wood" ], + "leaves": [ "unicopia:sweet_apple_leaves" ], + "wideTrunk": false, + "drops": [] +} \ No newline at end of file