From 8a0999160c62acbb9442d28f0e5a10bdf754269b Mon Sep 17 00:00:00 2001 From: Faboslav Date: Thu, 14 Nov 2024 16:23:14 +0100 Subject: [PATCH] Compostable buttercup --- CHANGELOG.md | 1 + .../com/faboslav/friendsandfoes/common/FriendsAndFoes.java | 1 + .../friendsandfoes/common/init/FriendsAndFoesItems.java | 5 +++++ common/src/main/resources/friendsandfoes.accesswidener | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 805f20d2b..e8fb291c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Fixed strong potion of reaching duration - Fixed iceologer model - Fixed carpet profiler incompatibility +- Fixed buttercup not being compostable - Added more config options - Added zh_tw translations (Thanks to Lobster0228) - Added fr_fr translations (Thanks to Franco227) diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/FriendsAndFoes.java b/common/src/main/java/com/faboslav/friendsandfoes/common/FriendsAndFoes.java index 52aa7afdd..4048a741b 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/FriendsAndFoes.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/FriendsAndFoes.java @@ -73,6 +73,7 @@ public static void init() { public static void lateInit() { FriendsAndFoesBlockEntityTypes.lateInit(); + FriendsAndFoesItems.registerCompostableItems(); BiomeModifications.addButtercupFeature(); } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesItems.java b/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesItems.java index 37d309c61..6c1d3a776 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesItems.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesItems.java @@ -6,6 +6,7 @@ import com.faboslav.friendsandfoes.common.init.registry.ResourcefulRegistry; import com.faboslav.friendsandfoes.common.item.DispenserAddedSpawnEgg; import com.faboslav.friendsandfoes.common.item.FriendsAndFoesArmorMaterials; +import net.minecraft.block.ComposterBlock; import net.minecraft.entity.EntityType; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.*; @@ -62,4 +63,8 @@ public final class FriendsAndFoesItems private FriendsAndFoesItems() { } + + public static void registerCompostableItems() { + ComposterBlock.registerCompostableItem(0.65F, FriendsAndFoesItems.BUTTERCUP.get()); + } } diff --git a/common/src/main/resources/friendsandfoes.accesswidener b/common/src/main/resources/friendsandfoes.accesswidener index 13a3b305e..b6a7f1364 100644 --- a/common/src/main/resources/friendsandfoes.accesswidener +++ b/common/src/main/resources/friendsandfoes.accesswidener @@ -27,4 +27,5 @@ accessible method net/minecraft/entity/ai/brain/Activity (Ljava/lang/Stri accessible method net/minecraft/particle/DefaultParticleType (Z)V accessible method net/minecraft/block/AbstractButtonBlock getClickSound (Z)Lnet/minecraft/sound/SoundEvent; accessible method net/minecraft/entity/ai/brain/sensor/SensorType (Ljava/util/function/Supplier;)V -accessible method net/minecraft/entity/effect/StatusEffect (Lnet/minecraft/entity/effect/StatusEffectCategory;I)V \ No newline at end of file +accessible method net/minecraft/entity/effect/StatusEffect (Lnet/minecraft/entity/effect/StatusEffectCategory;I)V +accessible method net/minecraft/block/ComposterBlock registerCompostableItem (FLnet/minecraft/item/ItemConvertible;)V \ No newline at end of file