Skip to content

Commit

Permalink
Potted mystical/special flowers and mushrooms
Browse files Browse the repository at this point in the history
All (small) mystical flowers, glimmering flowers, shimmering mushrooms, motif flowers, and special flowers (generating, functional, misc) can be put into a flower pot.

- defined potted versions of all mystical, glimmering, motif, and special flowers, and shimmering mushrooms
- added datagen for potted flower content (models, block states, loot tables, flower pot tag)
- added translation keys for new potted flower/mushroom blocks
- compacted color block registration logic a bit
- special flower pot plant registration logic for Forge
  • Loading branch information
TheRealWormbo committed May 5, 2024
1 parent 9adefdb commit 3cb21ff
Show file tree
Hide file tree
Showing 324 changed files with 5,974 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private static void configureXplatDatagen(FabricDataGenerator.Pack pack) {
pack.addProvider((PackOutput output) -> new BlockstateProvider(output));
pack.addProvider((PackOutput output) -> new FloatingFlowerModelProvider(output));
pack.addProvider((PackOutput output) -> new ItemModelProvider(output));
pack.addProvider((PackOutput output) -> new PottedPlantModelProvider(output));
pack.addProvider(AdvancementProvider::create);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.ComposterBlock;
import net.minecraft.world.level.block.FlowerPotBlock;
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
Expand Down Expand Up @@ -148,6 +149,11 @@ public void commonSetup(FMLCommonSetupEvent evt) {
registerEvents();

evt.enqueueWork(BotaniaBlocks::addDispenserBehaviours);
evt.enqueueWork(() -> {
BiConsumer<ResourceLocation, Supplier<? extends Block>> consumer = (resourceLocation, blockSupplier) -> ((FlowerPotBlock) Blocks.FLOWER_POT).addPlant(resourceLocation, blockSupplier);
BotaniaBlocks.registerFlowerPotPlants(consumer);
BotaniaFlowerBlocks.registerFlowerPotPlants(consumer);
});
BotaniaBlocks.addAxeStripping();
PaintableData.init();
CompostingData.init((itemLike, chance) -> ComposterBlock.COMPOSTABLES.putIfAbsent(itemLike.asItem(), (float) chance));
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3cb21ff

Please sign in to comment.