diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 26d8657..8a576bc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,14 +4,12 @@
-
-
-
-
+
+
+
-
-
+
@@ -105,7 +103,7 @@
-
+
@@ -294,7 +292,14 @@
1641398298085
-
+
+ 1641409229142
+
+
+
+ 1641409229142
+
+
@@ -321,6 +326,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/main/java/blackfur/tastytoasters/Tastytoasters.java b/src/main/java/blackfur/tastytoasters/Tastytoasters.java
index f630be9..73cb38b 100644
--- a/src/main/java/blackfur/tastytoasters/Tastytoasters.java
+++ b/src/main/java/blackfur/tastytoasters/Tastytoasters.java
@@ -4,13 +4,18 @@ import blackfur.tastytoasters.block.ToasterBlock;
import blackfur.tastytoasters.block.ToasterBlockEntity;
import blackfur.tastytoasters.items.*;
import net.fabricmc.api.ModInitializer;
+import net.fabricmc.fabric.api.loot.v1.FabricLootPoolBuilder;
+import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
+import net.fabricmc.fabric.api.registry.FuelRegistry;
import net.minecraft.block.Material;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
+import net.minecraft.loot.LootTables;
+import net.minecraft.loot.entry.ItemEntry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
@@ -22,6 +27,7 @@ public class Tastytoasters implements ModInitializer {
public static final Item BURNT_TOAST_ITEM = new BurntToastItem();
public static final Item BUTTER_ITEM = new ButterItem();
public static final Item BUTTERED_TOAST_ITEM = new ButteredToastItem();
+ public static final Item GOLDEN_TOAST_ITEM = new GoldenToastItem();
public static final ToasterBlock TOASTER_BLOCK = new ToasterBlock(FabricBlockSettings.of(Material.METAL).hardness(4.0f).requiresTool());
@@ -31,7 +37,7 @@ public class Tastytoasters implements ModInitializer {
public static final Identifier TOASTER_RELEASE_SOUND_ID = new Identifier("tastytoasters:toaster_release");
public static SoundEvent TOASTER_LOCK_SOUND_EVENT = new SoundEvent(TOASTER_LOCK_SOUND_ID);
public static SoundEvent TOASTER_RELEASE_SOUND_EVENT = new SoundEvent(TOASTER_RELEASE_SOUND_ID);
-
+
@Override
public void onInitialize() {
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "raw_toast"), RAW_TOAST_ITEM);
@@ -39,6 +45,7 @@ public class Tastytoasters implements ModInitializer {
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "burnt_toast"), BURNT_TOAST_ITEM);
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "butter"), BUTTER_ITEM);
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "buttered_toast"), BUTTERED_TOAST_ITEM);
+ Registry.register(Registry.ITEM, new Identifier("tastytoasters", "golden_toast"), GOLDEN_TOAST_ITEM);
Registry.register(Registry.BLOCK, new Identifier("tastytoasters", "toaster"), TOASTER_BLOCK);
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "toaster"), new BlockItem(TOASTER_BLOCK, new Item.Settings().group(ItemGroup.FOOD)));
@@ -47,5 +54,7 @@ public class Tastytoasters implements ModInitializer {
Registry.register(Registry.SOUND_EVENT, TOASTER_LOCK_SOUND_ID, TOASTER_LOCK_SOUND_EVENT);
Registry.register(Registry.SOUND_EVENT, TOASTER_RELEASE_SOUND_ID, TOASTER_RELEASE_SOUND_EVENT);
+
+ FuelRegistry.INSTANCE.add(BURNT_TOAST_ITEM, 1600);
}
}
diff --git a/src/main/java/blackfur/tastytoasters/items/GoldenToastItem.java b/src/main/java/blackfur/tastytoasters/items/GoldenToastItem.java
new file mode 100644
index 0000000..81d7b15
--- /dev/null
+++ b/src/main/java/blackfur/tastytoasters/items/GoldenToastItem.java
@@ -0,0 +1,46 @@
+package blackfur.tastytoasters.items;
+
+import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
+import net.minecraft.client.item.TooltipContext;
+import net.minecraft.entity.effect.StatusEffect;
+import net.minecraft.entity.effect.StatusEffectInstance;
+import net.minecraft.item.FoodComponent;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemGroup;
+import net.minecraft.item.ItemStack;
+import net.minecraft.text.Text;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.Formatting;
+import net.minecraft.util.Rarity;
+import net.minecraft.world.World;
+
+import java.util.List;
+
+public class GoldenToastItem extends Item {
+ public GoldenToastItem() {
+ super(new FabricItemSettings()
+ .group(ItemGroup.FOOD)
+ .food(new FoodComponent.Builder()
+ .hunger(4)
+ .saturationModifier(2.4f)
+ .statusEffect(new StatusEffectInstance(
+ StatusEffect.byRawId(22),
+ 120*20
+ ), 1.0f)
+ .statusEffect(new StatusEffectInstance(
+ StatusEffect.byRawId(10),
+ 5*20,
+ 2
+ ),
+ 1.0f)
+ .build()
+ )
+ .rarity(Rarity.RARE)
+ );
+ }
+
+ @Override
+ public void appendTooltip(ItemStack itemStack, World world, List tooltip, TooltipContext tooltipContext) {
+ tooltip.add(new TranslatableText("item.tastytoasters.golden_toast.tooltip").formatted(Formatting.GOLD));
+ }
+}
diff --git a/src/main/java/blackfur/tastytoasters/items/ToasterItem.java b/src/main/java/blackfur/tastytoasters/items/ToasterItem.java
index c7d66d0..31fa48c 100644
--- a/src/main/java/blackfur/tastytoasters/items/ToasterItem.java
+++ b/src/main/java/blackfur/tastytoasters/items/ToasterItem.java
@@ -15,7 +15,7 @@ import java.util.List;
public class ToasterItem extends BlockItem {
public ToasterItem(Block block) {
- super(block, new FabricItemSettings().group(ItemGroup.FOOD));
+ super(block, new FabricItemSettings().group(ItemGroup.DECORATIONS));
}
@Override
diff --git a/src/main/resources/assets/tastytoasters/lang/en_us.json b/src/main/resources/assets/tastytoasters/lang/en_us.json
index 836b0e6..25ae676 100644
--- a/src/main/resources/assets/tastytoasters/lang/en_us.json
+++ b/src/main/resources/assets/tastytoasters/lang/en_us.json
@@ -10,6 +10,8 @@
"item.tastytoasters.butter.tooltip.2": "inherits milk properties",
"item.tastytoasters.buttered_toast": "Buttered Toast",
"item.tastytoasters.buttered_toast.tooltip": "So great, but not shiny enough",
+ "item.tastytoasters.golden_toast": "Golden Toast",
+ "item.tastytoasters.golden_toast.tooltip": "The most shiny of them all",
"block.tastytoasters.toaster": "Toaster",
"block.tastytoasters.toaster.tooltip": "The gate to happiness",
"subtitles.tastytoasters.toaster_lock": "Toaster locks",
diff --git a/src/main/resources/assets/tastytoasters/textures/item/golden_toast.png b/src/main/resources/assets/tastytoasters/textures/item/golden_toast.png
new file mode 100644
index 0000000..7e74a17
Binary files /dev/null and b/src/main/resources/assets/tastytoasters/textures/item/golden_toast.png differ