Skip to content

Commit

Permalink
fix: actually add flower pots
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Jan 4, 2025
1 parent dfd668a commit 63c976a
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.zepalesque.redux.blockset.flower.type;

import com.mojang.datafixers.util.Pair;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.data.recipes.RecipeOutput;
import net.minecraft.data.recipes.ShapedRecipeBuilder;
Expand Down Expand Up @@ -43,7 +44,6 @@
import java.util.function.Supplier;
import java.util.function.UnaryOperator;

@SuppressWarnings("unchecked")
public abstract class BaseFlowerSet<B extends Block> extends AbstractFlowerSet implements MutableLoreGeneration<BaseFlowerSet<B>> {

public final String id, textureFolder;
Expand Down Expand Up @@ -183,6 +183,14 @@ public void flammables(FireAccessor accessor) {
if (this.flammability != null) {
accessor.callSetFlammable(this.flower().get(), flammability.getFirst(), flammability.getSecond());
}

// Do pot stuff while we're at it
FlowerPotBlock pot = (FlowerPotBlock) Blocks.FLOWER_POT;
addFlower(pot, this.flower, this.pot);
}

protected void addFlower(FlowerPotBlock base, Supplier<? extends Block> flower, Supplier<? extends Block> pot) {
base.addPlant(BuiltInRegistries.BLOCK.getKey(flower.get()), pot);
}

@Override
Expand Down

0 comments on commit 63c976a

Please sign in to comment.