Add 'Obituary' item that will be used for retrieving the death location after respawning

I just want to mke it a little thing that prints the coords and possibly dim to chat when right-clicked.
master
BodgeMaster 2022-12-15 12:53:35 +01:00
parent e52c9b6011
commit 2770980d3a
3 changed files with 21 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package lostcave.deathchests;
import lostcave.deathchests.block.BlockDeathChest;
import lostcave.deathchests.item.Obituary;
import lostcave.deathchests.util.Config;
import lostcave.deathchests.util.Debug;
@ -48,6 +49,8 @@ public class DeathChests {
Debug.out("Received FMLInitializationEvent");
GameRegistry.registerBlock(BlockDeathChest.getInstance(), "death_chest");
GameRegistry.registerItem(Obituary.getInstance(), "obituary");
Debug.out("Registered block and item.");
// TODO (probably here): Add death event handler
}

View File

@ -0,0 +1,17 @@
package lostcave.deathchests.item;
import net.minecraft.item.Item;
public class Obituary extends Item {
private static final Obituary instance = new Obituary();
public static Obituary getInstance() {
return instance;
}
private Obituary() {
this.setUnlocalizedName("obituary");
this.setTextureName("paper");
}
}

View File

@ -1 +1,2 @@
tile.death_chest.name=Death Chest
item.obituary.name=Obituary