n-noguchi / FatCatMOD

MinecraftのデブネコMODです
http://forum.minecraftuser.jp/viewtopic.php?f=13&t=28511
MIT License
0 stars 0 forks source link

minecraft1.12移行 net.minecraftforge.fml.common.registry.GameRegistry.registerItem() #3

Open n-noguchi opened 5 years ago

n-noguchi commented 5 years ago

minecraft1.12でのアイテム登録方法を確認

現在のソース

        GameRegistry.registerItem(egg, egg.getUnlocalizedName().substring(5));
        GameRegistry.registerItem(unko, unko.getUnlocalizedName().substring(5));
        GameRegistry.registerItem(brush, brush.getUnlocalizedName().substring(5));
        GameRegistry.registerItem(furball, furball.getUnlocalizedName().substring(5));
        GameRegistry.registerItem(feather_toy, feather_toy.getUnlocalizedName().substring(5));
n-noguchi commented 5 years ago

アイテム登録方法についてのフォーラム http://www.minecraftforge.net/forum/topic/59195-112-minecraft-creating-and-registering-items-and-blocks/

仕様 https://mcforge.readthedocs.io/en/latest/concepts/registries/

サンプル https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/1.12/src/main/java/choonster/testmod3/init/ModItems.java#L165-L237