Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.

Commit 7eda390

Browse files
committed
Added Nether Coal - Closes #6
1 parent b370486 commit 7eda390

27 files changed

+175
-47
lines changed

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mod_version=1.3.3
1+
mod_version=1.3.4
22
minecraft_version=1.8.9
33
forge_version=11.15.1.1764
44
mappings=stable_20

images/nether_coal.png

1.17 MB
Loading

images/nether_coal_block.png

475 KB
Loading

images/nether_coal_block_time.png

468 KB
Loading

images/nether_coal_crafting.png

473 KB
Loading

images/nether_coal_sample_farm.png

1.4 MB
Loading

images/nether_coal_time.png

472 KB
Loading

images/ores.psd

1.59 KB
Binary file not shown.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.renevo.nethercore;
2+
3+
import com.renevo.nethercore.blocks.NetherCoreBlocks;
4+
import com.renevo.nethercore.item.NetherCoreItems;
5+
import net.minecraft.item.Item;
6+
import net.minecraft.item.ItemBlock;
7+
import net.minecraft.item.ItemStack;
8+
import net.minecraftforge.fml.common.IFuelHandler;
9+
10+
public class FuelHandler implements IFuelHandler {
11+
12+
@Override
13+
public int getBurnTime(ItemStack itemStack) {
14+
if (itemStack == null) {
15+
return 0;
16+
}
17+
18+
Item item = itemStack.getItem();
19+
20+
if (item == NetherCoreItems.netherCoal) {
21+
return 1600 * 2; // coal x 2
22+
}
23+
24+
if (item instanceof ItemBlock && ((ItemBlock)item).getBlock() == NetherCoreBlocks.blockNetherCoal) {
25+
return 16000 * 2; // coal_block x 2
26+
}
27+
28+
return 0;
29+
}
30+
}

src/main/java/com/renevo/nethercore/NetherCoreRegistry.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static void registerSmelting() {
3030
GameRegistry.addSmelting(NetherCoreItems.stoneCobble, NetherCoreItems.stone, 0.2F);
3131
GameRegistry.addSmelting(NetherCoreItems.stoneBrick, NetherCoreItems.stoneBrickCracked, 0.0F);
3232

33+
// collides with Soul Shards - The old way, need to adjust if present
3334
GameRegistry.addSmelting(Blocks.soul_sand, NetherCoreItems.soulGlass, 0.0F);
3435

3536
// TODO: option to disable this
@@ -44,6 +45,11 @@ public static void registerOreDictionary() {
4445
OreDictionary.registerOre("oreNetherLapis", NetherCoreItems.netherOreLapis.copy());
4546
OreDictionary.registerOre("oreNetherDiamond", NetherCoreItems.netherOreDiamond.copy());
4647
OreDictionary.registerOre("oreNetherEmerald", NetherCoreItems.netherOreEmerald.copy());
48+
OreDictionary.registerOre("oreNetherNetherCoal", NetherCoreItems.netherOreNetherCoal.copy());
49+
}
50+
51+
public static void registerFuels() {
52+
GameRegistry.registerFuelHandler(new FuelHandler());
4753
}
4854

4955
public static void registerRecipes() {
@@ -111,6 +117,7 @@ public static void registerRecipes() {
111117
'R', Items.blaze_rod,
112118
'B', Blocks.nether_brick);
113119

120+
addCompressedRecipe(new ItemStack(NetherCoreItems.netherCoal), NetherCoreItems.netherCoalBlock);
114121
addCompressedRecipe(new ItemStack(Blocks.netherrack), NetherCoreItems.compressedNetherrackSingle);
115122
addCompressedRecipe(NetherCoreItems.compressedNetherrackSingle, NetherCoreItems.compressedNetherrackDouble);
116123
addCompressedRecipe(NetherCoreItems.compressedNetherrackDouble, NetherCoreItems.compressedNetherrackTriple);

0 commit comments

Comments
 (0)