Skip to content

Commit fb14c49

Browse files
committed
Build #8
1 parent d8e4b30 commit fb14c49

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed
84 Bytes
Binary file not shown.

src/java/com/knoxhack/nethermetals/CommonProxy.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.knoxhack.nethermetals;
22

33
import com.knoxhack.nethermetals.blocks.ModBlocks;
4+
import com.knoxhack.nethermetals.crafting.ModCrafting;
45
import com.knoxhack.nethermetals.items.ModItems;
56

67
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
@@ -15,10 +16,13 @@ public void preInit(FMLPreInitializationEvent e) {
1516
}
1617

1718
public void init(FMLInitializationEvent e) {
18-
19+
ModCrafting.initCrafting();
1920
}
2021

2122
public void postInit(FMLPostInitializationEvent e) {
2223

2324
}
25+
26+
27+
2428
}

src/java/com/knoxhack/nethermetals/blocks/ModBlockOre.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,31 @@ public class ModBlockOre extends Block {
1515
private int least_quantity;
1616
private int most_quantity;
1717

18-
protected ModBlockOre(String unlocalizedName, Material mat, Item drop, int meta, int least_quantity, int most_quantity) {
18+
public ModBlockOre(String unlocalizedName, Material mat, Item drop, int meta, int least_quantity, int most_quantity) {
1919
super(mat);
2020
this.drop = drop;
2121
this.meta = meta;
2222
this.least_quantity = least_quantity;
2323
this.most_quantity = most_quantity;
2424
this.setHarvestLevel("pickaxe", 1);
25-
this.setHardness(7.0f);
25+
this.setHardness(10.0f);
2626
this.setResistance(15.0f);
2727
this.setUnlocalizedName(unlocalizedName);
2828
this.setCreativeTab(CreativeTabs.tabBlock);
2929
}
3030

31-
protected ModBlockOre(String unlocalizedName, Material mat, Item drop, int least_quantity, int most_quantity) {
31+
public ModBlockOre(String unlocalizedName, Material mat, Item drop, int least_quantity, int most_quantity) {
3232
this(unlocalizedName, mat, drop, 0, least_quantity, most_quantity);
3333
}
3434

35-
protected ModBlockOre(String unlocalizedName, Material mat, Item drop) {
35+
public ModBlockOre(String unlocalizedName, Material mat, Item drop) {
3636
this(unlocalizedName, mat, drop, 1, 1);
3737
}
3838

39+
public void ModBlockOre2(String string, Material rock, Block ironOre, int i, int j) {
40+
// TODO Auto-generated constructor stub
41+
}
42+
3943
@Override
4044
public Item getItemDropped(IBlockState blockstate, Random random, int fortune) {
4145
return this.drop;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.knoxhack.nethermetals.crafting;
2+
3+
import com.knoxhack.nethermetals.blocks.ModBlocks;
4+
import com.knoxhack.nethermetals.items.ModItems;
5+
6+
import net.minecraft.init.Blocks;
7+
import net.minecraft.init.Items;
8+
import net.minecraft.item.ItemStack;
9+
import net.minecraftforge.fml.common.registry.GameRegistry;
10+
11+
public final class ModCrafting {
12+
13+
public static void initCrafting() {
14+
GameRegistry.addRecipe(new ItemStack(ModBlocks.nethercopperOre), "##","##", '#', ModItems.netheraxe);
15+
//or: GameRegistry.addRecipe(new ItemStack(ModBlocks.tutorialBlock), new Object[]{"##","##", '#', ModItems.tutorialItem});
16+
17+
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nethersword), Blocks.iron_ore, new ItemStack(Items.dye, 1, 4));
18+
//or: GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tutorialItem), new Object[]{Items.redstone, new ItemStack(Items.dye, 1, 4)});
19+
20+
GameRegistry.addSmelting(Items.diamond, new ItemStack(ModItems.nethersword), 1.0f);
21+
}
22+
}

0 commit comments

Comments
 (0)