Skip to content

Commit

Permalink
Start working on adding recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Sep 20, 2016
1 parent 1a057b4 commit 854854f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
30 changes: 18 additions & 12 deletions src/main/java/com/progwml6/natura/nether/NaturaNether.java
@@ -1,7 +1,5 @@
package com.progwml6.natura.nether;

import org.apache.logging.log4j.Logger;

import com.google.common.eventbus.Subscribe;
import com.progwml6.natura.common.CommonProxy;
import com.progwml6.natura.common.NaturaPulse;
Expand All @@ -18,18 +16,19 @@
import com.progwml6.natura.nether.block.slabs.BlockNetherSlab;
import com.progwml6.natura.nether.block.soil.BlockTaintedSoil;
import com.progwml6.natura.shared.NaturaCommons;

import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import org.apache.logging.log4j.Logger;
import slimeknights.mantle.item.ItemBlockMeta;
import slimeknights.mantle.pulsar.pulse.Pulse;

@Pulse(id = NaturaNether.PulseId, description = "All of the nether blocks including trees")
public class NaturaNether extends NaturaPulse
{
public class NaturaNether extends NaturaPulse {
public static final String PulseId = "NaturaNether";

static final Logger log = Util.getLogger(PulseId);
Expand All @@ -54,16 +53,15 @@ public class NaturaNether extends NaturaPulse
public static Block netherStairsBloodwood;
public static Block netherStairsDarkwood;
public static Block netherStairsFusewood;

public static Block netherBerryBushBlightberry;
public static Block netherBerryBushDuskberry;
public static Block netherBerryBushSkyberry;
public static Block netherBerryBushStingberry;
//@formatter:on

@Subscribe
public void preInit(FMLPreInitializationEvent event)
{
public void preInit (FMLPreInitializationEvent event) {
netherLog = registerEnumBlock(new BlockNetherLog(), "nether_logs");

netherLeaves = registerBlock(new ItemBlockLeaves(new BlockNetherLeaves()), "nether_leaves");
Expand Down Expand Up @@ -96,14 +94,22 @@ public void preInit(FMLPreInitializationEvent event)
}

@Subscribe
public void init(FMLInitializationEvent event)
{
public void init (FMLInitializationEvent event) {
proxy.init();
registerRecipes();
}

@Subscribe
public void postInit(FMLPostInitializationEvent event)
{
public void postInit (FMLPostInitializationEvent event) {
proxy.postInit();
}

private void registerRecipes () {
GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.DARKWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.DARKWOOD.getMeta()));
//TODO enable this when fixed
//GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.BLOODWOOD.getMeta()));
GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.FUSEWOOD.getMeta()));
GameRegistry.addRecipe(new ItemStack(netherPlanks, 4, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta()), "w", 'w', new ItemStack(netherLog, 1, BlockNetherLog.LogType.GHOSTWOOD.getMeta()));

}
}
18 changes: 17 additions & 1 deletion src/main/java/com/progwml6/natura/overworld/NaturaOverworld.java
@@ -1,5 +1,6 @@
package com.progwml6.natura.overworld;

import net.minecraftforge.fml.common.registry.GameRegistry;
import org.apache.logging.log4j.Logger;

import com.google.common.eventbus.Subscribe;
Expand Down Expand Up @@ -131,11 +132,26 @@ public void preInit(FMLPreInitializationEvent event)
public void init(FMLInitializationEvent event)
{
proxy.init();
registerRecipes();
}

@Subscribe
public void postInit(FMLPostInitializationEvent event)
{
proxy.postInit();
}
}

private void registerRecipes() {
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.MAPLE.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.MAPLE.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.SILVERBELL.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.SILVERBELL.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.AMARANTH.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.AMARANTH.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.TIGER.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog.LogType.TIGER.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.WILLOW.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog2.LogType.WILLOW.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.EUCALYPTUS.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog2.LogType.EUCALYPTUS.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.HOPSEED.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog2.LogType.HOPSEED.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.SAKURA.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockOverworldLog2.LogType.SAKURA.getMeta()));
GameRegistry.addRecipe(new ItemStack(overworldPlanks, 4, BlockOverworldPlanks.PlankType.REDWOOD.getMeta()), "w", 'w', new ItemStack(overworldLog, 1, BlockRedwoodLog.RedwoodType.BARK.getMeta()));
//TODO 1.10 are we missing redwood log > planks??

}
}

0 comments on commit 854854f

Please sign in to comment.