Lemonwood Trees

This commit is contained in:
Vos
2025-11-16 14:56:47 -06:00
parent a6387857e1
commit 2fea23b35d
61 changed files with 926 additions and 28 deletions
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "acesbs:block/lemonwood_leaves"
}
}
}
@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "acesbs:block/lemonwood_log_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "acesbs:block/lemonwood_log"
},
"axis=z": {
"model": "acesbs:block/lemonwood_log_horizontal",
"x": 90
}
}
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "acesbs:block/lemonwood_sapling"
}
}
}
@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "acesbs:block/lemonwood_wood",
"x": 90,
"y": 90
},
"axis=y": {
"model": "acesbs:block/lemonwood_wood"
},
"axis=z": {
"model": "acesbs:block/lemonwood_wood",
"x": 90
}
}
}
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "acesbs:block/potted_lemonwood_sapling"
}
}
}
@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "acesbs:block/stripped_lemonwood_log_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "acesbs:block/stripped_lemonwood_log"
},
"axis=z": {
"model": "acesbs:block/stripped_lemonwood_log_horizontal",
"x": 90
}
}
}
@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "acesbs:block/stripped_lemonwood_wood",
"x": 90,
"y": 90
},
"axis=y": {
"model": "acesbs:block/stripped_lemonwood_wood"
},
"axis=z": {
"model": "acesbs:block/stripped_lemonwood_wood",
"x": 90
}
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/leaves",
"textures": {
"all": "acesbs:block/lemonwood_leaves"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "acesbs:block/lemonwood_log_top",
"side": "acesbs:block/lemonwood_log"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "acesbs:block/lemonwood_log_top",
"side": "acesbs:block/lemonwood_log"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "acesbs:block/lemonwood_sapling"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "acesbs:block/lemonwood_log",
"side": "acesbs:block/lemonwood_log"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/flower_pot_cross",
"textures": {
"plant": "acesbs:block/lemonwood_sapling"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "acesbs:block/stripped_lemonwood_log_top",
"side": "acesbs:block/stripped_lemonwood_log"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "acesbs:block/stripped_lemonwood_log_top",
"side": "acesbs:block/stripped_lemonwood_log"
}
}
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "acesbs:block/stripped_lemonwood_log",
"side": "acesbs:block/stripped_lemonwood_log"
}
}
@@ -0,0 +1,3 @@
{
"parent": "acesbs:block/lemonwood_leaves"
}
@@ -0,0 +1,3 @@
{
"parent": "acesbs:block/lemonwood_log"
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "acesbs:block/lemonwood_sapling"
}
}
@@ -0,0 +1,3 @@
{
"parent": "acesbs:block/lemonwood_wood"
}
@@ -0,0 +1,3 @@
{
"parent": "acesbs:block/potted_lemonwood_sapling"
}
@@ -0,0 +1,3 @@
{
"parent": "acesbs:block/stripped_lemonwood_log"
}
@@ -0,0 +1,3 @@
{
"parent": "acesbs:block/stripped_lemonwood_wood"
}
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_lemonwood_log": {
"conditions": {
"items": [
{
"items": "acesbs:lemonwood_log"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:lemonwood_planks_from_lemonwood_log"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_lemonwood_log"
]
],
"rewards": {
"recipes": [
"acesbs:lemonwood_planks_from_lemonwood_log"
]
}
}
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_lemonwood_wood": {
"conditions": {
"items": [
{
"items": "acesbs:lemonwood_wood"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:lemonwood_planks_from_lemonwood_wood"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_lemonwood_wood"
]
],
"rewards": {
"recipes": [
"acesbs:lemonwood_planks_from_lemonwood_wood"
]
}
}
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_stripped_lemonwood_log": {
"conditions": {
"items": [
{
"items": "acesbs:stripped_lemonwood_log"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:lemonwood_planks_from_stripped_lemonwood_log"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_stripped_lemonwood_log"
]
],
"rewards": {
"recipes": [
"acesbs:lemonwood_planks_from_stripped_lemonwood_log"
]
}
}
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_stripped_lemonwood_wood": {
"conditions": {
"items": [
{
"items": "acesbs:stripped_lemonwood_wood"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:lemonwood_planks_from_stripped_lemonwood_wood"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_stripped_lemonwood_wood"
]
],
"rewards": {
"recipes": [
"acesbs:lemonwood_planks_from_stripped_lemonwood_wood"
]
}
}
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_lemonwood_log": {
"conditions": {
"items": [
{
"items": "acesbs:lemonwood_log"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:lemonwood_wood"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_lemonwood_log"
]
],
"rewards": {
"recipes": [
"acesbs:lemonwood_wood"
]
}
}
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_stripped_lemonwood_log": {
"conditions": {
"items": [
{
"items": "acesbs:stripped_lemonwood_log"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:stripped_lemonwood_wood"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_stripped_lemonwood_log"
]
],
"rewards": {
"recipes": [
"acesbs:stripped_lemonwood_wood"
]
}
}
@@ -13,7 +13,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "acesbs:lemonwood_planks"
"recipe": "acesbs:lemonwood_sapling"
},
"trigger": "minecraft:recipe_unlocked"
}
@@ -26,7 +26,7 @@
],
"rewards": {
"recipes": [
"acesbs:lemonwood_planks"
"acesbs:lemonwood_sapling"
]
}
}
@@ -0,0 +1,132 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "minecraft:shears"
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
}
],
"name": "acesbs:lemonwood_leaves"
},
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:survives_explosion"
},
{
"chances": [
0.0625
],
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune"
}
],
"name": "acesbs:lemonwood_sapling"
}
]
}
],
"rolls": 1.0
},
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "minecraft:shears"
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "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
}
]
}
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "acesbs:lemonwood_log"
}
],
"rolls": 1.0
}
]
}
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "acesbs:lemonwood_sapling"
}
],
"rolls": 1.0
}
]
}
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "acesbs:lemonwood_wood"
}
],
"rolls": 1.0
}
]
}
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "acesbs:stripped_lemonwood_log"
}
],
"rolls": 1.0
}
]
}
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "acesbs:stripped_lemonwood_wood"
}
],
"rolls": 1.0
}
]
}
@@ -1,25 +0,0 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "minecraft:birch_planks"
},
{
"item": "minecraft:birch_planks"
},
{
"item": "minecraft:birch_planks"
},
{
"item": "minecraft:birch_planks"
},
{
"item": "acesbs:lemon"
}
],
"result": {
"count": 4,
"id": "acesbs:lemonwood_planks"
}
}
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "acesbs:lemonwood_log"
}
],
"result": {
"count": 4,
"id": "acesbs:lemonwood_planks"
}
}
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "acesbs:lemonwood_wood"
}
],
"result": {
"count": 4,
"id": "acesbs:lemonwood_planks"
}
}
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "acesbs:stripped_lemonwood_log"
}
],
"result": {
"count": 4,
"id": "acesbs:lemonwood_planks"
}
}
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "acesbs:stripped_lemonwood_wood"
}
],
"result": {
"count": 4,
"id": "acesbs:lemonwood_planks"
}
}
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "minecraft:birch_sapling"
},
{
"item": "acesbs:lemon"
}
],
"result": {
"count": 1,
"id": "acesbs:lemonwood_sapling"
}
}
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "acesbs:lemonwood_log"
}
},
"pattern": [
"## ",
"## ",
" "
],
"result": {
"count": 3,
"id": "acesbs:lemonwood_wood"
}
}
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "acesbs:stripped_lemonwood_log"
}
},
"pattern": [
"## ",
"## ",
" "
],
"result": {
"count": 3,
"id": "acesbs:stripped_lemonwood_wood"
}
}
@@ -0,0 +1,87 @@
{
"type": "minecraft:tree",
"config": {
"decorators": [],
"dirt_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:dirt"
}
},
"foliage_placer": {
"type": "minecraft:cherry_foliage_placer",
"corner_hole_chance": 0.25,
"hanging_leaves_chance": 0.16666667,
"hanging_leaves_extension_chance": 0.33333334,
"height": 5,
"offset": 0,
"radius": 4,
"wide_bottom_layer_hole_chance": 0.25
},
"foliage_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "acesbs:lemonwood_leaves",
"Properties": {
"distance": "7",
"persistent": "false",
"waterlogged": "false"
}
}
},
"force_dirt": false,
"ignore_vines": false,
"minimum_size": {
"type": "minecraft:two_layers_feature_size",
"limit": 1,
"lower_size": 0,
"upper_size": 2
},
"trunk_placer": {
"type": "minecraft:cherry_trunk_placer",
"base_height": 7,
"branch_count": {
"type": "minecraft:weighted_list",
"distribution": [
{
"data": 1,
"weight": 1
},
{
"data": 2,
"weight": 1
},
{
"data": 3,
"weight": 1
}
]
},
"branch_end_offset_from_top": {
"type": "minecraft:uniform",
"max_inclusive": 0,
"min_inclusive": -1
},
"branch_horizontal_length": {
"type": "minecraft:uniform",
"max_inclusive": 4,
"min_inclusive": 2
},
"branch_start_offset_from_top": {
"max_inclusive": -3,
"min_inclusive": -4
},
"height_rand_a": 1,
"height_rand_b": 0
},
"trunk_provider": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "acesbs:lemonwood_log",
"Properties": {
"axis": "y"
}
}
}
}
}
@@ -0,0 +1,8 @@
{
"values": [
"acesbs:lemonwood_log",
"acesbs:lemonwood_wood",
"acesbs:stripped_lemonwood_log",
"acesbs:stripped_lemonwood_wood"
]
}
@@ -0,0 +1,8 @@
{
"values": [
"acesbs:lemonwood_log",
"acesbs:lemonwood_wood",
"acesbs:stripped_lemonwood_log",
"acesbs:stripped_lemonwood_wood"
]
}
@@ -0,0 +1,5 @@
{
"values": [
"acesbs:lemonwood_planks"
]
}
@@ -17,6 +17,9 @@ import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
import net.fabricmc.fabric.api.registry.FabricBrewingRecipeRegistryBuilder;
import net.fabricmc.fabric.api.registry.FlammableBlockRegistry;
import net.fabricmc.fabric.api.registry.StrippableBlockRegistry;
import net.minecraft.block.FireBlock;
import net.minecraft.item.Items;
import net.minecraft.potion.Potions;
import org.slf4j.Logger;
@@ -60,5 +63,19 @@ public class AcesBS implements ModInitializer {
// CompostingChanceRegistry.INSTANCE.add(ModItems.TOBACCO);
CompostingChanceRegistry.INSTANCE.add(ModItems.TOBACCO_SEEDS, 0.5f);
StrippableBlockRegistry.register(ModBlocks.LEMONWOOD_LOG, ModBlocks.STRIPPED_LEMONWOOD_LOG);
StrippableBlockRegistry.register(ModBlocks.LEMONWOOD_WOOD, ModBlocks.STRIPPED_LEMONWOOD_WOOD);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.LEMONWOOD_LOG, 5, 5);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.LEMONWOOD_WOOD, 5, 5);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.STRIPPED_LEMONWOOD_LOG, 5, 5);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.STRIPPED_LEMONWOOD_WOOD, 5, 5);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.LEMONWOOD_PLANKS, 5, 20);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.LEMONWOOD_SLAB, 5, 20);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.LEMONWOOD_STAIRS, 5, 20);
FlammableBlockRegistry.getDefaultInstance().add(ModBlocks.LEMONWOOD_LEAVES, 30, 60);
}
}
@@ -12,6 +12,8 @@ public class AcesBSClient implements ClientModInitializer {
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.LEMONWOOD_DOOR, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.LEMONWOOD_TRAPDOOR, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.TOBACCO_CROP, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.LEMONWOOD_SAPLING, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.POTTED_LEMONWOOD_SAPLING, RenderLayer.getCutout());
ModModelPredicates.registerModelPredicates();
}
@@ -6,6 +6,7 @@ import com.acethewildfire.acesbs.block.custom.EvilBlock;
import com.acethewildfire.acesbs.block.custom.StableEntropyBlock;
import com.acethewildfire.acesbs.block.custom.TobaccoCrop;
import com.acethewildfire.acesbs.sounds.ModSounds;
import com.acethewildfire.acesbs.world.tree.ModBlockSaplingGenerator;
import net.minecraft.block.*;
import net.minecraft.block.enums.NoteBlockInstrument;
import net.minecraft.block.piston.PistonBehavior;
@@ -30,6 +31,8 @@ import org.jetbrains.annotations.Nullable;
import java.util.function.ToIntFunction;
import static net.minecraft.block.Blocks.createFlowerPotBlock;
public class ModBlocks {
public static final Block ENTROPY_BLOCK = registerBlock("entropy_block",
@@ -81,6 +84,22 @@ public class ModBlocks {
.requiresTool()
.sounds(BlockSoundGroup.LODESTONE)));
public static final Block LEMONWOOD_LOG = registerBlock("lemonwood_log",
new PillarBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_LOG)));
public static final Block LEMONWOOD_WOOD = registerBlock("lemonwood_wood",
new PillarBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_WOOD).mapColor(MapColor.PALE_YELLOW)));
public static final Block STRIPPED_LEMONWOOD_LOG = registerBlock("stripped_lemonwood_log",
new PillarBlock(AbstractBlock.Settings.copy(Blocks.STRIPPED_BIRCH_LOG)));
public static final Block STRIPPED_LEMONWOOD_WOOD = registerBlock("stripped_lemonwood_wood",
new PillarBlock(AbstractBlock.Settings.copy(Blocks.STRIPPED_BIRCH_WOOD).mapColor(MapColor.PALE_YELLOW)));
public static final Block LEMONWOOD_LEAVES = registerBlock("lemonwood_leaves",
new LeavesBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_LEAVES)));
public static final Block LEMONWOOD_SAPLING = registerBlock("lemonwood_sapling",
new SaplingBlock(ModBlockSaplingGenerator.LEMONWOOD, AbstractBlock.Settings.copy(Blocks.BIRCH_SAPLING)));
public static final Block POTTED_LEMONWOOD_SAPLING = registerBlock("potted_lemonwood_sapling", createFlowerPotBlock(LEMONWOOD_SAPLING));
public static final Block LEMONWOOD_PLANKS = registerBlock("lemonwood_planks",
new Block(
AbstractBlock.Settings.create()
@@ -91,6 +110,7 @@ public class ModBlocks {
.burnable()
));
public static final Block LEMONWOOD_STAIRS = registerBlock("lemonwood_stairs",
new StairsBlock(ModBlocks.LEMONWOOD_PLANKS.getDefaultState(),
AbstractBlock.Settings.create()
@@ -47,5 +47,10 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
getOrCreateTagBuilder(ModTags.Blocks.NEEDS_PRISMA_STEEL_TOOL);
// Currently Broken
// .addTag(BlockTags.NEEDS_IRON_TOOL);
getOrCreateTagBuilder(BlockTags.LOGS_THAT_BURN)
.add(ModBlocks.LEMONWOOD_LOG)
.add(ModBlocks.LEMONWOOD_WOOD)
.add(ModBlocks.STRIPPED_LEMONWOOD_LOG)
.add(ModBlocks.STRIPPED_LEMONWOOD_WOOD);
}
}
@@ -1,11 +1,13 @@
package com.acethewildfire.acesbs.datagen;
import com.acethewildfire.acesbs.block.ModBlocks;
import com.acethewildfire.acesbs.item.ModItems;
import com.acethewildfire.acesbs.util.ModTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.item.Items;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.registry.tag.ItemTags;
import java.util.concurrent.CompletableFuture;
@@ -51,6 +53,12 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
.add(ModItems.PRISMA_SMITHING_TEMPLATE);
getOrCreateTagBuilder(ItemTags.CREEPER_DROP_MUSIC_DISCS)
.add(ModItems.CRAB_RAVE_MUSIC_DISC);
getOrCreateTagBuilder(ItemTags.LOGS_THAT_BURN)
.add(ModBlocks.LEMONWOOD_LOG.asItem())
.add(ModBlocks.LEMONWOOD_WOOD.asItem())
.add(ModBlocks.STRIPPED_LEMONWOOD_LOG.asItem())
.add(ModBlocks.STRIPPED_LEMONWOOD_WOOD.asItem());
getOrCreateTagBuilder(ItemTags.PLANKS)
.add(ModBlocks.LEMONWOOD_PLANKS.asItem());
}
}
@@ -58,6 +58,14 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider {
addDrop(ModBlocks.STABLE_ENTROPY_BLOCK);
addDrop(ModBlocks.PRISMA_STEEL_BLOCK);
addDrop(ModBlocks.LEMONWOOD_LOG);
addDrop(ModBlocks.STRIPPED_LEMONWOOD_LOG);
addDrop(ModBlocks.LEMONWOOD_WOOD);
addDrop(ModBlocks.STRIPPED_LEMONWOOD_WOOD);
addDrop(ModBlocks.LEMONWOOD_SAPLING);
addDrop(ModBlocks.LEMONWOOD_LEAVES, leavesDrops(ModBlocks.LEMONWOOD_LEAVES, ModBlocks.LEMONWOOD_SAPLING, 0.0625f));
addDrop(ModBlocks.LEMONWOOD_PLANKS);
addDrop(ModBlocks.LEMONWOOD_STAIRS);
addDrop(ModBlocks.LEMONWOOD_SLAB, slabDrops(ModBlocks.LEMONWOOD_SLAB));
@@ -6,6 +6,7 @@ import com.acethewildfire.acesbs.block.custom.TobaccoCrop;
import com.acethewildfire.acesbs.item.ModItems;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.minecraft.block.Blocks;
import net.minecraft.data.client.*;
import net.minecraft.item.ArmorItem;
import net.minecraft.util.Identifier;
@@ -43,6 +44,13 @@ public class ModModelProvider extends FabricModelProvider {
lemonwoodPool.fenceGate(ModBlocks.LEMONWOOD_FENCE_GATE);
lemonwoodPool.wall(ModBlocks.LEMONWOOD_WALL);
blockStateModelGenerator.registerLog(ModBlocks.LEMONWOOD_LOG).log(ModBlocks.LEMONWOOD_LOG).wood(ModBlocks.LEMONWOOD_WOOD);
blockStateModelGenerator.registerLog(ModBlocks.STRIPPED_LEMONWOOD_LOG).log(ModBlocks.STRIPPED_LEMONWOOD_LOG).wood(ModBlocks.STRIPPED_LEMONWOOD_WOOD);
blockStateModelGenerator.registerSingleton(ModBlocks.LEMONWOOD_LEAVES, TexturedModel.LEAVES);
// blockStateModelGenerator.registerTintableCross(ModBlocks.LEMONWOOD_SAPLING, BlockStateModelGenerator.TintType.NOT_TINTED);
blockStateModelGenerator.registerFlowerPotPlant(ModBlocks.LEMONWOOD_SAPLING, ModBlocks.POTTED_LEMONWOOD_SAPLING, BlockStateModelGenerator.TintType.NOT_TINTED);
blockStateModelGenerator.registerDoor(ModBlocks.LEMONWOOD_DOOR);
blockStateModelGenerator.registerTrapdoor(ModBlocks.LEMONWOOD_TRAPDOOR);
@@ -49,6 +49,12 @@ public class ModItemGroups {
entries.add(ModBlocks.LIZARD_PLANKS);
entries.add(ModBlocks.LIZARD_BUTTON);
entries.add(ModBlocks.LEMONWOOD_LOG);
entries.add(ModBlocks.LEMONWOOD_WOOD);
entries.add(ModBlocks.STRIPPED_LEMONWOOD_LOG);
entries.add(ModBlocks.STRIPPED_LEMONWOOD_WOOD);
entries.add(ModBlocks.LEMONWOOD_SAPLING);
entries.add(ModBlocks.LEMONWOOD_LEAVES);
entries.add(ModBlocks.LEMONWOOD_PLANKS);
entries.add(ModBlocks.LEMONWOOD_STAIRS);
entries.add(ModBlocks.LEMONWOOD_SLAB);
@@ -11,7 +11,19 @@ import net.minecraft.structure.rule.BlockMatchRuleTest;
import net.minecraft.structure.rule.RuleTest;
import net.minecraft.structure.rule.TagMatchRuleTest;
import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.collection.WeightedList;
import net.minecraft.util.math.intprovider.ConstantIntProvider;
import net.minecraft.util.math.intprovider.IntProvider;
import net.minecraft.util.math.intprovider.UniformIntProvider;
import net.minecraft.util.math.intprovider.WeightedListIntProvider;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.feature.size.TwoLayersFeatureSize;
import net.minecraft.world.gen.foliage.BlobFoliagePlacer;
import net.minecraft.world.gen.foliage.CherryFoliagePlacer;
import net.minecraft.world.gen.stateprovider.BlockStateProvider;
import net.minecraft.world.gen.trunk.CherryTrunkPlacer;
import net.minecraft.world.gen.trunk.StraightTrunkPlacer;
import java.util.List;
@@ -26,6 +38,8 @@ public class ModConfiguredFeatures {
public static final RegistryKey<ConfiguredFeature<?, ?>> INFERNAL_ASHES_ORE_KEY = registerKey("infernal_ashes_ore");
public static final RegistryKey<ConfiguredFeature<?, ?>> ENDTROPY_ORE_KEY = registerKey("endtropy_ore");
public static final RegistryKey<ConfiguredFeature<?, ?>> LEMONWOOD_KEY = registerKey("lemonwood");
public static void bootstrap(Registerable<ConfiguredFeature<?, ?>> context) {
RuleTest stoneReplaceables = new TagMatchRuleTest(BlockTags.STONE_ORE_REPLACEABLES);
RuleTest deepslateReplaceables = new TagMatchRuleTest(BlockTags.DEEPSLATE_ORE_REPLACEABLES);
@@ -49,6 +63,17 @@ public class ModConfiguredFeatures {
register(context, DEEPSLATE_ENTROPY_ORE_KEY, Feature.ORE, new OreFeatureConfig(overworldDeepslateEntropyOres, 4, 0.0F));
register(context, INFERNAL_ASHES_ORE_KEY, Feature.ORE, new OreFeatureConfig(netherAshesOres, 4, 0.0F));
register(context, ENDTROPY_ORE_KEY, Feature.ORE, new OreFeatureConfig(endEndtropyOres, 4, 0.0F));
register(context, LEMONWOOD_KEY, Feature.TREE, new TreeFeatureConfig.Builder(
BlockStateProvider.of(ModBlocks.LEMONWOOD_LOG),
new CherryTrunkPlacer(7, 1, 0, new WeightedListIntProvider(new DataPool.Builder<IntProvider>().add(ConstantIntProvider.create(1), 1).add(ConstantIntProvider.create(2), 1).add(ConstantIntProvider.create(3), 1).build()), UniformIntProvider.create(2, 4), UniformIntProvider.create(-4, -3), UniformIntProvider.create(-1, 0)),
BlockStateProvider.of(ModBlocks.LEMONWOOD_LEAVES),
new CherryFoliagePlacer(ConstantIntProvider.create(4), ConstantIntProvider.create(0), ConstantIntProvider.create(5), 0.25F, 0.5F, 0.16666667F, 0.33333334F),
new TwoLayersFeatureSize(1, 0, 2)).build()
);
}
public static RegistryKey<ConfiguredFeature<?, ?>> registerKey(String name) {
@@ -0,0 +1,12 @@
package com.acethewildfire.acesbs.world.tree;
import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.world.ModConfiguredFeatures;
import net.minecraft.block.SaplingGenerator;
import java.util.Optional;
public class ModBlockSaplingGenerator {
public static final SaplingGenerator LEMONWOOD = new SaplingGenerator(AcesBS.MOD_ID + ":lemonwood",
Optional.empty(), Optional.of(ModConfiguredFeatures.LEMONWOOD_KEY), Optional.empty());
}
@@ -96,6 +96,13 @@
"block.acesbs.lizard_planks": "Lizard Planks",
"block.acesbs.lizard_button": "Lizard Button",
"block.acesbs.lemonwood_log": "Lemonwood Log",
"block.acesbs.lemonwood_wood": "Lemonwood Wood",
"block.acesbs.stripped_lemonwood_log": "Stripped Lemonwood Log",
"block.acesbs.stripped_lemonwood_wood": "Stripped Lemonwood Wood",
"block.acesbs.lemonwood_sapling": "Lemonwood Sapling",
"block.acesbs.lemonwood_leaves": "Lemonwood Leaves",
"block.acesbs.lemonwood_planks": "Lemonwood Planks",
"block.acesbs.lemonwood_stairs": "Lemonwood Stairs",
"block.acesbs.lemonwood_slab": "Lemonwood Slab",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB