diff --git a/src/main/java/net/zepalesque/redux/event/listener/RegistryListener.java b/src/main/java/net/zepalesque/redux/event/listener/RegistryListener.java new file mode 100644 index 000000000..b95703c07 --- /dev/null +++ b/src/main/java/net/zepalesque/redux/event/listener/RegistryListener.java @@ -0,0 +1,19 @@ +package net.zepalesque.redux.event.listener; + +import com.aetherteam.aether.item.food.GummySwetItem; +import net.minecraft.core.component.DataComponents; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.neoforge.event.ModifyDefaultComponentsEvent; +import net.zepalesque.redux.Redux; +import net.zepalesque.redux.item.property.ReduxFoods; + +@EventBusSubscriber(modid = Redux.MODID, bus = EventBusSubscriber.Bus.MOD) +public class RegistryListener { + + @SubscribeEvent + public static void modifyComponents(ModifyDefaultComponentsEvent event) { + if (true) // TODO: Config + event.modifyMatching(item -> item instanceof GummySwetItem, builder -> builder.set(DataComponents.FOOD, ReduxFoods.GUMMY_SWET_NERF)); + } +} diff --git a/src/main/java/net/zepalesque/redux/item/property/ReduxFoods.java b/src/main/java/net/zepalesque/redux/item/property/ReduxFoods.java index 8075d006d..86ba18973 100644 --- a/src/main/java/net/zepalesque/redux/item/property/ReduxFoods.java +++ b/src/main/java/net/zepalesque/redux/item/property/ReduxFoods.java @@ -5,5 +5,6 @@ public class ReduxFoods { public static final FoodProperties WYND_OATS = new FoodProperties.Builder().fast().nutrition(1).saturationModifier(0F).build(); + public static final FoodProperties GUMMY_SWET_NERF = (new FoodProperties.Builder()).fast().nutrition(7).saturationModifier(0.6F).build(); } diff --git a/src/main/java/net/zepalesque/redux/mixin/mixins/common/item/ItemMixin.java b/src/main/java/net/zepalesque/redux/mixin/mixins/common/item/ItemMixin.java new file mode 100644 index 000000000..f32218474 --- /dev/null +++ b/src/main/java/net/zepalesque/redux/mixin/mixins/common/item/ItemMixin.java @@ -0,0 +1,27 @@ +package net.zepalesque.redux.mixin.mixins.common.item; + +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.food.FoodProperties; +import net.minecraft.world.inventory.ClickAction; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(Item.class) +public class ItemMixin { + + @Inject(method = "getFood", at = @At("RETURN"), cancellable = true) + public void getFoodProperties(CallbackInfoReturnable cir) { + } + + + @Inject(method = "overrideStackedOnOther", at = @At("RETURN"), cancellable = true) + protected void overrideStackedOnOther(ItemStack stack, Slot slot, ClickAction action, Player player, CallbackInfoReturnable cir) { + + } + +} diff --git a/src/main/java/net/zepalesque/redux/world/tree/foliage/BlightwillowFoliagePlacer.java b/src/main/java/net/zepalesque/redux/world/tree/foliage/BlightwillowFoliagePlacer.java index 06515d68c..2523c23bb 100644 --- a/src/main/java/net/zepalesque/redux/world/tree/foliage/BlightwillowFoliagePlacer.java +++ b/src/main/java/net/zepalesque/redux/world/tree/foliage/BlightwillowFoliagePlacer.java @@ -48,8 +48,8 @@ private void placeSpine(LevelSimulatedReader level, FoliageSetter setter, Random boolean extendAbove = false; // Place inner spine part - for (int i = -1; i < 7; i++) { - boolean isHighest = i == 6; + for (int i = -1; i < 8; i++) { + boolean isHighest = i == 7; boolean isLowest = i == -1; boolean place = (!isLowest && !isHighest) || rand.nextBoolean(); if (place) { diff --git a/src/main/resources/aether_redux.mixins.json b/src/main/resources/aether_redux.mixins.json index 5a449c37c..8069793d1 100644 --- a/src/main/resources/aether_redux.mixins.json +++ b/src/main/resources/aether_redux.mixins.json @@ -24,6 +24,7 @@ "common.entity.ai.SliderBackOffMixin", "common.entity.ai.SliderUpDownMixin", "common.item.DiggerItemMixin", + "common.item.ItemMixin", "common.item.PickaxeItemMixin", "common.world.structure.AetherTemplateStructurePieceMixin", "common.world.structure.BronzeBossMixin",