- 12
- 0
Вот накодил я тестовый блок по инструкции и ничего, майн не запускается, а eclipe ругается через строчку, покажите ошибки, люди добрые
Код:
package com.example.examplemod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
public class NewBlock extends Block {
public NewBlock(Material material) {
super(material);
this.setCreativeTab(CreativeTabs.tabMaterials);
this.setBlockName("newBlock");
this.setHardness 1;
this.setLightOpacity 15;
this.setHarvestLevel(axe,2);
this.setBlockTextureName("StorageCraft:newBlock");
}
Код:
package com.example.examplemod;
import cpw.mods.fml.common.Mod;
@Mod(modid = "StorageCraft", name = "StorageCraft", version = "0.0.1 alfa")
public class StorageCraft {
}
@EventHandler
public void init(FMLInializationEvent event) {
}
public static Block newBlock;
@EventHandler
public void init(FMLInializationEvent event) {
@EventHandler
public void init(FMLInializationEvent event) {
newBlock = new NewBlock(Material.rock);
GameRegistry.registerBlock(newBlock, "newBlock");
LanguageRegistry.addName(newBlock, "ТЕСТ");
}
}