Skip to content

Commit

Permalink
make recipe variable in tconstruct that is static, remove static call…
Browse files Browse the repository at this point in the history
…s on methods in trecipes
  • Loading branch information
progwml6 committed Dec 13, 2013
1 parent 90f09b7 commit 931b2bd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
31 changes: 16 additions & 15 deletions src/main/java/tconstruct/TConstruct.java
Expand Up @@ -70,11 +70,11 @@ public TConstruct()
{
System.out.println("[TConstruct] Preparing to take over the world");
}
System.out.println("[UUID] Armor Speed: "+UUID.randomUUID());
System.out.println("[UUID] Armor Attack: "+UUID.randomUUID());
System.out.println("[UUID] Armor Health: "+UUID.randomUUID());
System.out.println("[UUID] Armor Knockback: "+UUID.randomUUID());

logger.info("[UUID] Armor Speed: " + UUID.randomUUID());
logger.info("[UUID] Armor Attack: " + UUID.randomUUID());
logger.info("[UUID] Armor Health: " + UUID.randomUUID());
logger.info("[UUID] Armor Knockback: " + UUID.randomUUID());

EnvironmentChecks.verifyEnvironmentSanity();
MinecraftForge.EVENT_BUS.register(events = new TEventHandler());
Expand All @@ -97,7 +97,7 @@ public void preInit (FMLPreInitializationEvent event)
content = new TContent();

MinecraftForge.EVENT_BUS.register(new TEventHandlerAchievement());
TRecipes.oreRegistry();
recipes.oreRegistry();

proxy.registerRenderer();
proxy.addNames();
Expand All @@ -121,15 +121,15 @@ public void preInit (FMLPreInitializationEvent event)
VillagerRegistry.instance().registerVillageCreationHandler(new VillageSmelteryHandler());
try
{
// if (new CallableMinecraftVersion(null).minecraftVersion().equals("1.6.4"))
// {
MapGenStructureIO.func_143031_a(ComponentToolWorkshop.class, "TConstruct:ToolWorkshopStructure");
MapGenStructureIO.func_143031_a(ComponentSmeltery.class, "TConstruct:SmelteryStructure");
// }
// if (new CallableMinecraftVersion(null).minecraftVersion().equals("1.6.4"))
// {
MapGenStructureIO.func_143031_a(ComponentToolWorkshop.class, "TConstruct:ToolWorkshopStructure");
MapGenStructureIO.func_143031_a(ComponentSmeltery.class, "TConstruct:SmelteryStructure");
// }
}
catch (Throwable e)
{

logger.severe("Error registering TConstruct Structures with Vanilla Minecraft: this is expected in versions earlier than 1.6.4");
}
}

Expand Down Expand Up @@ -165,10 +165,10 @@ public void postInit (FMLPostInitializationEvent evt)
proxy.postInit();
Behavior.registerBuiltInBehaviors();
SpecialStackHandler.registerBuiltInStackHandlers();
TRecipes.modIntegration();
TRecipes.addOreDictionarySmelteryRecipes();
recipes.modIntegration();
recipes.addOreDictionarySmelteryRecipes();
content.createEntities();
TRecipes.modRecipes();
recipes.modRecipes();

PluginController.getController().postInit();
}
Expand All @@ -189,6 +189,7 @@ public static Detailing getChiselDetailing ()
}

public static TContent content;
public static TRecipes recipes;
public static TEventHandler events;
public static TPlayerHandler playerTracker;
public static LiquidCasting tableCasting;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/tconstruct/common/TRecipes.java
Expand Up @@ -162,7 +162,7 @@ static void registerItemRecipes ()

}

public static void addOreDictionarySmelteryRecipes ()
public void addOreDictionarySmelteryRecipes ()
{
List<FluidType> exceptions = Arrays.asList(new FluidType[] { FluidType.Water, FluidType.Stone, FluidType.Ender, FluidType.Glass, FluidType.Slime });
for (FluidType ft : FluidType.values())
Expand Down Expand Up @@ -791,7 +791,7 @@ protected static void addRecipesForChisel ()
chiseling.addDetailing(TRepo.smeltery, 9, TRepo.smeltery, 10, TRepo.chisel);
}

public static void oreRegistry ()
public void oreRegistry ()
{
OreDictionary.registerOre("oreCobalt", new ItemStack(TRepo.oreSlag, 1, 1));
OreDictionary.registerOre("oreArdite", new ItemStack(TRepo.oreSlag, 1, 2));
Expand Down Expand Up @@ -916,7 +916,7 @@ private static void ensureOreIsRegistered (String oreName, ItemStack is)
}
}

public static void addShapedRecipeFirst (List recipeList, ItemStack itemstack, Object... objArray)
public void addShapedRecipeFirst (List recipeList, ItemStack itemstack, Object... objArray)
{
String var3 = "";
int var4 = 0;
Expand Down Expand Up @@ -989,7 +989,7 @@ else if (objArray[var4 + 1] instanceof ItemStack)
recipeList.add(0, var17);
}

public static void modRecipes ()
public void modRecipes ()
{
if (!TRepo.initRecipes)
{
Expand Down Expand Up @@ -1235,7 +1235,7 @@ protected static void addRecipesForSmeltery ()
Smeltery.addMelting(FluidType.Gold, new ItemStack(Item.axeGold, 1, 0), 0, TConstruct.ingotLiquidValue * 3);
}

public static void modIntegration ()
public void modIntegration ()
{
/* Natura */
Block taintedSoil = GameRegistry.findBlock("Natura", "soil.tainted");
Expand Down Expand Up @@ -1385,7 +1385,7 @@ public static void modIntegration ()
}
}

public static Object getStaticItem (String name, String classPackage)
public Object getStaticItem (String name, String classPackage)
{
try
{
Expand Down

0 comments on commit 931b2bd

Please sign in to comment.