Skip to content

Commit

Permalink
Reorganize folders for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mDiyo committed Jun 5, 2014
1 parent 2c14f31 commit e2f0558
Show file tree
Hide file tree
Showing 370 changed files with 4,277 additions and 4,791 deletions.
@@ -1,7 +1,6 @@
package tconstruct.plugins;

import static tconstruct.TConstruct.moduleLoader;
import tconstruct.plugins.fmp.ForgeMultiPart;
import tconstruct.plugins.ic2.IC2;
import tconstruct.plugins.imc.AppEng;
import tconstruct.plugins.imc.BuildcraftTransport;
Expand All @@ -24,7 +23,6 @@ public static void registerModules()
// Register the remaining plugin classes normally
moduleLoader.registerModule(AppEng.class);
moduleLoader.registerModule(BuildcraftTransport.class);
moduleLoader.registerModule(ForgeMultiPart.class);
moduleLoader.registerModule(IC2.class);
moduleLoader.registerModule(Thaumcraft.class);
moduleLoader.registerModule(NotEnoughItems.class);
Expand Down
File renamed without changes.
42 changes: 14 additions & 28 deletions src/main/java/tconstruct/TConstruct.java
Expand Up @@ -11,32 +11,29 @@
import tconstruct.achievements.TAchievements;
import tconstruct.client.TControls;
import tconstruct.client.event.EventCloakRender;
import tconstruct.common.TContent;
import tconstruct.common.TProxyCommon;
import tconstruct.common.TRecipes;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.crafting.Detailing;
import tconstruct.library.crafting.LiquidCasting;
import tconstruct.plugins.PluginController;
import tconstruct.mechworks.landmine.behavior.Behavior;
import tconstruct.mechworks.landmine.behavior.stackCombo.SpecialStackHandler;
import tconstruct.util.EnvironmentChecks;
import tconstruct.util.TCraftingHandler;
import tconstruct.util.TEventHandler;
import tconstruct.util.TEventHandlerAchievement;
import tconstruct.util.config.DimensionBlacklist;
import tconstruct.util.config.PHConstruct;
import tconstruct.util.landmine.behavior.Behavior;
import tconstruct.util.landmine.behavior.stackCombo.SpecialStackHandler;
import tconstruct.util.network.packet.PacketPipeline;
import tconstruct.util.player.TPlayerHandler;
import tconstruct.worldgen.SlimeIslandGen;
import tconstruct.worldgen.TBaseWorldGenerator;
import tconstruct.worldgen.TerrainGenEventHandler;
import tconstruct.worldgen.village.ComponentSmeltery;
import tconstruct.worldgen.village.ComponentToolWorkshop;
import tconstruct.worldgen.village.TVillageTrades;
import tconstruct.worldgen.village.VillageSmelteryHandler;
import tconstruct.worldgen.village.VillageToolStationHandler;
import tconstruct.world.TinkerWorld;
import tconstruct.world.gen.SlimeIslandGen;
import tconstruct.world.gen.TBaseWorldGenerator;
import tconstruct.world.gen.TerrainGenEventHandler;
import tconstruct.world.village.ComponentSmeltery;
import tconstruct.world.village.ComponentToolWorkshop;
import tconstruct.world.village.TVillageTrades;
import tconstruct.world.village.VillageSmelteryHandler;
import tconstruct.world.village.VillageToolStationHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
Expand Down Expand Up @@ -103,7 +100,7 @@ public TConstruct()

EnvironmentChecks.verifyEnvironmentSanity();
MinecraftForge.EVENT_BUS.register(events = new TEventHandler());
PluginController.registerModules();
//PluginController.registerModules();
}

@EventHandler
Expand All @@ -120,14 +117,9 @@ public void preInit (FMLPreInitializationEvent event)
basinCasting = new LiquidCasting();
chiselDetailing = new Detailing();

content = new TContent();

recipes = new TRecipes();

events = new TEventHandler();
MinecraftForge.EVENT_BUS.register(events);
MinecraftForge.EVENT_BUS.register(new TEventHandlerAchievement());
recipes.oreRegistry();

proxy.registerRenderer();
proxy.addNames();
Expand All @@ -137,7 +129,7 @@ public void preInit (FMLPreInitializationEvent event)

GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0);
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler());
GameRegistry.registerFuelHandler(content);
//GameRegistry.registerFuelHandler(content);
FMLCommonHandler.instance().bus().register(new TCraftingHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

Expand Down Expand Up @@ -183,7 +175,7 @@ public void init (FMLInitializationEvent event)
}

