Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tutorial.generic;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.init.Blocks;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraftforge.common.config.Configuration;
- import cpw.mods.fml.common.Mod;
- import cpw.mods.fml.common.Mod.EventHandler; // used in 1.6.2
- import cpw.mods.fml.common.Mod.Instance;
- import cpw.mods.fml.common.SidedProxy;
- import cpw.mods.fml.common.event.FMLInitializationEvent;
- import cpw.mods.fml.common.event.FMLPostInitializationEvent;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.registry.GameRegistry;
- import net.minecraftforge.common.config.*;
- @Mod(modid="yesodmod", name="Yesod Mod", version="1.0.0")
- public class Generic {
- // The instance of your mod that Forge uses.
- @Instance(value = "yesodmod")
- public static Generic instance;
- // Says where the client and server 'proxy' code is loaded.
- @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy")
- public static CommonProxy proxy;
- /**
- * Item
- */
- public static Item explosiveFlint;
- public static Item explosiveArrow;
- public static Item blazeBow;
- public static Item heatedString;
- /**
- * Blocchi
- */
- public static Block stoneGlowstone;
- public static Block explosiveFlintOre;
- @EventHandler // used in 1.6.2
- public void preInit(FMLPreInitializationEvent event) {
- /**
- * Parte di aggiunta nuovi item
- */
- explosiveFlint = new GenericItem(64, CreativeTabs.tabMaterials, 1, "explosiveFlint" ).setTextureName("yesodmod:explosiveflint");
- GameRegistry.registerItem(explosiveFlint,"explosiveFlint");
- explosiveArrow = new GenericItem(64, CreativeTabs.tabCombat, 2, "explosiveArrow").setTextureName("yesodmod:explosivearrow");
- GameRegistry.registerItem(explosiveArrow, "ExplosiveArrow");
- heatedString = new GenericItem(64, CreativeTabs.tabMaterials, 3, "heatedString").setTextureName("yesodmod:heatedstring");
- GameRegistry.registerItem(heatedString, "heatedString");
- Item blazeBow = new blazeBow();
- GameRegistry.registerItem(blazeBow, "blazeBow");
- /** Parte di aggiunta nuovi blocchi
- *
- */
- stoneGlowstone = new GenericBlock(Material.rock).setHardness(1.5f)
- .setStepSound(Block.soundTypeStone).setBlockName("stoneGlowstone").setCreativeTab(CreativeTabs.tabBlock)
- .setLightLevel(1.0f).setBlockTextureName("yesodmod:stoneGlowstone").setBlockTextureName("yesodmod:stoneglowstone");
- stoneGlowstone.setHarvestLevel("pickaxe", 1);
- explosiveFlintOre = new GenericOre(Material.rock, 1.5f, "explosiveFlintOre", "pickaxe", 1).setBlockTextureName("yesodmod:explosiveflintore");
- }
- @EventHandler // used in 1.6.2
- public void load(FMLInitializationEvent event) {
- proxy.registerRenderers();
- /** Parte di crafting e smelting
- *
- */
- ItemStack featherStack = new ItemStack(Items.feather);
- ItemStack stickStack = new ItemStack(Items.stick);
- ItemStack explosiveFlintStack = new ItemStack(Generic.explosiveFlint);
- ItemStack blazeRodStack = new ItemStack(Items.blaze_rod);
- ItemStack stringStack = new ItemStack(Items.string);
- ItemStack blazePowderStack = new ItemStack(Items.blaze_powder);
- ItemStack heatedStringStack = new ItemStack(Generic.heatedString);
- GameRegistry.addRecipe(new ItemStack(Generic.explosiveArrow,4), "x ", " y ", " z", 'x',
- explosiveFlintStack, 'y', stickStack, 'z', featherStack );
- GameRegistry.addRecipe(new ItemStack(Generic.heatedString,3), "xxx", " y ",
- 'x', stringStack, 'y', blazePowderStack );
- GameRegistry.addRecipe(new ItemStack(Generic.heatedString,3), " ", "xxx", " y ",
- 'x', heatedStringStack, 'y', blazePowderStack );
- GameRegistry.addRecipe(new ItemStack(Generic.blazeBow,1,500), "xy ", "x y", "xy ",'x',stringStack, 'y', blazeRodStack);
- /**
- * Parte di aggiunta nuovi blocchi
- */
- GameRegistry.registerBlock(stoneGlowstone, "Pietraluce rocciosa");
- GameRegistry.registerBlock(explosiveFlintOre, "Flint esplosiva grezza");
- GameRegistry.registerWorldGenerator(new YesodWorldGenerator(), 0);
- }
- @EventHandler // used in 1.6.2
- public void postInit(FMLPostInitializationEvent event) {
- // Stub Method
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment