More recipes and organized imports

This commit is contained in:
Gig 2015-04-12 20:04:12 +01:00
parent 9712d3828f
commit 9b5a57bedb
31 changed files with 149 additions and 89 deletions

View file

@ -1,10 +1,7 @@
package techreborn;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import java.io.File;
import techreborn.client.GuiHandler;
import techreborn.compat.CompatManager;
import techreborn.config.ConfigTechReborn;
@ -15,8 +12,11 @@ import techreborn.lib.ModInfo;
import techreborn.packets.PacketHandler;
import techreborn.util.LogHelper;
import techreborn.world.TROreGen;
import java.io.File;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = ModInfo.MOD_ID, name = ModInfo.MOD_NAME, version = ModInfo.MOD_VERSION, dependencies = ModInfo.MOD_DEPENDENCUIES, guiFactory = ModInfo.GUI_FACTORY_CLASS)
public class Core {

View file

@ -1,9 +1,9 @@
package techreborn.api;
import techreborn.util.ItemUtils;
import java.util.ArrayList;
import techreborn.util.ItemUtils;
public final class TechRebornAPI {
public static ArrayList<CentrifugeRecipie> centrifugeRecipies = new ArrayList<CentrifugeRecipie>();

View file

@ -2,4 +2,4 @@
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
package techreborn.api;
import cpw.mods.fml.common.API;
import cpw.mods.fml.common.API;

View file

@ -1,7 +1,8 @@
package techreborn.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -12,9 +13,8 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.util.ForgeDirection;
import techreborn.client.TechRebornCreativeTab;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockOre extends Block{

View file

@ -1,7 +1,5 @@
package techreborn.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -12,6 +10,8 @@ import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileQuantumChest;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockQuantumChest extends BlockContainer {

View file

@ -1,7 +1,5 @@
package techreborn.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -12,6 +10,8 @@ import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileQuantumTank;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockQuantumTank extends BlockContainer {

View file

@ -1,7 +1,7 @@
package techreborn.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -14,8 +14,8 @@ import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileThermalGenerator;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockThermalGenerator extends BlockContainer {

View file

@ -1,7 +1,6 @@
package techreborn.client;
import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import techreborn.client.container.ContainerQuantumChest;
@ -13,6 +12,7 @@ import techreborn.client.gui.GuiThermalGenerator;
import techreborn.tiles.TileQuantumChest;
import techreborn.tiles.TileQuantumTank;
import techreborn.tiles.TileThermalGenerator;
import cpw.mods.fml.common.network.IGuiHandler;
public class GuiHandler implements IGuiHandler {

View file

@ -5,7 +5,6 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import techreborn.client.SlotFake;
import techreborn.util.FluidUtils;
import techreborn.util.ItemUtils;

View file

@ -1,8 +1,8 @@
package techreborn.compat;
import techreborn.compat.waila.CompatModuleWaila;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import techreborn.compat.waila.CompatModuleWaila;
public class CompatManager {

View file

@ -1,9 +1,9 @@
package techreborn.compat.waila;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import mcp.mobius.waila.api.IWailaRegistrar;
import techreborn.tiles.TileMachineBase;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
public class CompatModuleWaila {

View file

@ -1,9 +1,9 @@
package techreborn.config;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
import net.minecraftforge.common.config.Configuration;
public class ConfigTechReborn {
private static ConfigTechReborn instance = null;
public static String CATEGORY_WORLD = "world";

View file

@ -1,16 +1,16 @@
package techreborn.config;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.client.config.DummyConfigElement;
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.GuiConfigEntries;
import cpw.mods.fml.client.config.GuiConfigEntries.CategoryEntry;
import cpw.mods.fml.client.config.IConfigElement;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import java.util.ArrayList;
import java.util.List;
public class TechRebornConfigGui extends GuiConfig{
public TechRebornConfigGui(GuiScreen top)

View file

@ -1,10 +1,10 @@
package techreborn.config;
import cpw.mods.fml.client.IModGuiFactory;
import java.util.Set;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import java.util.Set;
import cpw.mods.fml.client.IModGuiFactory;
public class TechRebornGUIFactory implements IModGuiFactory{
@Override

View file

@ -1,6 +1,5 @@
package techreborn.init;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@ -9,6 +8,7 @@ import techreborn.items.ItemGems;
import techreborn.items.ItemIngots;
import techreborn.items.ItemParts;
import techreborn.util.LogHelper;
import cpw.mods.fml.common.registry.GameRegistry;
public class ModItems {

View file

@ -1,21 +1,17 @@
package techreborn.init;
import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.item.IC2Items;
import ic2.core.Ic2Items;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import techreborn.api.CentrifugeRecipie;
import techreborn.api.TechRebornAPI;
import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper;
import techreborn.util.RecipeRemover;
import cpw.mods.fml.common.registry.GameRegistry;
public class ModRecipes {
public static Item dustIron;
public static void init()
{
removeIc2Recipes();
@ -30,6 +26,8 @@ public class ModRecipes {
RecipeRemover.removeAnyRecipe(IC2Items.getItem("macerator"));
RecipeRemover.removeAnyRecipe(IC2Items.getItem("miningDrill"));
RecipeRemover.removeAnyRecipe(IC2Items.getItem("diamondDrill"));
RecipeRemover.removeAnyRecipe(IC2Items.getItem("solarPanel"));
LogHelper.info("IC2 Recipes Removed");
@ -43,17 +41,20 @@ public class ModRecipes {
'H', IC2Items.getItem("reinforcedGlass"),
'C', IC2Items.getItem("electronicCircuit"),
'G', IC2Items.getItem("geothermalGenerator")});
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("macerator"),
new Object[]{"FDF", "DMD", "FCF",
'F', Items.flint,
'D', Items.diamond,
'M', IC2Items.getItem("machine"),
'C', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("miningDrill"),
new Object[]{" S ", "SCS", "SBS",
'S', "ingotSteel",
'B', IC2Items.getItem("reBattery"),
'C', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("diamondDrill"),
new Object[]{" D ", "DBD", "TCT",
'D', "gemDiamond",
@ -61,8 +62,68 @@ public class ModRecipes {
'B', IC2Items.getItem("miningDrill"),
'C', IC2Items.getItem("advancedCircuit")});
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("solarPanel"),
new Object[]{"PPP", "SZS", "CGC",
'P', "paneGlass",
'S', new ItemStack(ModItems.parts,1,1),
'Z', IC2Items.getItem("carbonPlate"),
'G', IC2Items.getItem("generator"),
'C', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,4,6),
new Object[]{"EEE", "EAE", "EEE",
'E', "gemEmerald",
'A', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,1,7),
new Object[]{"AGA", "RPB", "ASA",
'A', "ingotAluminium",
'G', "dyeGreen",
'R', "dyeRed",
'P', "paneGlass",
'B', "dyeBlue",
'S', Items.glowstone_dust,});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,4,8),
new Object[]{"DSD", "S S", "DSD",
'D', "dustDiamond",
'S', "ingotSteel"});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,16,13),
new Object[]{"CSC", "SCS", "CSC",
'S', "ingotSteel",
'C', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,2,14),
new Object[]{"TST", "SBS", "TST",
'S', "ingotSteel",
'T', "ingotTungsten",
'C', "blockSteel"});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,1,15),
new Object[]{"AAA", "AMA", "AAA",
'A', "ingotAluminium",
'M', new ItemStack(ModItems.parts,1,13)});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,1,16),
new Object[]{"AAA", "AMA", "AAA",
'A', "ingotBronze",
'M', new ItemStack(ModItems.parts,1,13)});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,1,17),
new Object[]{"AAA", "AMA", "AAA",
'A', "ingotSteel",
'M', new ItemStack(ModItems.parts,1,13)});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,1,18),
new Object[]{"AAA", "AMA", "AAA",
'A', "ingotTitanium",
'M', new ItemStack(ModItems.parts,1,13)});
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.parts,1,19),
new Object[]{"AAA", "AMA", "AAA",
'A', "ingotBrass",
'M', new ItemStack(ModItems.parts,1,13)});
LogHelper.info("Shapped Recipes Added");
}

View file

@ -1,7 +1,7 @@
package techreborn.itemblocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import techreborn.init.ModBlocks;
import techreborn.tiles.TileQuantumChest;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemBlockQuantumChest extends ItemBlock {

View file

@ -1,5 +1,7 @@
package techreborn.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -8,8 +10,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import techreborn.client.TechRebornCreativeTab;
import java.util.List;
public class ItemDusts extends ItemTR
{
public static final String[] types = new String[]

View file

@ -1,5 +1,7 @@
package techreborn.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -8,8 +10,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import techreborn.client.TechRebornCreativeTab;
import java.util.List;
public class ItemGems extends Item{
public static final String[] types = new String[]
{

View file

@ -1,5 +1,7 @@
package techreborn.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -8,8 +10,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import techreborn.client.TechRebornCreativeTab;
import java.util.List;
public class ItemIngots extends Item{
public static final String[] types = new String[]
{

View file

@ -1,5 +1,7 @@
package techreborn.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -8,8 +10,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import techreborn.client.TechRebornCreativeTab;
import java.util.List;
public class ItemParts extends Item{
public static final String[] types = new String[]
{

View file

@ -1,20 +1,21 @@
package techreborn.packets;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
import cpw.mods.fml.common.network.FMLOutboundHandler;
import cpw.mods.fml.relauncher.Side;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.Packet;
import net.minecraft.world.World;
import java.io.IOException;
import java.util.EnumMap;
import java.util.logging.Logger;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.Packet;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
import cpw.mods.fml.common.network.FMLOutboundHandler;
import cpw.mods.fml.relauncher.Side;
public class PacketHandler extends FMLIndexedMessageToMessageCodec<SimplePacket> {
private static EnumMap<Side, FMLEmbeddedChannel> channels;

View file

@ -1,7 +1,9 @@
package techreborn.packets;
import com.google.common.base.Charsets;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
@ -9,7 +11,7 @@ import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import java.io.IOException;
import com.google.common.base.Charsets;
public abstract class SimplePacket {
protected EntityPlayer player;

View file

@ -1,11 +1,11 @@
package techreborn.tiles;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.tileentity.TileEntity;
import techreborn.packets.PacketHandler;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TileMachineBase extends TileEntity {

View file

@ -1,6 +1,9 @@
package techreborn.tiles;
import ic2.api.tile.IWrenchable;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@ -8,14 +11,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import techreborn.init.ModBlocks;
import techreborn.util.FluidUtils;
import techreborn.util.Inventory;
import techreborn.util.ItemUtils;
import java.util.List;
public class TileQuantumChest extends TileMachineBase implements IInventory ,IWrenchable{

View file

@ -1,7 +1,9 @@
package techreborn.tiles;
import ic2.api.tile.IWrenchable;
import io.netty.channel.ChannelHandler;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@ -9,20 +11,16 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import techreborn.init.ModBlocks;
import techreborn.packets.PacketHandler;
import techreborn.util.FluidUtils;
import techreborn.util.Inventory;
import techreborn.util.Tank;
import java.util.List;
public class TileQuantumTank extends TileMachineBase implements IFluidHandler, IInventory, IWrenchable {
public Tank tank = new Tank("TileQuantumTank", Integer.MAX_VALUE, this);

View file

@ -1,14 +1,12 @@
package techreborn.util;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
import net.minecraftforge.oredict.OreDictionary;
public class FluidUtils {

View file

@ -1,8 +1,9 @@
package techreborn.util;
import cpw.mods.fml.common.FMLLog;
import org.apache.logging.log4j.Level;
import techreborn.lib.ModInfo;
import cpw.mods.fml.common.FMLLog;
public class LogHelper {

View file

@ -1,12 +1,12 @@
package techreborn.util;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.ShapedRecipes;
import java.util.List;
public class RecipeRemover
{
public static void removeShapedRecipes(List<ItemStack> removelist)

View file

@ -1,6 +1,7 @@
package techreborn.world;
import cpw.mods.fml.common.IWorldGenerator;
import java.util.Random;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
@ -8,8 +9,7 @@ import net.minecraft.world.gen.feature.WorldGenMinable;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
import techreborn.util.LogHelper;
import java.util.Random;
import cpw.mods.fml.common.IWorldGenerator;
public class TROreGen implements IWorldGenerator{
public static ConfigTechReborn config;

View file

@ -125,4 +125,5 @@ item.techreborn.part.AluminiumMachineHull.name=Aluminium Machine Hull
item.techreborn.part.BronzeMachineHull.name=Bronze Machine Hull
item.techreborn.part.SteelMachineHull.name=Steel Machine Hull
item.techreborn.part.TitaniumMachineHull.name=Titanium Machine Hull
item.techreborn.part.BrassMachineHull.name=Brass Machine Hull