Skip to content

Commit

Permalink
fix peanut juice item
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonnie39 committed Aug 9, 2023
1 parent 9af40df commit c3b31a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/dev/bonnie/thesideways/item/ModItems.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.bonnie.thesideways.item;

import dev.bonnie.thesideways.TheSideways;
import dev.bonnie.thesideways.item.custom.DrinkableFoodItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.PotionItem;
import net.minecraftforge.eventbus.api.IEventBus;
Expand All @@ -17,7 +18,7 @@ public class ModItems {
public static final RegistryObject<Item> PEANUT_ESSENCE = ITEMS.register("peanut_essence",
() -> new Item(new Item.Properties()));
public static final RegistryObject<Item> PEANUT_JUICE = ITEMS.register("peanut_juice",
() -> new PotionItem(new Item.Properties().food(ModFoods.PEANUT_JUICE).stacksTo(1)));
() -> new DrinkableFoodItem(new Item.Properties().food(ModFoods.PEANUT_JUICE).stacksTo(1)));

// SOMETHING
public static void register(IEventBus eventBus) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package dev.bonnie.thesideways.item.custom;

import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.item.HoneyBottleItem;

public class DrinkableFoodItem extends HoneyBottleItem {
public DrinkableFoodItem(Properties properties) {
super(properties);
}

@Override
public SoundEvent getDrinkingSound() {
return SoundEvents.GENERIC_DRINK;
}

@Override
public SoundEvent getEatingSound() {
return SoundEvents.GENERIC_DRINK;
}
}

0 comments on commit c3b31a7

Please sign in to comment.