DimensionBlacklist.getBadBimensions();
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TRepo.slimePool, 2), 2);
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TinkerWorld.slimePool, 2), 2);

if (PHConstruct.achievementsEnabled)
{
Expand All @@ -200,10 +192,6 @@ public void postInit (FMLPostInitializationEvent evt)
packetPipeline.postInitialise();
Behavior.registerBuiltInBehaviors();
SpecialStackHandler.registerBuiltInStackHandlers();
recipes.modIntegration();
recipes.addOreDictionarySmelteryRecipes();
content.createEntities();
recipes.modRecipes();

moduleLoader.postInit();
}
Expand All @@ -223,8 +211,6 @@ public static Detailing getChiselDetailing ()
return chiselDetailing;
}

public static TContent content;
public static TRecipes recipes;
public static TEventHandler events;
public static TPlayerHandler playerTracker;
public static LiquidCasting tableCasting;
Expand Down
209 changes: 209 additions & 0 deletions src/main/java/tconstruct/armor/TinkerArmor.java
@@ -0,0 +1,209 @@
package tconstruct.armor;

import tconstruct.TConstruct;
import tconstruct.armor.blocks.DryingRack;
import tconstruct.armor.items.ArmorBasic;
import tconstruct.armor.items.DiamondApple;
import tconstruct.armor.items.ExoArmor;
import tconstruct.armor.items.HeartCanister;
import tconstruct.armor.items.Jerky;
import tconstruct.armor.items.Knapsack;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.armor.EnumArmorPart;
import tconstruct.library.crafting.DryingRackRecipes;
import tconstruct.library.crafting.LiquidCasting;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.tools.TinkerTools;
import tconstruct.util.config.PHConstruct;
import tconstruct.world.TinkerWorld;
import tconstruct.world.items.GoldenHead;
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.oredict.ShapedOreRecipe;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
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;

@Mod(modid = "TinkerArmor", name = "TinkerArmor", version = "${tinkerarmorversion}")
public class TinkerArmor
{
@Instance("TinkerArmor")
public static TinkerArmor instance;
public static Item diamondApple;
public static Item jerky;
// public static Item stonePattern;
// public static Item netherPattern;
public static Block dryingRack;
// Wearables
public static Item heavyHelmet;
public static Item heavyChestplate;
public static Item heavyPants;
public static Item heavyBoots;
public static Item glove;
public static Item knapsack;
public static Item heartCanister;
// Armor - basic
public static Item helmetWood;
public static Item chestplateWood;
public static Item leggingsWood;
// Armor - exosuit
public static Item exoGoggles;
public static Item exoChest;
public static Item exoPants;
public static Item exoShoes;
public static Item bootsWood;
public static ArmorMaterial materialWood;

@EventHandler
public void preInit (FMLPreInitializationEvent event)
{


TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
TinkerArmor.diamondApple = new DiamondApple().setUnlocalizedName("tconstruct.apple.diamond");
GameRegistry.registerItem(TinkerArmor.diamondApple, "diamondApple");
boolean foodOverhaul = false;
if (Loader.isModLoaded("HungerOverhaul") || Loader.isModLoaded("fc_food"))
{
foodOverhaul = true;
}

TinkerArmor.jerky = new Jerky(foodOverhaul).setUnlocalizedName("tconstruct.jerky");
GameRegistry.registerItem(TinkerArmor.jerky, "jerky");

// Wearables
// heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet,
// 0).setUnlocalizedName("tconstruct.HeavyHelmet");
TinkerArmor.heartCanister = new HeartCanister().setUnlocalizedName("tconstruct.canister");
// heavyBoots = new TArmorBase(PHConstruct.heavyBoots,
// 3).setUnlocalizedName("tconstruct.HeavyBoots");
// glove = new
// Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove");
TinkerArmor.knapsack = new Knapsack().setUnlocalizedName("tconstruct.storage");
TinkerTools.goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
// GameRegistry.registerItem(TRepo.heavyHelmet, "heavyHelmet");
GameRegistry.registerItem(TinkerArmor.heartCanister, "heartCanister");
// GameRegistry.registerItem(TRepo.heavyBoots, "heavyBoots");
// GameRegistry.registerItem(TRepo.glove, "glove");
GameRegistry.registerItem(TinkerArmor.knapsack, "knapsack");

LiquidCasting basinCasting = TConstruct.getBasinCasting();
TinkerArmor.materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] { 1, 2, 2, 1 }, 3);
TinkerArmor.helmetWood = new ArmorBasic(TinkerArmor.materialWood, 0, "wood").setUnlocalizedName("tconstruct.helmetWood");
TinkerArmor.chestplateWood = new ArmorBasic(TinkerArmor.materialWood, 1, "wood").setUnlocalizedName("tconstruct.chestplateWood");
TinkerArmor.leggingsWood = new ArmorBasic(TinkerArmor.materialWood, 2, "wood").setUnlocalizedName("tconstruct.leggingsWood");
TinkerArmor.bootsWood = new ArmorBasic(TinkerArmor.materialWood, 3, "wood").setUnlocalizedName("tconstruct.bootsWood");
GameRegistry.registerItem(TinkerArmor.helmetWood, "helmetWood");
GameRegistry.registerItem(TinkerArmor.chestplateWood, "chestplateWood");
GameRegistry.registerItem(TinkerArmor.leggingsWood, "leggingsWood");
GameRegistry.registerItem(TinkerArmor.bootsWood, "bootsWood");

