Added a Golden Toast similar to the Golden Apple
This commit is contained in:
parent
63db9920b2
commit
18b71ec162
|
@ -4,14 +4,12 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9d600e86-9aa6-49ee-bbc5-e23128c6a4d1" name="Changes" comment="one texture file was missing">
|
<list default="true" id="9d600e86-9aa6-49ee-bbc5-e23128c6a4d1" name="Changes" comment="fixed a bunch of typos and added sounds :D">
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/sounds.json" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/items/GoldenToastItem.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/sounds/toaster_lock.ogg" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/textures/item/golden_toast.png" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/sounds/toaster_release.ogg" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/Tastytoasters.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/Tastytoasters.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/Tastytoasters.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/Tastytoasters.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlock.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlock.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/items/ToasterItem.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/items/ToasterItem.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/blackfur/tastytoasters/block/ToasterBlockEntity.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/lang/en_us.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/lang/en_us.json" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/lang/en_us.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/assets/tastytoasters/lang/en_us.json" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
@ -105,7 +103,7 @@
|
||||||
<recent name="$PROJECT_DIR$/Temp" />
|
<recent name="$PROJECT_DIR$/Temp" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Gradle.tastytoasters [build]">
|
<component name="RunManager" selected="Application.Minecraft Client">
|
||||||
<configuration name="tastytoasters [buildDependents]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
<configuration name="tastytoasters [buildDependents]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||||
<ExternalSystemSettings>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
|
@ -294,7 +292,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1641398298085</updated>
|
<updated>1641398298085</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="12" />
|
<task id="LOCAL-00012" summary="fixed a bunch of typos and added sounds :D">
|
||||||
|
<created>1641409229142</created>
|
||||||
|
<option name="number" value="00012" />
|
||||||
|
<option name="presentableId" value="LOCAL-00012" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1641409229142</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="13" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -321,6 +326,7 @@
|
||||||
<MESSAGE value="welll it seems there is a fabric api bug" />
|
<MESSAGE value="welll it seems there is a fabric api bug" />
|
||||||
<MESSAGE value="Finally fixed a dumb sync issue :D" />
|
<MESSAGE value="Finally fixed a dumb sync issue :D" />
|
||||||
<MESSAGE value="one texture file was missing" />
|
<MESSAGE value="one texture file was missing" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="one texture file was missing" />
|
<MESSAGE value="fixed a bunch of typos and added sounds :D" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="fixed a bunch of typos and added sounds :D" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -4,13 +4,18 @@ import blackfur.tastytoasters.block.ToasterBlock;
|
||||||
import blackfur.tastytoasters.block.ToasterBlockEntity;
|
import blackfur.tastytoasters.block.ToasterBlockEntity;
|
||||||
import blackfur.tastytoasters.items.*;
|
import blackfur.tastytoasters.items.*;
|
||||||
import net.fabricmc.api.ModInitializer;
|
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.FabricBlockSettings;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
|
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.Material;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.loot.LootTables;
|
||||||
|
import net.minecraft.loot.entry.ItemEntry;
|
||||||
import net.minecraft.sound.SoundEvent;
|
import net.minecraft.sound.SoundEvent;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.registry.Registry;
|
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 BURNT_TOAST_ITEM = new BurntToastItem();
|
||||||
public static final Item BUTTER_ITEM = new ButterItem();
|
public static final Item BUTTER_ITEM = new ButterItem();
|
||||||
public static final Item BUTTERED_TOAST_ITEM = new ButteredToastItem();
|
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());
|
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 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_LOCK_SOUND_EVENT = new SoundEvent(TOASTER_LOCK_SOUND_ID);
|
||||||
public static SoundEvent TOASTER_RELEASE_SOUND_EVENT = new SoundEvent(TOASTER_RELEASE_SOUND_ID);
|
public static SoundEvent TOASTER_RELEASE_SOUND_EVENT = new SoundEvent(TOASTER_RELEASE_SOUND_ID);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "raw_toast"), RAW_TOAST_ITEM);
|
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", "burnt_toast"), BURNT_TOAST_ITEM);
|
||||||
Registry.register(Registry.ITEM, new Identifier("tastytoasters", "butter"), BUTTER_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", "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.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)));
|
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_LOCK_SOUND_ID, TOASTER_LOCK_SOUND_EVENT);
|
||||||
Registry.register(Registry.SOUND_EVENT, TOASTER_RELEASE_SOUND_ID, TOASTER_RELEASE_SOUND_EVENT);
|
Registry.register(Registry.SOUND_EVENT, TOASTER_RELEASE_SOUND_ID, TOASTER_RELEASE_SOUND_EVENT);
|
||||||
|
|
||||||
|
FuelRegistry.INSTANCE.add(BURNT_TOAST_ITEM, 1600);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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<Text> tooltip, TooltipContext tooltipContext) {
|
||||||
|
tooltip.add(new TranslatableText("item.tastytoasters.golden_toast.tooltip").formatted(Formatting.GOLD));
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class ToasterItem extends BlockItem {
|
public class ToasterItem extends BlockItem {
|
||||||
public ToasterItem(Block block) {
|
public ToasterItem(Block block) {
|
||||||
super(block, new FabricItemSettings().group(ItemGroup.FOOD));
|
super(block, new FabricItemSettings().group(ItemGroup.DECORATIONS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
"item.tastytoasters.butter.tooltip.2": "inherits milk properties",
|
"item.tastytoasters.butter.tooltip.2": "inherits milk properties",
|
||||||
"item.tastytoasters.buttered_toast": "Buttered Toast",
|
"item.tastytoasters.buttered_toast": "Buttered Toast",
|
||||||
"item.tastytoasters.buttered_toast.tooltip": "So great, but not shiny enough",
|
"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": "Toaster",
|
||||||
"block.tastytoasters.toaster.tooltip": "The gate to happiness",
|
"block.tastytoasters.toaster.tooltip": "The gate to happiness",
|
||||||
"subtitles.tastytoasters.toaster_lock": "Toaster locks",
|
"subtitles.tastytoasters.toaster_lock": "Toaster locks",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 791 B |
Loading…
Reference in a new issue