From 63c976a62e3024f2cf9b27d8405f3a53b8a0c47f Mon Sep 17 00:00:00 2001 From: Zepalesque <60141811+Zepalesque@users.noreply.github.com> Date: Sat, 4 Jan 2025 17:24:33 -0500 Subject: [PATCH] fix: actually add flower pots --- .../redux/blockset/flower/type/BaseFlowerSet.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/zepalesque/redux/blockset/flower/type/BaseFlowerSet.java b/src/main/java/net/zepalesque/redux/blockset/flower/type/BaseFlowerSet.java index d4547a36..06afbe34 100644 --- a/src/main/java/net/zepalesque/redux/blockset/flower/type/BaseFlowerSet.java +++ b/src/main/java/net/zepalesque/redux/blockset/flower/type/BaseFlowerSet.java @@ -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; @@ -43,7 +44,6 @@ import java.util.function.Supplier; import java.util.function.UnaryOperator; -@SuppressWarnings("unchecked") public abstract class BaseFlowerSet extends AbstractFlowerSet implements MutableLoreGeneration> { public final String id, textureFolder; @@ -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 flower, Supplier pot) { + base.addPlant(BuiltInRegistries.BLOCK.getKey(flower.get()), pot); } @Override