Skip to content

Commit b442502

Browse files
KaupenjoeKaupenjoe
authored andcommitted
animated texture (mcmeta)
1 parent 5921f3b commit b442502

6 files changed

Lines changed: 27 additions & 1 deletion

File tree

src/main/java/net/kaupenjoe/tutorialmod/item/ModItemGroups.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public class ModItemGroups {
4747
entries.add(ModItems.HONEY_BERRIES);
4848

4949
entries.add(ModItems.TOMAHAWK);
50-
50+
entries.add(ModItems.SPECTRE_STAFF);
51+
5152
entries.add(ModItems.MANTIS_SPAWN_EGG);
5253

5354
}).build());

src/main/java/net/kaupenjoe/tutorialmod/item/ModItems.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public void appendTooltip(ItemStack stack, TooltipContext context, List<Text> to
9090
public static final Item TOMAHAWK = registerItem("tomahawk",
9191
new TomahawkItem(new Item.Settings().maxCount(16)));
9292

93+
public static final Item SPECTRE_STAFF = registerItem("spectre_staff",
94+
new Item(new Item.Settings().maxCount(1)));
95+
9396

9497
private static Item registerItem(String name, Item item) {
9598
return Registry.register(Registries.ITEM, Identifier.of(TutorialMod.MOD_ID, name), item);

src/main/resources/assets/tutorialmod/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"item.tutorialmod.mantis_spawn_egg": "Mantis Spawn Egg",
3838

3939
"item.tutorialmod.tomahawk": "Tomahawk",
40+
"item.tutorialmod.spectre_staff": "Spectre Staff",
4041

4142

4243
"block.tutorialmod.pink_garnet_block": "Block of Pink Garnet",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:item/handheld",
3+
"textures": {
4+
"layer0": "tutorialmod:item/spectre_staff"
5+
}
6+
}
1.72 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"animation":
3+
{
4+
"frametime":3,
5+
"frames":
6+
[
7+
0, 1, 2, 3, 4, 5, 6, 7,
8+
{
9+
"index": 8,
10+
"time": 9
11+
},
12+
9, 10, 11, 12
13+
]
14+
}
15+
}

0 commit comments

Comments
 (0)