Finished tuna fish, sashimi, nigiri. Made tooltip for aburi salmon nigiri
This commit is contained in:
parent
f7722d9d99
commit
326663790a
10 changed files with 102 additions and 17 deletions
|
|
@ -1,9 +1,32 @@
|
||||||
package dev.confuzzedcat.sushi.items.food.ingredients.fish.sashimi;
|
package dev.confuzzedcat.sushi.items.food.ingredients.fish.sashimi;
|
||||||
|
|
||||||
import dev.confuzzedcat.sushi.items.food.ingredients.fish.FishBase;
|
import dev.confuzzedcat.sushi.items.food.ingredients.fish.FishBase;
|
||||||
|
import net.minecraft.client.item.TooltipContext;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.text.Style;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Formatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class SashimiBase extends FishBase {
|
public class SashimiBase extends FishBase {
|
||||||
public SashimiBase(Settings settings) {
|
public SashimiBase(Settings settings) {
|
||||||
super(settings);
|
super(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int tooltip_pos = 1;
|
||||||
|
@Override
|
||||||
|
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
|
||||||
|
tooltip.add(tooltip_pos, Text.translatable("itemTooltip.sushi.sashimi_base")
|
||||||
|
.setStyle(
|
||||||
|
Style.EMPTY
|
||||||
|
.withFormatting(
|
||||||
|
Formatting.AQUA
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
super.appendTooltip(stack, world, tooltip, context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ public class TunaSashimi extends SashimiBase {
|
||||||
public TunaSashimi(){
|
public TunaSashimi(){
|
||||||
super(new Settings()
|
super(new Settings()
|
||||||
.food(new FoodComponent.Builder()
|
.food(new FoodComponent.Builder()
|
||||||
.hunger(1)
|
.hunger(2)
|
||||||
.saturationModifier(1)
|
.saturationModifier(1)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,28 @@
|
||||||
package dev.confuzzedcat.sushi.items.food.nigiri;
|
package dev.confuzzedcat.sushi.items.food.nigiri;
|
||||||
|
|
||||||
|
import net.minecraft.client.item.TooltipContext;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.text.Style;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Formatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class NigiriAburiSalmon extends NigiriBase {
|
public class NigiriAburiSalmon extends NigiriBase {
|
||||||
|
@Override
|
||||||
|
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
|
||||||
|
tooltip.add(Text.translatable("itemTooltip.sushi.nigiri_aburi_salmon")
|
||||||
|
.setStyle(
|
||||||
|
Style.EMPTY
|
||||||
|
.withFormatting(
|
||||||
|
Formatting.DARK_GRAY,
|
||||||
|
Formatting.ITALIC
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
super.appendTooltip(stack, world, tooltip, context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,16 @@
|
||||||
package dev.confuzzedcat.sushi.items.food.nigiri;
|
package dev.confuzzedcat.sushi.items.food.nigiri;
|
||||||
|
|
||||||
import dev.confuzzedcat.sushi.items.food.SushiFoodItemBase;
|
import dev.confuzzedcat.sushi.items.food.SushiFoodItemBase;
|
||||||
|
import net.minecraft.client.item.TooltipContext;
|
||||||
import net.minecraft.item.FoodComponent;
|
import net.minecraft.item.FoodComponent;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.text.Style;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Formatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class NigiriBase extends SushiFoodItemBase {
|
public abstract class NigiriBase extends SushiFoodItemBase {
|
||||||
public NigiriBase(Settings settings) {
|
public NigiriBase(Settings settings) {
|
||||||
|
|
@ -17,4 +26,17 @@ public abstract class NigiriBase extends SushiFoodItemBase {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
protected int tooltip_pos = 1;
|
||||||
|
@Override
|
||||||
|
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
|
||||||
|
tooltip.add(tooltip_pos, Text.translatable("itemTooltip.sushi.nigiri_base")
|
||||||
|
.setStyle(
|
||||||
|
Style.EMPTY
|
||||||
|
.withFormatting(
|
||||||
|
Formatting.AQUA
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
super.appendTooltip(stack, world, tooltip, context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,12 @@ public class NigiriTuna extends NigiriBase {
|
||||||
super(settings);
|
super(settings);
|
||||||
}
|
}
|
||||||
public NigiriTuna() {
|
public NigiriTuna() {
|
||||||
super();
|
super(new Settings()
|
||||||
|
.food(new FoodComponent.Builder()
|
||||||
|
.hunger(5)
|
||||||
|
.saturationModifier(6)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,10 @@ public class SushiItems {
|
||||||
|
|
||||||
// Nigiri
|
// Nigiri
|
||||||
|
|
||||||
public static final Item NIGIRI_SALMON = register("nigiri_salmon", new NigiriSalmon());
|
|
||||||
public static final Item NIGIRI_TUNA = register("nigiri_tuna", new NigiriTuna());
|
public static final Item NIGIRI_TUNA = register("nigiri_tuna", new NigiriTuna());
|
||||||
|
/*
|
||||||
|
// TODO: Uncomment when done.
|
||||||
|
public static final Item NIGIRI_SALMON = register("nigiri_salmon", new NigiriSalmon());
|
||||||
public static final Item NIGIRI_HAMACHI = register("nigiri_hamachi", new NigiriHamachi());
|
public static final Item NIGIRI_HAMACHI = register("nigiri_hamachi", new NigiriHamachi());
|
||||||
public static final Item NIGIRI_SEABASS = register("nigiri_seabass", new NigiriSeabass());
|
public static final Item NIGIRI_SEABASS = register("nigiri_seabass", new NigiriSeabass());
|
||||||
public static final Item NIGIRI_MACKEREL = register("nigiri_mackerel", new NigiriMackerel());
|
public static final Item NIGIRI_MACKEREL = register("nigiri_mackerel", new NigiriMackerel());
|
||||||
|
|
@ -39,6 +41,7 @@ public class SushiItems {
|
||||||
public static final Item NIGIRI_SCALLOP = register("nigiri_scallop", new NigiriScallop());
|
public static final Item NIGIRI_SCALLOP = register("nigiri_scallop", new NigiriScallop());
|
||||||
public static final Item NIGIRI_UNAGI = register("nigiri_unagi", new NigiriUnagi());
|
public static final Item NIGIRI_UNAGI = register("nigiri_unagi", new NigiriUnagi());
|
||||||
public static final Item NIGIRI_ABURI_SALMON = register("nigiri_aburi_salmon", new NigiriAburiSalmon());
|
public static final Item NIGIRI_ABURI_SALMON = register("nigiri_aburi_salmon", new NigiriAburiSalmon());
|
||||||
|
*/
|
||||||
|
|
||||||
public static <T extends Item> T register(String name, T item) {
|
public static <T extends Item> T register(String name, T item) {
|
||||||
LOGGER.info("Registering item with id: {}", name);
|
LOGGER.info("Registering item with id: {}", name);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@
|
||||||
"itemGroup.sushi.sushi_items": "Sushi Items",
|
"itemGroup.sushi.sushi_items": "Sushi Items",
|
||||||
|
|
||||||
"item.sushi.avocado_fruit": "Avocado Fruit",
|
"item.sushi.avocado_fruit": "Avocado Fruit",
|
||||||
|
|
||||||
|
"itemTooltip.sushi.nigiri_base": "Nigiri",
|
||||||
|
"itemTooltip.sushi.sashimi_base": "Sashimi",
|
||||||
|
|
||||||
"item.sushi.nigiri_tuna": "Tuna Nigiri",
|
"item.sushi.nigiri_tuna": "Tuna Nigiri",
|
||||||
"item.sushi.nigiri_salmon": "Salmon Nigiri",
|
"item.sushi.nigiri_salmon": "Salmon Nigiri",
|
||||||
"item.sushi.nigiri_hamachi": "Hamachi Nigiri",
|
"item.sushi.nigiri_hamachi": "Hamachi Nigiri",
|
||||||
|
|
@ -15,6 +19,9 @@
|
||||||
"item.sushi.nigiri_scallop": "Scallop Nigiri",
|
"item.sushi.nigiri_scallop": "Scallop Nigiri",
|
||||||
"item.sushi.nigiri_unagi":"Unagi Nigiri",
|
"item.sushi.nigiri_unagi":"Unagi Nigiri",
|
||||||
"item.sushi.nigiri_aburi_salmon": "Aburi Salmon Nigiri",
|
"item.sushi.nigiri_aburi_salmon": "Aburi Salmon Nigiri",
|
||||||
|
"itemTooltip.sushi.nigiri_aburi_salmon": "Seared salmon on rice",
|
||||||
|
|
||||||
"item.sushi.fish_tuna" : "Tuna Fish"
|
"item.sushi.fish_tuna": "Tuna Fish",
|
||||||
|
|
||||||
|
"item.sushi.sashimi_tuna": "Tuna Sashimi"
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 315 B |
Binary file not shown.
|
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 259 B |
Binary file not shown.
|
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 193 B |
Loading…
Add table
Add a link
Reference in a new issue