Created
June 29, 2015 11:44
-
-
Save LionZXY/76acad563db6b112bbd6 to your computer and use it in GitHub Desktop.
FirstMine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.examplemod; | |
import cpw.mods.fml.common.Mod.EventHandler; | |
import cpw.mods.fml.common.event.FMLInitializationEvent; | |
import cpw.mods.fml.common.Mod; | |
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | |
import cpw.mods.fml.common.registry.GameRegistry; | |
import net.minecraft.block.Block; | |
import net.minecraft.item.Item; | |
@Mod(modid = "firstmod", version = "0.1") | |
public class ExampleMod | |
{ | |
public static Block FirstBlock; | |
public static Block TwoBlock; | |
public static Block TriBlock; | |
public static Item yellowwand; | |
public static Item redwand; | |
@EventHandler | |
public void preLoad(FMLPreInitializationEvent event) | |
{ | |
FirstBlock = new FirstBlock(); | |
TwoBlock = new TwoBlock(); | |
TriBlock = new TriBlock(); | |
yellowwand = new yellowwand(); | |
redwand = new redwand(); | |
GameRegistry.registerItem(redwand, "redwand"); | |
GameRegistry.registerItem(yellowwand, "yellowwand"); | |
GameRegistry.registerBlock(FirstBlock,"myfirstblock"); | |
GameRegistry.registerBlock(TwoBlock,"vtoroiblock"); | |
GameRegistry.registerBlock(TriBlock,"tretieblock"); | |
} | |
@EventHandler | |
public void init(FMLInitializationEvent event) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.examplemod; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.creativetab.CreativeTabs; | |
/** | |
* Created by nikit_000 on 28.06.2015. | |
*/ | |
public class FirstBlock extends Block { | |
public FirstBlock(){ | |
super(Material.glass); | |
this.setBlockName("myfirstblock"); | |
this.setHardness(10F); | |
this.setCreativeTab(CreativeTabs.tabBlock); | |
this.setBlockTextureName("firstmod:myfirstblock"); | |
this.setLightLevel(15F); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.examplemod; | |
import net.minecraft.creativetab.CreativeTabs; | |
import net.minecraft.item.Item; | |
/** | |
* Created by nikit_000 on 29.06.2015. | |
*/ | |
public class redwand extends Item { | |
redwand(){ | |
this.setCreativeTab(CreativeTabs.tabMaterials); | |
this.setUnlocalizedName("redwand"); | |
this.setTextureName("firstmod:redwand"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.examplemod; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.creativetab.CreativeTabs; | |
/** | |
* Created by nikit_000 on 29.06.2015. | |
*/ | |
public class TriBlock extends Block{ | |
public TriBlock(){ | |
super(Material.craftedSnow); | |
this.setCreativeTab(CreativeTabs.tabBlock); | |
this.setBlockName("tretieblock"); | |
this.setHardness(10F); | |
this.setBlockTextureName("firstmod:tretieblock"); | |
this.setLightLevel(150F); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.examplemod; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.creativetab.CreativeTabs; | |
/** | |
* Created by nikit_000 on 29.06.2015. | |
*/ | |
public class TwoBlock extends Block { | |
public TwoBlock(){ | |
super(Material.grass); | |
this.setCreativeTab(CreativeTabs.tabBlock); | |
this.setBlockName("vtoroiblock"); | |
this.setHardness(10F); | |
this.setBlockTextureName("firstmod:vtoroiblock"); | |
this.setLightLevel(15F); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.examplemod; | |
import net.minecraft.creativetab.CreativeTabs; | |
import net.minecraft.item.Item; | |
/** | |
* Created by nikit_000 on 29.06.2015. | |
*/ | |
public class yellowwand extends Item { | |
yellowwand(){ | |
this.setTextureName("firstmod:yellowwand"); | |
this.setCreativeTab(CreativeTabs.tabMaterials); | |
this.setUnlocalizedName("yellowwand"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tile.tretieblock.name=Yellow Glowstone Block | |
tile.vtoroiblock.name=Red Block | |
tile.myfirstblock.name=White Block | |
item.yellowwand.name=Yellow Wand | |
item.redwand.name=Red Wand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
‰PNG | |