TinkerArmor.exoGoggles = new ExoArmor(EnumArmorPart.HELMET, "exosuit").setUnlocalizedName("tconstruct.exoGoggles");
TinkerArmor.exoChest = new ExoArmor(EnumArmorPart.CHEST, "exosuit").setUnlocalizedName("tconstruct.exoChest");
TinkerArmor.exoPants = new ExoArmor(EnumArmorPart.PANTS, "exosuit").setUnlocalizedName("tconstruct.exoPants");
TinkerArmor.exoShoes = new ExoArmor(EnumArmorPart.SHOES, "exosuit").setUnlocalizedName("tconstruct.exoShoes");

GameRegistry.registerItem(TinkerArmor.exoGoggles, "helmetExo");
GameRegistry.registerItem(TinkerArmor.exoChest, "chestplateExo");
GameRegistry.registerItem(TinkerArmor.exoPants, "leggingsExo");
GameRegistry.registerItem(TinkerArmor.exoShoes, "bootsExo");

TConstructRegistry.addItemStackToDirectory("diamondApple", new ItemStack(TinkerArmor.diamondApple, 1, 0));

TConstructRegistry.addItemStackToDirectory("canisterEmpty", new ItemStack(TinkerArmor.heartCanister, 1, 0));
TConstructRegistry.addItemStackToDirectory("miniRedHeart", new ItemStack(TinkerArmor.heartCanister, 1, 1));
TConstructRegistry.addItemStackToDirectory("canisterRedHeart", new ItemStack(TinkerArmor.heartCanister, 1, 2));
}

@EventHandler
public void init (FMLInitializationEvent event)
{
craftingTableRecipes();
addRecipesForDryingRack();
}

@EventHandler
public void postInit (FMLPostInitializationEvent evt)
{

}

private void craftingTableRecipes ()
{

// Armor Recipes
Object[] helm = new String[] { "www", "w w" };
Object[] chest = new String[] { "w w", "www", "www" };
Object[] pants = new String[] { "www", "w w", "w w" };
Object[] shoes = new String[] { "w w", "w w" };
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.helmetWood, helm, 'w', "logWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.chestplateWood, chest, 'w', "logWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.leggingsWood, pants, 'w', "logWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.bootsWood, shoes, 'w', "logWood"));

ItemStack exoGoggleStack = new ItemStack(TinkerArmor.exoGoggles);
ItemStack exoChestStack = new ItemStack(TinkerArmor.exoChest);
ItemStack exoPantsStack = new ItemStack(TinkerArmor.exoPants);
ItemStack exoShoesStack = new ItemStack(TinkerArmor.exoShoes);
if (PHConstruct.exoCraftingEnabled)
{
ToolBuilder.instance.addArmorTag(exoGoggleStack);
ToolBuilder.instance.addArmorTag(exoChestStack);
ToolBuilder.instance.addArmorTag(exoPantsStack);
ToolBuilder.instance.addArmorTag(exoShoesStack);
GameRegistry.addShapedRecipe(exoGoggleStack, helm, 'w', new ItemStack(TinkerTools.largePlate, 1, 14));
GameRegistry.addShapedRecipe(exoChestStack, chest, 'w', new ItemStack(TinkerTools.largePlate, 1, 14));
GameRegistry.addShapedRecipe(exoPantsStack, pants, 'w', new ItemStack(TinkerTools.largePlate, 1, 14));
GameRegistry.addShapedRecipe(exoShoesStack, shoes, 'w', new ItemStack(TinkerTools.largePlate, 1, 14));
}

// Accessories
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerArmor.heartCanister, 1, 0), "##", "##", '#', "ingotAluminum"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerArmor.heartCanister, 1, 0), "##", "##", '#', "ingotAluminium"));
// GameRegistry.addRecipe(new ShapedOreRecipe(new
// ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#',
// "ingotNaturalAluminum"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerArmor.heartCanister, 1, 0), " # ", "#B#", " # ", '#', "ingotTin", 'B', Items.bone));

