- 最后登录:
- -
- 阅读权限:
- 30
- 主题数:
- 27
- 总积分:
- 3947
- 回帖数:
- 84
- 精华数:
- 0
-
EU:6
RF:3386
Vis:6
Mana:0
AE:977
|
Day2:
跟着教程抄了一遍,但是我觉得文件结构太麻烦,于是我把东西给塞进一个文件里……- @Mod("simple")
- public class simple
- {
- final static String MOD_ID="simple";
- public static final DeferredRegister<Block> SIMPLE_BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MOD_ID);
- public static final DeferredRegister<Item> SIMPLE_ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MOD_ID);
- private static RegistryObject<Item>Icon;
- public final static CreativeModeTab simpleTab=new CreativeModeTab("simple") {
- @Override
- public ItemStack makeIcon() {
- return new ItemStack(Icon.get());
- }
- };
- public static RegistryObject<Block>musicAltar1;
- public static RegistryObject<Item>musicAltar1_item;
- public simple(){
- IEventBus bus=FMLJavaModLoadingContext.get().getModEventBus();
- SIMPLE_BLOCKS.register(bus);SIMPLE_ITEMS.register(bus);
- musicAltar1=SIMPLE_BLOCKS.register("music_altar_1", ()->new Block(BlockBehaviour.Properties.copy(Blocks.STONE)));
- musicAltar1_item=SIMPLE_ITEMS.register("music_altar_1",()->new BlockItem(musicAltar1.get(),new Item.Properties().tab(simpleTab)));
- Icon=musicAltar1_item;
- }
- }
复制代码
于是一拍脑袋决定写个轮子。写一个轮子来练练手还是不错的选择。
本来想学dataGen,结果它跑都不跑就结束了,什么也没gen出来,问了三踢他也一头雾水。
不更了不更了 |
|