GameRegistry.addRecipe(new ItemStack(TinkerArmor.diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Items.diamond), '#', new ItemStack(Items.apple));
GameRegistry.addShapelessRecipe(new ItemStack(TinkerArmor.heartCanister, 1, 2), new ItemStack(TinkerArmor.diamondApple), new ItemStack(TinkerTools.materials, 1, 8), new ItemStack(
TinkerArmor.heartCanister, 1, 0), new ItemStack(TinkerArmor.heartCanister, 1, 1));
GameRegistry.addShapelessRecipe(new ItemStack(TinkerArmor.heartCanister, 1, 4), new ItemStack(TinkerArmor.heartCanister, 1, 2), new ItemStack(TinkerArmor.heartCanister, 1, 3), new ItemStack(
Items.golden_apple, 1, 1));
//GameRegistry.addShapelessRecipe(new ItemStack(heartCanister, 1, 6), new ItemStack(heartCanister, 1, 0), new ItemStack(heartCanister, 1, 4), new ItemStack(heartCanister, 1, 5));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerArmor.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TinkerTools.toughRod, 1, 2),
'm', "ingotGold"));
ItemStack aluBrass = new ItemStack(TinkerTools.materials, 1, 14);
GameRegistry.addRecipe(new ItemStack(TinkerArmor.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TinkerTools.toughRod, 1, 2), 'm', aluBrass);
// Drying Rack Recipes
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerArmor.dryingRack, 1, 0), "bbb", 'b', "slabWood"));
}

protected static void addRecipesForDryingRack ()
{
// Drying rack
DryingRackRecipes.addDryingRecipe(Items.beef, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 0));
DryingRackRecipes.addDryingRecipe(Items.chicken, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 1));
DryingRackRecipes.addDryingRecipe(Items.porkchop, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 2));
// DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new
// ItemStack(TRepo.jerky, 1, 3));
DryingRackRecipes.addDryingRecipe(Items.fish, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 4));
DryingRackRecipes.addDryingRecipe(Items.rotten_flesh, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 5));
DryingRackRecipes.addDryingRecipe(new ItemStack(TinkerWorld.strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 6));
DryingRackRecipes.addDryingRecipe(new ItemStack(TinkerWorld.strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 7));

// DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.jerky, 1, 5),
// 20 * 60 * 10, Item.leather);
}
}
@@ -1,4 +1,4 @@
package tconstruct.blocks;
package tconstruct.armor.blocks;

import java.util.List;

Expand All @@ -16,8 +16,8 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tconstruct.TConstruct;
import tconstruct.armor.modelblock.DryingRackRender;
import tconstruct.blocks.logic.DryingRackLogic;
import tconstruct.client.block.DryingRackRender;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.tools.AbilityHelper;
import cpw.mods.fml.relauncher.Side;
Expand Down
@@ -1,9 +1,10 @@
package tconstruct.inventory;
package tconstruct.armor.inventory;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import tconstruct.smeltery.inventory.ActiveContainer;
import tconstruct.util.player.ArmorExtended;

public class ArmorExtendedContainer extends ActiveContainer
Expand Down
@@ -1,4 +1,4 @@
package tconstruct.inventory;
package tconstruct.armor.inventory;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
Expand Down
@@ -1,4 +1,4 @@
package tconstruct.inventory;
package tconstruct.armor.inventory;

import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
Expand Down
@@ -1,9 +1,9 @@
package tconstruct.inventory;
package tconstruct.armor.inventory;

import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import tconstruct.util.landmine.behavior.Behavior;
import tconstruct.mechworks.landmine.behavior.Behavior;

public class SlotBehavedOnly extends Slot
{
Expand Down
@@ -1,4 +1,4 @@
package tconstruct.inventory;
package tconstruct.armor.inventory;

import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
Expand Down
@@ -1,4 +1,4 @@
package tconstruct.inventory;
package tconstruct.armor.inventory;

import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
Expand Down

0 comments on commit e2f0558

Please sign in to comment.