Modularize TConstruct using Pulsar

This commit is contained in:
mDiyo committed 2014-06-30 14:57:06 -08:00
1 parent edfe9ae7d4
commit 3de90bded2
24 files changed
+511 -3048

No files matched your search

+35 -28
View File
@@ -3,21 +3,25 @@ package tconstruct;
import java.util.Random;
import mantle.lib.TabTools;
import mantle.module.ModuleController;
import mantle.pulsar.control.PulseManager;
import mantle.pulsar.pulse.IPulse;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraftforge.common.MinecraftForge;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import tconstruct.armor.TinkerArmor;
import tconstruct.client.TControls;
import tconstruct.client.event.EventCloakRender;
import tconstruct.common.TProxyCommon;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.crafting.Detailing;
import tconstruct.library.crafting.LiquidCasting;
import tconstruct.mechworks.TinkerMechworks;
import tconstruct.mechworks.landmine.behavior.Behavior;
import tconstruct.mechworks.landmine.behavior.stackCombo.SpecialStackHandler;
import tconstruct.smeltery.TinkerSmeltery;
import tconstruct.tools.TinkerTools;
import tconstruct.util.EnvironmentChecks;
import tconstruct.util.config.DimensionBlacklist;
import tconstruct.util.config.PHConstruct;
@@ -25,8 +29,6 @@ import tconstruct.util.network.packet.PacketPipeline;
import tconstruct.util.player.TPlayerHandler;
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;
@@ -54,7 +56,7 @@ import cpw.mods.fml.relauncher.Side;
*/
@Mod(modid = "TConstruct", name = "TConstruct", version = "${version}",
dependencies = "required-after:Forge@[9.11,);required-after:Mantle;after:ForgeMultipart;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
dependencies = "required-after:Forge@[9.11,);required-after:Mantle;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
public class TConstruct
{
/** The value of one ingot in millibuckets */
@@ -65,32 +67,23 @@ public class TConstruct
public static final int nuggetLiquidValue = ingotLiquidValue / 9;
public static final int liquidUpdateAmount = 6;
// the entire mod
public static final String modID = "TConstruct";
// Shared mod logger
public static final Logger logger = LogManager.getLogger(modID);
public static final PacketPipeline packetPipeline = new PacketPipeline();
public static Random random = new Random();
/* Instance of this mod, used for grabbing prototype fields */
@Instance(modID)
public static TConstruct instance;
/* Proxies for sides, used for graphics processing */
/* Proxies for sides, used for graphics processing and client controls */
@SidedProxy(clientSide = "tconstruct.client.TProxyClient", serverSide = "tconstruct.common.TProxyCommon")
public static TProxyCommon proxy;
// Module loader
public static final ModuleController moduleLoader = new ModuleController("TDynstruct.cfg", modID);
// The packet pipeline
public static final PacketPipeline packetPipeline = new PacketPipeline();
public static Random random = new Random();
/* Loads modules in a way that doesn't clutter the @Mod list */
private PulseManager pulsar = new PulseManager(modID); //Scheduled to change shortly.
public TConstruct()
{
//logger.setParent(FMLCommonHandler.instance().getFMLLogger());
if (Loader.isModLoaded("Natura"))
{
logger.info("Natura, what are we going to do tomorrow night?");
@@ -102,14 +95,29 @@ public class TConstruct
}
EnvironmentChecks.verifyEnvironmentSanity();
//PluginController.registerModules();
}
@EventHandler
public void preInit (FMLPreInitializationEvent event)
{
PHConstruct.initProps(event.getModConfigurationDirectory());
//Temporarily hijacked
if (PHConstruct.worldModule)
pulsar.registerPulse(new TinkerWorld());
if (PHConstruct.toolModule)
pulsar.registerPulse(new TinkerTools());
if (PHConstruct.smelteryModule)
pulsar.registerPulse(new TinkerSmeltery());
if (PHConstruct.mechworksModule)
pulsar.registerPulse(new TinkerMechworks());
if (PHConstruct.armorModule)
pulsar.registerPulse(new TinkerArmor());
/*if (PHConstruct.prayerModule)
pulsar.registerPulse(new TinkerPrayers());
if (PHConstruct.cropifyModule)
pulsar.registerPulse(new TinkerCropify());*/
PHConstruct.initProps(event.getSuggestedConfigurationFile());
TConstructRegistry.materialTab = new TabTools("TConstructMaterials");
TConstructRegistry.toolTab = new TabTools("TConstructTools");
TConstructRegistry.partTab = new TabTools("TConstructParts");
@@ -119,10 +127,7 @@ public class TConstruct
basinCasting = new LiquidCasting();
chiselDetailing = new Detailing();
GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0);
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler());
//GameRegistry.registerFuelHandler(content);
//NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
if (PHConstruct.addToVillages)
{
@@ -147,13 +152,14 @@ public class TConstruct
// GameRegistry.registerPlayerTracker(playerTracker);
FMLCommonHandler.instance().bus().register(playerTracker);
MinecraftForge.EVENT_BUS.register(playerTracker);
NetworkRegistry.INSTANCE.registerGuiHandler(TConstruct.instance, proxy);
if (event.getSide() == Side.CLIENT)
{
FMLCommonHandler.instance().bus().register(new TControls());
}
moduleLoader.preInit();
pulsar.preInit(event);
}
@EventHandler
@@ -168,17 +174,18 @@ public class TConstruct
DimensionBlacklist.getBadBimensions();
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TinkerWorld.slimePool, 2), 2);
moduleLoader.init();
pulsar.init(event);
}
@EventHandler
public void postInit (FMLPostInitializationEvent evt)
public void postInit (FMLPostInitializationEvent event)
{
packetPipeline.postInitialise();
Behavior.registerBuiltInBehaviors();
SpecialStackHandler.registerBuiltInStackHandlers();
moduleLoader.postInit();
proxy.initialize();
pulsar.postInit(event);
}
public static LiquidCasting getTableCasting ()
@@ -47,6 +47,7 @@ import tconstruct.client.tabs.InventoryTabArmorExtended;
import tconstruct.client.tabs.InventoryTabKnapsack;
import tconstruct.client.tabs.InventoryTabVanilla;
import tconstruct.client.tabs.TabRegistry;
import tconstruct.common.TProxyCommon;
import tconstruct.mechworks.MechworksProxyCommon;
import tconstruct.mechworks.inventory.ContainerLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
@@ -68,9 +69,19 @@ public class ArmorProxyClient extends ArmorProxyCommon
{
public ArmorProxyClient()
{
registerGuiHandler();
MinecraftForge.EVENT_BUS.register(this);
}
@Override
protected void registerGuiHandler()
{
super.registerGuiHandler();
TProxyCommon.registerClientGuiHandler(inventoryGui, this);
TProxyCommon.registerClientGuiHandler(armorGuiID, this);
TProxyCommon.registerClientGuiHandler(knapsackGuiID, this);
}
@Override
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
@@ -2,6 +2,7 @@ package tconstruct.armor;
import tconstruct.armor.inventory.ArmorExtendedContainer;
import tconstruct.armor.inventory.KnapsackContainer;
import tconstruct.common.TProxyCommon;
import tconstruct.util.player.TPlayerStats;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
@@ -12,6 +13,17 @@ public class ArmorProxyCommon implements IGuiHandler
public static final int inventoryGui = 100;
public static final int armorGuiID = 101;
public static final int knapsackGuiID = 102;
public ArmorProxyCommon()
{
registerGuiHandler();
}
protected void registerGuiHandler()
{
TProxyCommon.registerServerGuiHandler(inventoryGui, this);
TProxyCommon.registerServerGuiHandler(armorGuiID, this);
TProxyCommon.registerServerGuiHandler(knapsackGuiID, this);
}
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
@@ -1,5 +1,8 @@
package tconstruct.armor;
import mantle.pulsar.pulse.IPulse;
import mantle.pulsar.pulse.Pulse;
import mantle.pulsar.pulse.PulseProxy;
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
@@ -17,34 +20,36 @@ import tconstruct.armor.items.ExoArmor;
import tconstruct.armor.items.HeartCanister;
import tconstruct.armor.items.Jerky;
import tconstruct.armor.items.Knapsack;
import tconstruct.blocks.logic.DryingRackLogic;
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.smeltery.SmelteryProxyCommon;
import tconstruct.tools.TinkerTools;
import tconstruct.util.config.PHConstruct;
import tconstruct.world.TinkerWorld;
import tconstruct.world.items.GoldenHead;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
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.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@Mod(modid = "TinkerArmor", name = "TinkerArmor", version = "${tinkerarmorversion}")
public class TinkerArmor
@ObjectHolder(TConstruct.modID)
@Pulse(id = TConstruct.modID)
public class TinkerArmor implements IPulse //TODO: Remove IPulse implementation, keep annotation
{
@Instance("TinkerArmor")
public static TinkerArmor instance;
@SidedProxy(clientSide = "tconstruct.armor.ArmorProxyClient", serverSide = "tconstruct.armor.ArmorProxyCommon")
@PulseProxy(client = "tconstruct.armor.ArmorProxyClient", server = "tconstruct.armor.ArmorProxyCommon")
public static ArmorProxyCommon proxy;
public static Item diamondApple;
public static Item jerky;
// public static Item stonePattern;
@@ -69,7 +74,7 @@ public class TinkerArmor
public static Item exoShoes;
public static Item bootsWood;
public static ArmorMaterial materialWood;
public TinkerArmor()
{
MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents());
@@ -79,6 +84,8 @@ public class TinkerArmor
public void preInit (FMLPreInitializationEvent event)
{
TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack");
GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack");
TinkerArmor.diamondApple = new DiamondApple().setUnlocalizedName("tconstruct.apple.diamond");
GameRegistry.registerItem(TinkerArmor.diamondApple, "diamondApple");
boolean foodOverhaul = false;
@@ -121,7 +128,7 @@ public class TinkerArmor
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");
@@ -11,6 +11,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fluids.Fluid;
import tconstruct.world.TinkerWorld;
import tconstruct.world.entity.BlueSlime;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -31,6 +32,8 @@ public class SlimeFluid extends BlockFluidClassic
{
stillIcon = iconRegister.registerIcon("tinker:slime_blue");
flowIcon = iconRegister.registerIcon("tinker:slime_blue_flow");
TinkerWorld.blueSlimeFluid.setStillIcon(stillIcon);
TinkerWorld.blueSlimeFluid.setFlowingIcon(flowIcon);
}
@Override
@@ -157,6 +157,7 @@ import tconstruct.world.model.SlimeRender;
public class TProxyClient extends TProxyCommon
{
/* TODO: Split this class up into its respective parts */
public static SmallFontRenderer smallFontRenderer;
public static IIcon metalBall;
public static Minecraft mc;
@@ -164,7 +165,13 @@ public class TProxyClient extends TProxyCommon
public static ArmorExtended armorExtended = new ArmorExtended();
public static KnapsackInventory knapsack = new KnapsackInventory();
public void initialize()
{
registerRenderer();
readManuals();
}
/* Registers any rendering code. */
public void registerRenderer ()
{
@@ -1,26 +1,49 @@
package tconstruct.common;
import cpw.mods.fml.common.network.IGuiHandler;
import mantle.blocks.abstracts.InventoryLogic;
import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tconstruct.TConstruct;
import tconstruct.armor.ArmorProxyCommon;
import tconstruct.armor.inventory.ArmorExtendedContainer;
import tconstruct.armor.inventory.KnapsackContainer;
import tconstruct.mechworks.MechworksProxyCommon;
import tconstruct.mechworks.inventory.ContainerLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
import tconstruct.util.player.TPlayerStats;
import cpw.mods.fml.common.network.IGuiHandler;
/**
* Common proxy class for InfiTools
*/
public class TProxyCommon
public class TProxyCommon implements IGuiHandler
{
public void initialize()
{
}
public void spawnParticle (String slimeParticle, double xPos, double yPos, double zPos, double velX, double velY, double velZ)
{
}
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
IGuiHandler handler = serverGuiHandlers.get(ID);
if (handler != null)
return handler.getServerGuiElement(ID, player, world, x, y, z);
return null;
}
@Override
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
IGuiHandler handler = clientGuiHandlers.get(ID);
if (handler != null)
return handler.getClientGuiElement(ID, player, world, x, y, z);
return null;
}
private static HashMap<Integer, IGuiHandler> serverGuiHandlers = new HashMap<Integer, IGuiHandler>();
private static HashMap<Integer, IGuiHandler> clientGuiHandlers = new HashMap<Integer, IGuiHandler>();
public static void registerServerGuiHandler(int gui, IGuiHandler handler)
{
serverGuiHandlers.put(gui, handler);
}
public static void registerClientGuiHandler(int gui, IGuiHandler handler)
{
clientGuiHandlers.put(gui, handler);
}
}
File diff suppressed because it is too large. Load diff
-285
View File
@@ -1,285 +0,0 @@
package tconstruct.common;
import net.minecraft.block.Block;
import net.minecraft.block.Block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import tconstruct.*;
import tconstruct.blocks.slime.*;
import tconstruct.library.tools.*;
import tconstruct.tools.modifiers.*;
import tconstruct.world.blocks.*;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(TConstruct.modID)
public class TRepo
{
// Supresses console spam when iguana's tweaks remove stuff
public static boolean supressMissingToolLogs = false;
// Patterns and other materials
public static Item blankPattern;
public static Item materials;
public static Item toolRod;
public static Item toolShard;
public static Item woodPattern;
public static Item metalPattern;
// public static Item armorPattern;
public static Item manualBook;
public static Item buckets;
public static Item titleIcon;
public static Item strangeFood;
public static Item diamondApple;
public static Item jerky;
// public static Item stonePattern;
// public static Item netherPattern;
// Tools
public static ToolCore pickaxe;
public static ToolCore shovel;
public static ToolCore hatchet;
public static ToolCore broadsword;
public static ToolCore longsword;
public static ToolCore rapier;
public static ToolCore dagger;
public static ToolCore cutlass;
public static ToolCore frypan;
public static ToolCore battlesign;
public static ToolCore chisel;
public static ToolCore mattock;
public static ToolCore scythe;
public static ToolCore lumberaxe;
public static ToolCore cleaver;
public static ToolCore excavator;
public static ToolCore hammer;
public static ToolCore battleaxe;
public static ToolCore shortbow;
public static ToolCore arrow;
public static Item potionLauncher;
// Tool parts
public static Item binding;
public static Item toughBinding;
public static Item toughRod;
public static Item largePlate;
public static Item pickaxeHead;
public static Item shovelHead;
public static Item hatchetHead;
public static Item frypanHead;
public static Item signHead;
public static Item chiselHead;
public static Item scytheBlade;
public static Item broadAxeHead;
public static Item excavatorHead;
public static Item hammerHead;
public static Item swordBlade;
public static Item largeSwordBlade;
public static Item knifeBlade;
public static Item wideGuard;
public static Item handGuard;
public static Item crossbar;
public static Item fullGuard;
public static Item bowstring;
public static Item arrowhead;
public static Item fletching;
// Crafting blocks
public static Block toolStationWood;
public static Block toolStationStone;
public static Block toolForge;
public static Block craftingStationWood;
public static Block craftingSlabWood;
public static Block furnaceSlab;
public static Block heldItemBlock;
public static Block battlesignBlock;
public static Block craftedSoil;
public static Block smeltery;
public static Block lavaTank;
public static Block searedBlock;
public static Block castingChannel;
public static Block metalBlock;
public static Block tankAir;
public static Block smelteryNether;
public static Block lavaTankNether;
public static Block searedBlockNether;
public static Block dryingRack;
// Decoration
public static Block stoneTorch;
public static Block stoneLadder;
public static Block multiBrick;
public static Block multiBrickFancy;
public static Block searedSlab;
public static Block speedSlab;
public static Block meatBlock;
public static Block woolSlab1;
public static Block woolSlab2;
public static Block glueBlock;
// Traps
public static Block landmine;
public static Block punji;
public static Block barricadeOak;
public static Block barricadeSpruce;
public static Block barricadeBirch;
public static Block barricadeJungle;
public static Block slimeExplosive;
// InfiBlocks
public static Block speedBlock;
public static Block clearGlass;
// public static Block stainedGlass;
public static Block stainedGlassClear;
public static Block glassPane;
// public static Block stainedGlassPane;
public static Block stainedGlassClearPane;
public static Block glassMagicSlab;
public static Block stainedGlassMagicSlab;
public static Block stainedGlassClearMagicSlab;
// Liquids
public static Material liquidMetal;
public static Fluid moltenIronFluid;
public static Fluid moltenGoldFluid;
public static Fluid moltenCopperFluid;
public static Fluid moltenTinFluid;
public static Fluid moltenAluminumFluid;
public static Fluid moltenCobaltFluid;
public static Fluid moltenArditeFluid;
public static Fluid moltenBronzeFluid;
public static Fluid moltenAlubrassFluid;
public static Fluid moltenManyullynFluid;
public static Fluid moltenAlumiteFluid;
public static Fluid moltenObsidianFluid;
public static Fluid moltenSteelFluid;
public static Fluid moltenGlassFluid;
public static Fluid moltenStoneFluid;
public static Fluid moltenEmeraldFluid;
public static Fluid bloodFluid;
public static Fluid moltenNickelFluid;
public static Fluid moltenLeadFluid;
public static Fluid moltenSilverFluid;
public static Fluid moltenShinyFluid;
public static Fluid moltenInvarFluid;
public static Fluid moltenElectrumFluid;
public static Fluid moltenEnderFluid;
public static Fluid blueSlimeFluid;
public static Fluid pigIronFluid;
public static Block moltenIron;
public static Block moltenGold;
public static Block moltenCopper;
public static Block moltenTin;
public static Block moltenAluminum;
public static Block moltenCobalt;
public static Block moltenArdite;
public static Block moltenBronze;
public static Block moltenAlubrass;
public static Block moltenManyullyn;
public static Block moltenAlumite;
public static Block moltenObsidian;
public static Block moltenSteel;
public static Block moltenGlass;
public static Block moltenStone;
public static Block moltenEmerald;
public static Block blood;
public static Block moltenNickel;
public static Block moltenLead;
public static Block moltenSilver;
public static Block moltenShiny;
public static Block moltenInvar;
public static Block moltenElectrum;
public static Block moltenEnder;
// Slime
public static SoundType slimeStep;
public static Block slimePool;
public static Block slimeGel;
public static Block slimeGrass;
public static Block slimeTallGrass;
public static SlimeLeaves slimeLeaves;
public static SlimeSapling slimeSapling;
public static Block slimeChannel;
public static Block slimePad;
public static Block bloodChannel;
// Glue
public static Fluid glueFluid;
public static Block glueFluidBlock;
// Ores
public static Block oreSlag;
public static Block oreGravel;
public static OreberryBush oreBerry;
public static OreberryBush oreBerrySecond;
public static Item oreBerries;
// Tool modifiers
public static ModFlux modFlux;
public static ModLapis modLapis;
public static ModAttack modAttack;
public static Item creativeModifier;
// 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;
public static Item goldHead;
// Rail-related
public static Block woodenRail;
// Chest hooks
public static ChestGenHooks tinkerHouseChest;
public static ChestGenHooks tinkerHousePatterns;
// Armor - basic
public static Item helmetWood;
public static Item chestplateWood;
public static Item leggingsWood;
public static Item bootsWood;
public static ArmorMaterial materialWood;
// Armor - exosuit
public static Item exoGoggles;
public static Item exoChest;
public static Item exoPants;
public static Item exoShoes;
public static Fluid[] fluids = new Fluid[27];
public static Block[] fluidBlocks = new Block[26];
// recipe stuff
public static boolean thaumcraftAvailable;
public static boolean initRecipes;
public static Item[] patternOutputs;
public static FluidStack[] liquids;
}
@@ -16,43 +16,43 @@ public enum FluidType
/** Gold Smelting **/
Gold(Blocks.gold_block, 0, 400, TinkerSmeltery.moltenGoldFluid, false),
/** Tin Smelting **/
Tin(TinkerSmeltery.metalBlock, 5, 400, TinkerSmeltery.moltenTinFluid, false),
Tin(TinkerWorld.metalBlock, 5, 400, TinkerSmeltery.moltenTinFluid, false),
/** Copper Smelting **/
Copper(TinkerSmeltery.metalBlock, 3, 550, TinkerSmeltery.moltenCopperFluid, true),
Copper(TinkerWorld.metalBlock, 3, 550, TinkerSmeltery.moltenCopperFluid, true),
/** Aluminum Smelting **/
Aluminum(TinkerSmeltery.metalBlock, 6, 350, TinkerSmeltery.moltenAluminumFluid, false),
Aluminum(TinkerWorld.metalBlock, 6, 350, TinkerSmeltery.moltenAluminumFluid, false),
/** Natural Aluminum Smelting **/
NaturalAluminum(TinkerWorld.oreSlag, 6, 350, TinkerSmeltery.moltenAluminumFluid, false),
/** Cobalt Smelting **/
Cobalt(TinkerSmeltery.metalBlock, 0, 650, TinkerSmeltery.moltenCobaltFluid, true),
Cobalt(TinkerWorld.metalBlock, 0, 650, TinkerSmeltery.moltenCobaltFluid, true),
/** Ardite Smelting **/
Ardite(TinkerSmeltery.metalBlock, 1, 650, TinkerSmeltery.moltenArditeFluid, true),
Ardite(TinkerWorld.metalBlock, 1, 650, TinkerSmeltery.moltenArditeFluid, true),
/** AluminumBrass Smelting **/
AluminumBrass(TinkerSmeltery.metalBlock, 7, 350, TinkerSmeltery.moltenAlubrassFluid, false),
AluminumBrass(TinkerWorld.metalBlock, 7, 350, TinkerSmeltery.moltenAlubrassFluid, false),
/** Alumite Smelting **/
Alumite(TinkerSmeltery.metalBlock, 8, 800, TinkerSmeltery.moltenAlumiteFluid, true),
Alumite(TinkerWorld.metalBlock, 8, 800, TinkerSmeltery.moltenAlumiteFluid, true),
/** Manyullyn Smelting **/
Manyullyn(TinkerSmeltery.metalBlock, 2, 750, TinkerSmeltery.moltenManyullynFluid, true),
Manyullyn(TinkerWorld.metalBlock, 2, 750, TinkerSmeltery.moltenManyullynFluid, true),
/** Bronze Smelting **/
Bronze(TinkerSmeltery.metalBlock, 4, 500, TinkerSmeltery.moltenBronzeFluid, true),
Bronze(TinkerWorld.metalBlock, 4, 500, TinkerSmeltery.moltenBronzeFluid, true),
/** Steel Smelting **/
Steel(TinkerSmeltery.metalBlock, 9, 700, TinkerSmeltery.moltenSteelFluid, true),
Steel(TinkerWorld.metalBlock, 9, 700, TinkerSmeltery.moltenSteelFluid, true),
/** Nickel Smelting **/
Nickel(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenNickelFluid, false),
Nickel(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenNickelFluid, false),
/** Lead Smelting **/
Lead(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenLeadFluid, false),
Lead(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenLeadFluid, false),
/** Silver Smelting **/
Silver(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenSilverFluid, false),
Silver(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenSilverFluid, false),
/** Platinum Smelting **/
Platinum(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenShinyFluid, false),
Platinum(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenShinyFluid, false),
/** Invar Smelting **/
Invar(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenInvarFluid, false),
Invar(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenInvarFluid, false),
/** Electrum Smelting **/
Electrum(TinkerSmeltery.metalBlock, 0, 400, TinkerSmeltery.moltenElectrumFluid, false),
Electrum(TinkerWorld.metalBlock, 0, 400, TinkerSmeltery.moltenElectrumFluid, false),
/** Obsidian Smelting **/
Obsidian(Blocks.obsidian, 0, 750, TinkerSmeltery.moltenObsidianFluid, true),
/** Ender Smelting **/
Ender(TinkerSmeltery.metalBlock, 10, 500, TinkerSmeltery.moltenEnderFluid, false),
Ender(TinkerWorld.metalBlock, 10, 500, TinkerSmeltery.moltenEnderFluid, false),
/** Glass Smelting **/
Glass(Blocks.sand, 0, 625, TinkerSmeltery.moltenGlassFluid, false),
/** Stone Smelting **/
@@ -20,6 +20,7 @@ import tconstruct.client.gui.StencilTableGui;
import tconstruct.client.gui.ToolForgeGui;
import tconstruct.client.gui.ToolStationGui;
import tconstruct.client.tabs.TabRegistry;
import tconstruct.common.TProxyCommon;
import tconstruct.mechworks.inventory.ContainerLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
import tconstruct.smeltery.SmelteryProxyCommon;
@@ -38,6 +39,17 @@ import tconstruct.util.config.PHConstruct;
public class MechworksProxyClient extends MechworksProxyCommon
{
public MechworksProxyClient()
{
registerGuiHandler();
}
protected void registerGuiHandler()
{
super.registerGuiHandler();
TProxyCommon.registerClientGuiHandler(landmineID, this);
}
@Override
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
@@ -1,16 +1,25 @@
package tconstruct.mechworks;
import tconstruct.mechworks.inventory.ContainerLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import tconstruct.common.TProxyCommon;
import tconstruct.mechworks.inventory.ContainerLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
import cpw.mods.fml.common.network.IGuiHandler;
public class MechworksProxyCommon implements IGuiHandler
{
public MechworksProxyCommon()
{
registerGuiHandler();
}
// public static int drawbridgeID = 9; // Moved to TMechworks
public static final int landmineID = 10;
protected void registerGuiHandler()
{
TProxyCommon.registerServerGuiHandler(landmineID, this);
}
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
@@ -1,76 +1,41 @@
package tconstruct.mechworks;
import mantle.pulsar.pulse.IPulse;
import mantle.pulsar.pulse.Pulse;
import mantle.pulsar.pulse.PulseProxy;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import tconstruct.armor.TinkerArmor;
import tconstruct.blocks.SlabBase;
import tconstruct.blocks.logic.DryingRackLogic;
import tconstruct.blocks.slime.SlimeFluid;
import tconstruct.blocks.slime.SlimeGel;
import tconstruct.blocks.slime.SlimeGrass;
import tconstruct.blocks.slime.SlimeLeaves;
import tconstruct.blocks.slime.SlimeSapling;
import tconstruct.blocks.slime.SlimeTallGrass;
import tconstruct.blocks.traps.BarricadeBlock;
import tconstruct.blocks.traps.Punji;
import tconstruct.client.StepSoundSlime;
import tconstruct.common.itemblocks.MetadataItemBlock;
import tconstruct.library.TConstructRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import tconstruct.TConstruct;
import tconstruct.armor.ArmorProxyCommon;
import tconstruct.mechworks.blocks.BlockLandmine;
import tconstruct.mechworks.entity.item.EntityLandmineFirework;
import tconstruct.mechworks.entity.item.ExplosivePrimed;
import tconstruct.mechworks.itemblocks.ItemBlockLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
import tconstruct.smeltery.TinkerSmeltery;
import tconstruct.smeltery.blocks.MetalOre;
import tconstruct.tools.TinkerTools;
import tconstruct.tools.blocks.MultiBrick;
import tconstruct.tools.blocks.MultiBrickFancy;
import tconstruct.tools.itemblocks.MultiBrickFancyItem;
import tconstruct.tools.itemblocks.MultiBrickItem;
import tconstruct.world.blocks.ConveyorBase;
import tconstruct.world.blocks.GravelOre;
import tconstruct.world.blocks.MeatBlock;
import tconstruct.world.blocks.OreberryBush;
import tconstruct.world.blocks.OreberryBushEssence;
import tconstruct.world.blocks.SlimeExplosive;
import tconstruct.world.blocks.SlimePad;
import tconstruct.world.blocks.StoneLadder;
import tconstruct.world.blocks.StoneTorch;
import tconstruct.world.blocks.WoodRail;
import tconstruct.world.itemblocks.BarricadeItem;
import tconstruct.world.itemblocks.GravelOreItem;
import tconstruct.world.itemblocks.HamboneItemBlock;
import tconstruct.world.itemblocks.MetalOreItemBlock;
import tconstruct.world.itemblocks.OreberryBushItem;
import tconstruct.world.itemblocks.OreberryBushSecondItem;
import tconstruct.world.itemblocks.SlimeGelItemBlock;
import tconstruct.world.itemblocks.SlimeGrassItemBlock;
import tconstruct.world.itemblocks.SlimeLeavesItemBlock;
import tconstruct.world.itemblocks.SlimeSaplingItemBlock;
import tconstruct.world.itemblocks.SlimeTallGrassItem;
import tconstruct.world.itemblocks.WoolSlab1Item;
import tconstruct.world.itemblocks.WoolSlab2Item;
import tconstruct.world.items.OreBerries;
import tconstruct.world.items.StrangeFood;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
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.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@Mod(modid = "TinkerMechworks", name = "TinkerMechworks", version = "${tinkermechworksversion}")
public class TinkerMechworks
@ObjectHolder(TConstruct.modID)
@Pulse(id = TConstruct.modID)
public class TinkerMechworks implements IPulse //TODO: Remove IPulse implementation, keep annotation
{
@PulseProxy(client = "tconstruct.mechworks.MechworksProxyClient", server = "tconstruct.mechworks.MechworksProxyCommon")
public static MechworksProxyCommon proxy;
public TinkerMechworks()
{
NetworkRegistry.INSTANCE.registerGuiHandler(TConstruct.instance, proxy);
}
// Traps
public static Block landmine;
@@ -81,8 +46,21 @@ public class TinkerMechworks
TinkerMechworks.landmine = new BlockLandmine().setHardness(0.5F).setResistance(0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabRedstone).setBlockName("landmine");
GameRegistry.registerBlock(TinkerMechworks.landmine, ItemBlockLandmine.class, "Redstone.Landmine");
GameRegistry.registerTileEntity(TileEntityLandmine.class, "Landmine");
// Landmine Recipes
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 0), "mcm", "rpr", 'm', "plankWood", 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r',
Items.redstone, 'p', Blocks.stone_pressure_plate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 1), "mcm", "rpr", 'm', Blocks.stone, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r',
Items.redstone, 'p', Blocks.stone_pressure_plate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 2), "mcm", "rpr", 'm', Blocks.obsidian, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r',
Items.redstone, 'p', Blocks.stone_pressure_plate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 3), "mcm", "rpr", 'm', Items.repeater, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r',
Items.redstone, 'p', Blocks.stone_pressure_plate));
EntityRegistry.registerModEntity(EntityLandmineFirework.class, "LandmineFirework", 5, TConstruct.instance, 32, 5, true);
EntityRegistry.registerModEntity(ExplosivePrimed.class, "SlimeExplosive", 6, TConstruct.instance, 32, 5, true);
}
@EventHandler
public void init (FMLInitializationEvent event)
{
@@ -91,6 +69,6 @@ public class TinkerMechworks
@EventHandler
public void postInit (FMLPostInitializationEvent evt)
{
}
}
@@ -9,6 +9,7 @@ import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.common.MinecraftForge;
import tconstruct.client.gui.AdaptiveSmelteryGui;
import tconstruct.client.gui.SmelteryGui;
import tconstruct.common.TProxyCommon;
import tconstruct.smeltery.logic.AdaptiveSmelteryLogic;
import tconstruct.smeltery.logic.SmelteryLogic;
import tconstruct.util.config.PHConstruct;
@@ -18,8 +19,16 @@ public class SmelteryProxyClient extends SmelteryProxyCommon
public SmelteryProxyClient()
{
MinecraftForge.EVENT_BUS.register(this);
registerGuiHandler();
}
@Override
protected void registerGuiHandler()
{
super.registerGuiHandler();
TProxyCommon.registerClientGuiHandler(smelteryGuiID, this);
}
@Override
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
@@ -32,11 +41,11 @@ public class SmelteryProxyClient extends SmelteryProxyCommon
}
return null;
}
/* Liquids */
IIcon[] stillIcons = new IIcon[2];
IIcon[] flowIcons = new IIcon[2];
IIcon[] stillIcons = new IIcon[1];
IIcon[] flowIcons = new IIcon[1];
@SubscribeEvent
public void preStitch (TextureStitchEvent.Pre event)
@@ -1,14 +1,26 @@
package tconstruct.smeltery;
import tconstruct.common.TProxyCommon;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.network.IGuiHandler;
public class SmelteryProxyCommon implements IGuiHandler
{
public static final int smelteryGuiID = 7;
public SmelteryProxyCommon()
{
registerGuiHandler();
}
protected void registerGuiHandler()
{
TProxyCommon.registerServerGuiHandler(smelteryGuiID, this);
}
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
@@ -6,6 +6,9 @@ import java.util.List;
import mantle.blocks.BlockUtils;
import mantle.blocks.abstracts.MultiServantLogic;
import mantle.pulsar.pulse.IPulse;
import mantle.pulsar.pulse.Pulse;
import mantle.pulsar.pulse.PulseProxy;
import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
@@ -31,6 +34,7 @@ import tconstruct.library.crafting.LiquidCasting;
import tconstruct.library.crafting.Smeltery;
import tconstruct.library.util.IPattern;
import tconstruct.smeltery.blocks.BloodBlock;
import tconstruct.smeltery.blocks.CastingChannelBlock;
import tconstruct.smeltery.blocks.GlassBlockConnected;
import tconstruct.smeltery.blocks.GlassBlockConnectedMeta;
import tconstruct.smeltery.blocks.GlassPaneConnected;
@@ -49,7 +53,6 @@ import tconstruct.smeltery.itemblocks.CastingChannelItem;
import tconstruct.smeltery.itemblocks.GlassBlockItem;
import tconstruct.smeltery.itemblocks.GlassPaneItem;
import tconstruct.smeltery.itemblocks.LavaTankItemBlock;
import tconstruct.smeltery.itemblocks.MetalItemBlock;
import tconstruct.smeltery.itemblocks.SearedSlabItem;
import tconstruct.smeltery.itemblocks.SearedTableItemBlock;
import tconstruct.smeltery.itemblocks.SmelteryItemBlock;
@@ -72,23 +75,23 @@ import tconstruct.smeltery.logic.TankAirLogic;
import tconstruct.tools.TinkerTools;
import tconstruct.util.config.PHConstruct;
import tconstruct.world.TinkerWorld;
import tconstruct.world.blocks.CastingChannelBlock;
import tconstruct.world.blocks.TMetalBlock;
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.SidedProxy;
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.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@Mod(modid = "TinkerSmeltery", name = "TinkerSmeltery", version = "${tinkersmelteryversion}")
public class TinkerSmeltery
@ObjectHolder(TConstruct.modID)
@Pulse(id = TConstruct.modID)
public class TinkerSmeltery implements IPulse //TODO: Remove IPulse implementation, keep annotation
{
@Instance("TinkerSmeltery")
public static TinkerSmeltery instance;
@SidedProxy(clientSide = "tconstruct.smeltery.SmelteryProxyClient", serverSide = "tconstruct.smeltery.SmelteryProxyCommon")
@PulseProxy(client = "tconstruct.smeltery.SmelteryProxyClient", server = "tconstruct.smeltery.SmelteryProxyCommon")
public static SmelteryProxyCommon proxy;
public static Item metalPattern;
@@ -98,7 +101,6 @@ public class TinkerSmeltery
public static Block lavaTank;
public static Block searedBlock;
public static Block castingChannel;
public static Block metalBlock;
public static Block tankAir;
public static Block smelteryNether;
public static Block lavaTankNether;
@@ -166,15 +168,15 @@ public class TinkerSmeltery
// Glue
public static Fluid glueFluid;
public static Block glueFluidBlock;
public static Fluid[] fluids = new Fluid[27];
public static Block[] fluidBlocks = new Block[26];
public static Fluid[] fluids = new Fluid[26];
public static Block[] fluidBlocks = new Block[25];
public static FluidStack[] liquids;
public static Block speedSlab;
// InfiBlocks
public static Block speedBlock;
public static Fluid bloodFluid;
public static Block blood;
public TinkerSmeltery()
{
MinecraftForge.EVENT_BUS.register(new TinkerSmelteryEvents());
@@ -184,6 +186,8 @@ public class TinkerSmeltery
public void preInit (FMLPreInitializationEvent event)
{
TinkerSmeltery.buckets = new FilledBucket(BlockUtils.getBlockFromItem(TinkerSmeltery.buckets));
GameRegistry.registerItem(TinkerSmeltery.buckets, "buckets");
TinkerSmeltery.searedSlab = new SearedSlab().setBlockName("SearedSlab");
TinkerSmeltery.searedSlab.stepSound = Block.soundTypeStone;
@@ -191,9 +195,6 @@ public class TinkerSmeltery
TinkerSmeltery.speedSlab = new SpeedSlab().setBlockName("SpeedSlab");
TinkerSmeltery.speedSlab.stepSound = Block.soundTypeStone;
TinkerSmeltery.metalBlock = new TMetalBlock(Material.iron, 10.0F).setBlockName("tconstruct.metalblock");
TinkerSmeltery.metalBlock.stepSound = Block.soundTypeMetal;
TinkerSmeltery.glueBlock = new GlueBlock().setBlockName("GlueBlock").setCreativeTab(TConstructRegistry.blockTab);
// Smeltery
@@ -219,7 +220,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenIron = new TConstructFluid(TinkerSmeltery.moltenIronFluid, Material.lava, "liquid_iron").setBlockName("fluid.molten.iron");
GameRegistry.registerBlock(TinkerSmeltery.moltenIron, "fluid.molten.iron");
TinkerSmeltery.moltenIronFluid.setBlock(TinkerSmeltery.moltenIron).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 0), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 0), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenGoldFluid = new Fluid("gold.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenGoldFluid))
@@ -227,7 +229,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenGold = new TConstructFluid(TinkerSmeltery.moltenGoldFluid, Material.lava, "liquid_gold").setBlockName("fluid.molten.gold");
GameRegistry.registerBlock(TinkerSmeltery.moltenGold, "fluid.molten.gold");
TinkerSmeltery.moltenGoldFluid.setBlock(TinkerSmeltery.moltenGold).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGoldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 1), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGoldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 1), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenCopperFluid = new Fluid("copper.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenCopperFluid))
@@ -235,7 +238,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenCopper = new TConstructFluid(TinkerSmeltery.moltenCopperFluid, Material.lava, "liquid_copper").setBlockName("fluid.molten.copper");
GameRegistry.registerBlock(TinkerSmeltery.moltenCopper, "fluid.molten.copper");
TinkerSmeltery.moltenCopperFluid.setBlock(TinkerSmeltery.moltenCopper).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCopperFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 2), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCopperFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 2), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenTinFluid = new Fluid("tin.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenTinFluid))
@@ -243,7 +247,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenTin = new TConstructFluid(TinkerSmeltery.moltenTinFluid, Material.lava, "liquid_tin").setBlockName("fluid.molten.tin");
GameRegistry.registerBlock(TinkerSmeltery.moltenTin, "fluid.molten.tin");
TinkerSmeltery.moltenTinFluid.setBlock(TinkerSmeltery.moltenTin).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenTinFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 3), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenTinFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 3), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenAluminumFluid = new Fluid("aluminum.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenAluminumFluid))
@@ -251,7 +256,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenAluminum = new TConstructFluid(TinkerSmeltery.moltenAluminumFluid, Material.lava, "liquid_aluminum").setBlockName("fluid.molten.aluminum");
GameRegistry.registerBlock(TinkerSmeltery.moltenAluminum, "fluid.molten.aluminum");
TinkerSmeltery.moltenAluminumFluid.setBlock(TinkerSmeltery.moltenAluminum).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAluminumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 4), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAluminumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 4), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenCobaltFluid = new Fluid("cobalt.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenCobaltFluid))
@@ -259,7 +265,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenCobalt = new TConstructFluid(TinkerSmeltery.moltenCobaltFluid, Material.lava, "liquid_cobalt").setBlockName("fluid.molten.cobalt");
GameRegistry.registerBlock(TinkerSmeltery.moltenCobalt, "fluid.molten.cobalt");
TinkerSmeltery.moltenCobaltFluid.setBlock(TinkerSmeltery.moltenCobalt).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 5), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 5), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenArditeFluid = new Fluid("ardite.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenArditeFluid))
@@ -267,7 +274,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenArdite = new TConstructFluid(TinkerSmeltery.moltenArditeFluid, Material.lava, "liquid_ardite").setBlockName("fluid.molten.ardite");
GameRegistry.registerBlock(TinkerSmeltery.moltenArdite, "fluid.molten.ardite");
TinkerSmeltery.moltenArditeFluid.setBlock(TinkerSmeltery.moltenArdite).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenArditeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 6), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenArditeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 6), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenBronzeFluid = new Fluid("bronze.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenBronzeFluid))
@@ -275,7 +283,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenBronze = new TConstructFluid(TinkerSmeltery.moltenBronzeFluid, Material.lava, "liquid_bronze").setBlockName("fluid.molten.bronze");
GameRegistry.registerBlock(TinkerSmeltery.moltenBronze, "fluid.molten.bronze");
TinkerSmeltery.moltenBronzeFluid.setBlock(TinkerSmeltery.moltenBronze).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 7), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 7), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenAlubrassFluid = new Fluid("aluminumbrass.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenAlubrassFluid))
@@ -283,7 +292,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenAlubrass = new TConstructFluid(TinkerSmeltery.moltenAlubrassFluid, Material.lava, "liquid_alubrass").setBlockName("fluid.molten.alubrass");
GameRegistry.registerBlock(TinkerSmeltery.moltenAlubrass, "fluid.molten.alubrass");
TinkerSmeltery.moltenAlubrassFluid.setBlock(TinkerSmeltery.moltenAlubrass).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 8), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 8), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenManyullynFluid = new Fluid("manyullyn.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenManyullynFluid))
@@ -291,7 +301,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenManyullyn = new TConstructFluid(TinkerSmeltery.moltenManyullynFluid, Material.lava, "liquid_manyullyn").setBlockName("fluid.molten.manyullyn");
GameRegistry.registerBlock(TinkerSmeltery.moltenManyullyn, "fluid.molten.manyullyn");
TinkerSmeltery.moltenManyullynFluid.setBlock(TinkerSmeltery.moltenManyullyn).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 9), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 9), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenAlumiteFluid = new Fluid("alumite.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenAlumiteFluid))
@@ -299,7 +310,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenAlumite = new TConstructFluid(TinkerSmeltery.moltenAlumiteFluid, Material.lava, "liquid_alumite").setBlockName("fluid.molten.alumite");
GameRegistry.registerBlock(TinkerSmeltery.moltenAlumite, "fluid.molten.alumite");
TinkerSmeltery.moltenAlumiteFluid.setBlock(TinkerSmeltery.moltenAlumite).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 10), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 10), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenObsidianFluid = new Fluid("obsidian.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenObsidianFluid))
@@ -307,7 +319,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenObsidian = new TConstructFluid(TinkerSmeltery.moltenObsidianFluid, Material.lava, "liquid_obsidian").setBlockName("fluid.molten.obsidian");
GameRegistry.registerBlock(TinkerSmeltery.moltenObsidian, "fluid.molten.obsidian");
TinkerSmeltery.moltenObsidianFluid.setBlock(TinkerSmeltery.moltenObsidian).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 11), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 11), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenSteelFluid = new Fluid("steel.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenSteelFluid))
@@ -315,7 +328,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenSteel = new TConstructFluid(TinkerSmeltery.moltenSteelFluid, Material.lava, "liquid_steel").setBlockName("fluid.molten.steel");
GameRegistry.registerBlock(TinkerSmeltery.moltenSteel, "fluid.molten.steel");
TinkerSmeltery.moltenSteelFluid.setBlock(TinkerSmeltery.moltenSteel).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSteelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 12), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSteelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 12), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenGlassFluid = new Fluid("glass.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenGlassFluid))
@@ -323,7 +337,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenGlass = new TConstructFluid(TinkerSmeltery.moltenGlassFluid, Material.lava, "liquid_glass", true).setBlockName("fluid.molten.glass");
GameRegistry.registerBlock(TinkerSmeltery.moltenGlass, "fluid.molten.glass");
TinkerSmeltery.moltenGlassFluid.setBlock(TinkerSmeltery.moltenGlass).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGlassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 13), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenGlassFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 13), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenStoneFluid = new Fluid("stone.seared");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenStoneFluid))
@@ -331,7 +346,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenStone = new TConstructFluid(TinkerSmeltery.moltenStoneFluid, Material.lava, "liquid_stone").setBlockName("molten.stone");
GameRegistry.registerBlock(TinkerSmeltery.moltenStone, "molten.stone");
TinkerSmeltery.moltenStoneFluid.setBlock(TinkerSmeltery.moltenStone).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenStoneFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 14), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenStoneFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 14), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenEmeraldFluid = new Fluid("emerald.liquid");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenEmeraldFluid))
@@ -339,7 +355,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenEmerald = new TConstructFluid(TinkerSmeltery.moltenEmeraldFluid, Material.water, "liquid_villager").setBlockName("molten.emerald");
GameRegistry.registerBlock(TinkerSmeltery.moltenEmerald, "molten.emerald");
TinkerSmeltery.moltenEmeraldFluid.setBlock(TinkerSmeltery.moltenEmerald).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 15), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 15), new ItemStack(
Items.bucket)));
TinkerSmeltery.bloodFluid = new Fluid("blood");
if (!FluidRegistry.registerFluid(TinkerSmeltery.bloodFluid))
@@ -347,7 +364,8 @@ public class TinkerSmeltery
TinkerSmeltery.blood = new BloodBlock(TinkerSmeltery.bloodFluid, Material.water, "liquid_cow").setBlockName("liquid.blood");
GameRegistry.registerBlock(TinkerSmeltery.blood, "liquid.blood");
TinkerSmeltery.bloodFluid.setBlock(TinkerSmeltery.blood).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.bloodFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 16), new ItemStack(Items.bucket)));
FluidContainerRegistry
.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.bloodFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 16), new ItemStack(Items.bucket)));
TinkerSmeltery.moltenNickelFluid = new Fluid("nickel.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenNickelFluid))
@@ -355,7 +373,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenNickel = new TConstructFluid(TinkerSmeltery.moltenNickelFluid, Material.lava, "liquid_ferrous").setBlockName("fluid.molten.nickel");
GameRegistry.registerBlock(TinkerSmeltery.moltenNickel, "fluid.molten.nickel");
TinkerSmeltery.moltenNickelFluid.setBlock(TinkerSmeltery.moltenNickel).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenNickelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 17), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenNickelFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 17), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenLeadFluid = new Fluid("lead.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenLeadFluid))
@@ -363,7 +382,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenLead = new TConstructFluid(TinkerSmeltery.moltenLeadFluid, Material.lava, "liquid_lead").setBlockName("fluid.molten.lead");
GameRegistry.registerBlock(TinkerSmeltery.moltenLead, "fluid.molten.lead");
TinkerSmeltery.moltenLeadFluid.setBlock(TinkerSmeltery.moltenLead).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenLeadFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 18), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenLeadFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 18), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenSilverFluid = new Fluid("silver.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenSilverFluid))
@@ -371,7 +391,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenSilver = new TConstructFluid(TinkerSmeltery.moltenSilverFluid, Material.lava, "liquid_silver").setBlockName("fluid.molten.silver");
GameRegistry.registerBlock(TinkerSmeltery.moltenSilver, "fluid.molten.silver");
TinkerSmeltery.moltenSilverFluid.setBlock(TinkerSmeltery.moltenSilver).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSilverFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 19), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenSilverFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 19), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenShinyFluid = new Fluid("platinum.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenShinyFluid))
@@ -379,7 +400,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenShiny = new TConstructFluid(TinkerSmeltery.moltenShinyFluid, Material.lava, "liquid_shiny").setBlockName("fluid.molten.shiny");
GameRegistry.registerBlock(TinkerSmeltery.moltenShiny, "fluid.molten.shiny");
TinkerSmeltery.moltenShinyFluid.setBlock(TinkerSmeltery.moltenShiny).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenShinyFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 20), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenShinyFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 20), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenInvarFluid = new Fluid("invar.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenInvarFluid))
@@ -387,7 +409,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenInvar = new TConstructFluid(TinkerSmeltery.moltenInvarFluid, Material.lava, "liquid_invar").setBlockName("fluid.molten.invar");
GameRegistry.registerBlock(TinkerSmeltery.moltenInvar, "fluid.molten.invar");
TinkerSmeltery.moltenInvarFluid.setBlock(TinkerSmeltery.moltenInvar).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenInvarFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 21), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenInvarFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 21), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenElectrumFluid = new Fluid("electrum.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenElectrumFluid))
@@ -395,7 +418,8 @@ public class TinkerSmeltery
TinkerSmeltery.moltenElectrum = new TConstructFluid(TinkerSmeltery.moltenElectrumFluid, Material.lava, "liquid_electrum").setBlockName("fluid.molten.electrum");
GameRegistry.registerBlock(TinkerSmeltery.moltenElectrum, "fluid.molten.electrum");
TinkerSmeltery.moltenElectrumFluid.setBlock(TinkerSmeltery.moltenElectrum).setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenElectrumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 22), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenElectrumFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 22), new ItemStack(
Items.bucket)));
TinkerSmeltery.moltenEnderFluid = new Fluid("ender");
if (!FluidRegistry.registerFluid(TinkerSmeltery.moltenEnderFluid))
@@ -410,33 +434,39 @@ public class TinkerSmeltery
TinkerSmeltery.moltenEnder = new TConstructFluid(TinkerSmeltery.moltenEnderFluid, Material.water, "liquid_ender").setBlockName("fluid.ender");
GameRegistry.registerBlock(TinkerSmeltery.moltenEnder, "fluid.ender");
TinkerSmeltery.moltenEnderFluid.setBlock(TinkerSmeltery.moltenEnder).setDensity(3000).setViscosity(6000);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 23), new ItemStack(Items.bucket)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 23), new ItemStack(
Items.bucket)));
}
// Glue
TinkerSmeltery.glueFluid = new Fluid("glue").setDensity(6000).setViscosity(6000).setTemperature(200);
if (!FluidRegistry.registerFluid(TinkerSmeltery.glueFluid))
TinkerSmeltery.glueFluid = FluidRegistry.getFluid("glue");
TinkerSmeltery.glueFluidBlock = new GlueFluid(TinkerSmeltery.glueFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(TinkerWorld.slimeStep).setBlockName("liquid.glue");
TinkerSmeltery.glueFluidBlock = new GlueFluid(TinkerSmeltery.glueFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(TinkerWorld.slimeStep)
.setBlockName("liquid.glue");
GameRegistry.registerBlock(TinkerSmeltery.glueFluidBlock, "liquid.glue");
TinkerSmeltery.glueFluid.setBlock(TinkerSmeltery.glueFluidBlock);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.glueFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 25), new ItemStack(Items.bucket)));
FluidContainerRegistry
.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.glueFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 25), new ItemStack(Items.bucket)));
TinkerSmeltery.pigIronFluid = new Fluid("pigiron.molten");
if (!FluidRegistry.registerFluid(TinkerSmeltery.pigIronFluid))
TinkerSmeltery.pigIronFluid = FluidRegistry.getFluid("pigiron.molten");
else
TinkerSmeltery.pigIronFluid.setDensity(3000).setViscosity(6000).setTemperature(1300);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.pigIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 26), new ItemStack(Items.bucket)));
TinkerSmeltery.fluids = new Fluid[] { TinkerSmeltery.moltenIronFluid, TinkerSmeltery.moltenGoldFluid, TinkerSmeltery.moltenCopperFluid, TinkerSmeltery.moltenTinFluid, TinkerSmeltery.moltenAluminumFluid, TinkerSmeltery.moltenCobaltFluid,
TinkerSmeltery.moltenArditeFluid, TinkerSmeltery.moltenBronzeFluid, TinkerSmeltery.moltenAlubrassFluid, TinkerSmeltery.moltenManyullynFluid, TinkerSmeltery.moltenAlumiteFluid, TinkerSmeltery.moltenObsidianFluid, TinkerSmeltery.moltenSteelFluid,
TinkerSmeltery.moltenGlassFluid, TinkerSmeltery.moltenStoneFluid, TinkerSmeltery.moltenEmeraldFluid, TinkerSmeltery.bloodFluid, TinkerSmeltery.moltenNickelFluid, TinkerSmeltery.moltenLeadFluid, TinkerSmeltery.moltenSilverFluid,
TinkerSmeltery.moltenShinyFluid, TinkerSmeltery.moltenInvarFluid, TinkerSmeltery.moltenElectrumFluid, TinkerSmeltery.moltenEnderFluid, TinkerWorld.blueSlimeFluid, TinkerSmeltery.glueFluid, TinkerSmeltery.pigIronFluid };
TinkerSmeltery.fluidBlocks = new Block[] { TinkerSmeltery.moltenIron, TinkerSmeltery.moltenGold, TinkerSmeltery.moltenCopper, TinkerSmeltery.moltenTin, TinkerSmeltery.moltenAluminum, TinkerSmeltery.moltenCobalt, TinkerSmeltery.moltenArdite, TinkerSmeltery.moltenBronze,
TinkerSmeltery.moltenAlubrass, TinkerSmeltery.moltenManyullyn, TinkerSmeltery.moltenAlumite, TinkerSmeltery.moltenObsidian, TinkerSmeltery.moltenSteel, TinkerSmeltery.moltenGlass, TinkerSmeltery.moltenStone, TinkerSmeltery.moltenEmerald, TinkerSmeltery.blood,
TinkerSmeltery.moltenNickel, TinkerSmeltery.moltenLead, TinkerSmeltery.moltenSilver, TinkerSmeltery.moltenShiny, TinkerSmeltery.moltenInvar, TinkerSmeltery.moltenElectrum, TinkerSmeltery.moltenEnder, TinkerWorld.slimePool, TinkerSmeltery.glueFluidBlock };
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerSmeltery.pigIronFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 26), new ItemStack(
Items.bucket)));
TinkerSmeltery.fluids = new Fluid[] { TinkerSmeltery.moltenIronFluid, TinkerSmeltery.moltenGoldFluid, TinkerSmeltery.moltenCopperFluid, TinkerSmeltery.moltenTinFluid,
TinkerSmeltery.moltenAluminumFluid, TinkerSmeltery.moltenCobaltFluid, TinkerSmeltery.moltenArditeFluid, TinkerSmeltery.moltenBronzeFluid, TinkerSmeltery.moltenAlubrassFluid,
TinkerSmeltery.moltenManyullynFluid, TinkerSmeltery.moltenAlumiteFluid, TinkerSmeltery.moltenObsidianFluid, TinkerSmeltery.moltenSteelFluid, TinkerSmeltery.moltenGlassFluid,
TinkerSmeltery.moltenStoneFluid, TinkerSmeltery.moltenEmeraldFluid, TinkerSmeltery.bloodFluid, TinkerSmeltery.moltenNickelFluid, TinkerSmeltery.moltenLeadFluid,
TinkerSmeltery.moltenSilverFluid, TinkerSmeltery.moltenShinyFluid, TinkerSmeltery.moltenInvarFluid, TinkerSmeltery.moltenElectrumFluid, TinkerSmeltery.moltenEnderFluid,
TinkerSmeltery.glueFluid, TinkerSmeltery.pigIronFluid };
TinkerSmeltery.fluidBlocks = new Block[] { TinkerSmeltery.moltenIron, TinkerSmeltery.moltenGold, TinkerSmeltery.moltenCopper, TinkerSmeltery.moltenTin, TinkerSmeltery.moltenAluminum,
TinkerSmeltery.moltenCobalt, TinkerSmeltery.moltenArdite, TinkerSmeltery.moltenBronze, TinkerSmeltery.moltenAlubrass, TinkerSmeltery.moltenManyullyn, TinkerSmeltery.moltenAlumite,
TinkerSmeltery.moltenObsidian, TinkerSmeltery.moltenSteel, TinkerSmeltery.moltenGlass, TinkerSmeltery.moltenStone, TinkerSmeltery.moltenEmerald, TinkerSmeltery.blood,
TinkerSmeltery.moltenNickel, TinkerSmeltery.moltenLead, TinkerSmeltery.moltenSilver, TinkerSmeltery.moltenShiny, TinkerSmeltery.moltenInvar, TinkerSmeltery.moltenElectrum,
TinkerSmeltery.moltenEnder, TinkerSmeltery.glueFluidBlock };
TinkerSmeltery.speedBlock = new SpeedBlock().setBlockName("SpeedBlock");
@@ -444,19 +474,14 @@ public class TinkerSmeltery
TinkerSmeltery.clearGlass = new GlassBlockConnected("clear", false).setBlockName("GlassBlock");
TinkerSmeltery.clearGlass.stepSound = Block.soundTypeGlass;
TinkerSmeltery.glassPane = new GlassPaneConnected("clear", false);
TinkerSmeltery.stainedGlassClear = new GlassBlockConnectedMeta("stained", true, "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", "blue",
"brown", "green", "red", "black").setBlockName("GlassBlock.StainedClear");
TinkerSmeltery.stainedGlassClear = new GlassBlockConnectedMeta("stained", true, "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple",
"blue", "brown", "green", "red", "black").setBlockName("GlassBlock.StainedClear");
TinkerSmeltery.stainedGlassClear.stepSound = Block.soundTypeGlass;
TinkerSmeltery.stainedGlassClearPane = new GlassPaneStained();
GameRegistry.registerBlock(TinkerSmeltery.searedSlab, SearedSlabItem.class, "SearedSlab");
GameRegistry.registerBlock(TinkerSmeltery.speedSlab, SpeedSlabItem.class, "SpeedSlab");
GameRegistry.registerBlock(TinkerSmeltery.metalBlock, MetalItemBlock.class, "MetalBlock");
OreDictionary.registerOre("hambone", new ItemStack(TinkerWorld.meatBlock));
GameRegistry.addRecipe(new ItemStack(TinkerWorld.meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Items.bone), 'm', new ItemStack(Items.porkchop));
GameRegistry.registerBlock(TinkerSmeltery.glueBlock, "GlueBlock");
OreDictionary.registerOre("blockRubber", new ItemStack(TinkerSmeltery.glueBlock));
@@ -497,7 +522,7 @@ public class TinkerSmeltery
GameRegistry.registerBlock(TinkerSmeltery.glassPane, GlassPaneItem.class, "GlassPane");
GameRegistry.registerBlock(TinkerSmeltery.stainedGlassClear, StainedGlassClearItem.class, "GlassBlock.StainedClear");
GameRegistry.registerBlock(TinkerSmeltery.stainedGlassClearPane, StainedGlassClearPaneItem.class, "GlassPaneClearStained");
//Items
TinkerSmeltery.metalPattern = new MetalPattern("cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern");
GameRegistry.registerItem(TinkerSmeltery.metalPattern, "metalPattern");
@@ -508,14 +533,12 @@ public class TinkerSmeltery
{
TConstructRegistry.addItemStackToDirectory(patternTypes[i] + "Cast", new ItemStack(TinkerSmeltery.metalPattern, 1, i));
}
TinkerSmeltery.buckets = new FilledBucket(BlockUtils.getBlockFromItem(TinkerSmeltery.buckets));
GameRegistry.registerItem(TinkerSmeltery.buckets, "buckets");
}
@EventHandler
public void init (FMLInitializationEvent event)
{
}
@EventHandler
@@ -525,13 +548,12 @@ public class TinkerSmeltery
addOreDictionarySmelteryRecipes();
addRecipesForTableCasting();
}
private void craftingTableRecipes()
private void craftingTableRecipes ()
{
String[] patSurround = { "###", "#m#", "###" };
// stained Glass Recipes
String[] dyeTypes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue",
"dyeMagenta", "dyeOrange", "dyeWhite" };
@@ -550,8 +572,6 @@ public class TinkerSmeltery
Short.MAX_VALUE)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerSmeltery.stainedGlassClearPane, 1, i), color, new ItemStack(TinkerSmeltery.stainedGlassClearPane, 1, Short.MAX_VALUE)));
}
// Glass Recipes
GameRegistry.addRecipe(new ItemStack(Items.glass_bottle, 3), new Object[] { "# #", " # ", '#', TinkerSmeltery.clearGlass });
@@ -583,7 +603,6 @@ public class TinkerSmeltery
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.searedBlockNether, 1, 1), "b b", " b ", 'b', searedBrick); // Faucet
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel
// Slab Smeltery Components Recipes
for (int i = 0; i < 7; i++)
@@ -670,7 +689,7 @@ public class TinkerSmeltery
}
Smeltery.addDictionaryMelting("compressedSand1x", FluidType.Glass, 175, FluidContainerRegistry.BUCKET_VOLUME * 9);
}
private void addRecipesForTableCasting ()
{
/* Smeltery */
@@ -694,19 +713,20 @@ public class TinkerSmeltery
// Buckets
ItemStack bucket = new ItemStack(Items.bucket);
for (int sc = 0; sc < 24; sc++)
for (int sc = 0; sc < 23; sc++)
{
tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.buckets, 1, sc), new FluidStack(TinkerSmeltery.fluids[sc], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10);
}
tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.buckets, 1, 26), new FluidStack(TinkerSmeltery.fluids[26], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10);
tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.buckets, 1, 25), new FluidStack(TinkerSmeltery.fluids[25], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10);
// Clear glass pane casting
tableCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.glassPane), new FluidStack(TinkerSmeltery.moltenGlassFluid, 250), null, 80);
// Metal toolpart casting
TinkerSmeltery.liquids = new FluidStack[] { new FluidStack(TinkerSmeltery.moltenIronFluid, 1), new FluidStack(TinkerSmeltery.moltenCopperFluid, 1), new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1),
new FluidStack(TinkerSmeltery.moltenArditeFluid, 1), new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1), new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1),
new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1), new FluidStack(TinkerSmeltery.moltenSteelFluid, 1), new FluidStack(TinkerSmeltery.pigIronFluid, 1) };
TinkerSmeltery.liquids = new FluidStack[] { new FluidStack(TinkerSmeltery.moltenIronFluid, 1), new FluidStack(TinkerSmeltery.moltenCopperFluid, 1),
new FluidStack(TinkerSmeltery.moltenCobaltFluid, 1), new FluidStack(TinkerSmeltery.moltenArditeFluid, 1), new FluidStack(TinkerSmeltery.moltenManyullynFluid, 1),
new FluidStack(TinkerSmeltery.moltenBronzeFluid, 1), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, 1), new FluidStack(TinkerSmeltery.moltenObsidianFluid, 1),
new FluidStack(TinkerSmeltery.moltenSteelFluid, 1), new FluidStack(TinkerSmeltery.pigIronFluid, 1) };
int[] liquidDamage = new int[] { 2, 13, 10, 11, 12, 14, 15, 6, 16, 18 }; // ItemStack
// damage
// value
@@ -719,8 +739,10 @@ public class TinkerSmeltery
{
ItemStack cast = new ItemStack(TinkerSmeltery.metalPattern, 1, iter + 1);
tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue),
new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
tableCasting.addCastingRecipe(cast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2),
new ItemStack(TinkerTools.patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
for (int iterTwo = 0; iterTwo < TinkerSmeltery.liquids.length; iterTwo++)
{
@@ -741,8 +763,10 @@ public class TinkerSmeltery
}
ItemStack fullguardCast = new ItemStack(TinkerSmeltery.metalPattern, 1, 22);
tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false, 50);
tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false, 50);
tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false,
50);
tableCasting.addCastingRecipe(fullguardCast, new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(TinkerTools.fullGuard, 1, Short.MAX_VALUE), false,
50);
// Golden Food Stuff
FluidStack goldAmount = null;
@@ -759,7 +783,6 @@ public class TinkerSmeltery
tableCasting.addCastingRecipe(new ItemStack(Items.speckled_melon, 1), goldAmount, new ItemStack(Items.melon), true, 50);
tableCasting.addCastingRecipe(new ItemStack(TinkerTools.goldHead), goldAmount, new ItemStack(Items.skull, 1, 3), true, 50);
}
protected static void addRecipesForBasinCasting ()
{
@@ -767,29 +790,31 @@ public class TinkerSmeltery
// Block Casting
basinCasting.addCastingRecipe(new ItemStack(Blocks.iron_block), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.blockLiquidValue), null, true, 100); // Iron
basinCasting.addCastingRecipe(new ItemStack(Blocks.gold_block), new FluidStack(TinkerSmeltery.moltenGoldFluid, TConstruct.blockLiquidValue), null, true, 100); // gold
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); // copper
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 5), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); // tin
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 6), new FluidStack(TinkerSmeltery.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); // aluminum
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); // cobalt
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 1), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); // ardite
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 4), new FluidStack(TinkerSmeltery.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); // bronze
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 7), new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); // albrass
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 2), new FluidStack(TinkerSmeltery.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); // manyullyn
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 8), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); // alumite
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); // copper
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 5), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); // tin
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 6), new FluidStack(TinkerSmeltery.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); // aluminum
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); // cobalt
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 1), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); // ardite
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 4), new FluidStack(TinkerSmeltery.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); // bronze
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 7), new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); // albrass
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 2), new FluidStack(TinkerSmeltery.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); // manyullyn
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 8), new FluidStack(TinkerSmeltery.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); // alumite
basinCasting.addCastingRecipe(new ItemStack(Blocks.obsidian), new FluidStack(TinkerSmeltery.moltenObsidianFluid, TConstruct.oreLiquidValue), null, true, 100);// obsidian
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 9), new FluidStack(TinkerSmeltery.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); // steel
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 9), new FluidStack(TinkerSmeltery.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); // steel
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.clearGlass, 1, 0), new FluidStack(TinkerSmeltery.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); // glass
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.smeltery, 1, 4), new FluidStack(TinkerSmeltery.moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); // seared
// stone
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.smeltery, 1, 5), new FluidStack(TinkerSmeltery.moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Blocks.cobblestone), true, 100);
// stone
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.smeltery, 1, 5), new FluidStack(TinkerSmeltery.moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Blocks.cobblestone),
true, 100);
basinCasting.addCastingRecipe(new ItemStack(Blocks.emerald_block), new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 640 * 9), null, true, 100); // emerald
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.speedBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true, 100); // brownstone
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.speedBlock, 1, 0), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true,
100); // brownstone
if (PHConstruct.craftEndstone)
{
basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TinkerSmeltery.moltenEnderFluid, 50), new ItemStack(Blocks.obsidian), true, 100);
basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TinkerSmeltery.moltenEnderFluid, 250), new ItemStack(Blocks.sandstone), true, 100);
}
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 10), new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), null, true, 100); // ender
basinCasting.addCastingRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 10), new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000), null, true, 100); // ender
basinCasting.addCastingRecipe(new ItemStack(TinkerSmeltery.glueBlock), new FluidStack(TinkerSmeltery.glueFluid, TConstruct.blockLiquidValue), null, true, 100); // glue
// basinCasting.addCastingRecipe(new ItemStack(slimeGel, 1, 0), new
@@ -818,12 +843,13 @@ public class TinkerSmeltery
// Alloy Smelting
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenBronzeFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsBronzeAlloy)), new FluidStack(TinkerSmeltery.moltenCopperFluid,
TConstruct.ingotLiquidValue * 3), new FluidStack(TinkerSmeltery.moltenTinFluid, TConstruct.ingotLiquidValue)); // Bronze
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAluminumBrassAlloy)), new FluidStack(TinkerSmeltery.moltenAluminumFluid,
TConstruct.ingotLiquidValue * 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); // Aluminum Brass
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAlumiteAlloy)), new FluidStack(TinkerSmeltery.moltenAluminumFluid,
TConstruct.ingotLiquidValue * 5), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TinkerSmeltery.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); // Alumite
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack(TinkerSmeltery.moltenCobaltFluid,
TConstruct.ingotLiquidValue), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.ingotLiquidValue)); // Manyullyn
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlubrassFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAluminumBrassAlloy)), new FluidStack(
TinkerSmeltery.moltenAluminumFluid, TConstruct.ingotLiquidValue * 3), new FluidStack(TinkerSmeltery.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); // Aluminum Brass
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenAlumiteFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAlumiteAlloy)), new FluidStack(
TinkerSmeltery.moltenAluminumFluid, TConstruct.ingotLiquidValue * 5), new FluidStack(TinkerSmeltery.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(
TinkerSmeltery.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); // Alumite
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack(
TinkerSmeltery.moltenCobaltFluid, TConstruct.ingotLiquidValue), new FluidStack(TinkerSmeltery.moltenArditeFluid, TConstruct.ingotLiquidValue)); // Manyullyn
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.pigIronFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy)), new FluidStack(TinkerSmeltery.moltenIronFluid,
TConstruct.ingotLiquidValue), new FluidStack(TinkerSmeltery.moltenEmeraldFluid, 640), new FluidStack(TinkerSmeltery.bloodFluid, 80)); // Pigiron
Smeltery.addAlloyMixing(new FluidStack(TinkerSmeltery.moltenObsidianFluid, TConstruct.oreLiquidValue), new FluidStack(FluidRegistry.LAVA, 1000), new FluidStack(FluidRegistry.WATER, 1000)); //Obsidian
@@ -856,7 +882,7 @@ public class TinkerSmeltery
Smeltery.addMelting(FluidType.Glue, new ItemStack(TinkerTools.materials, 1, 36), 0, TConstruct.ingotLiquidValue);
Smeltery.addMelting(FluidType.Ender, new ItemStack(Items.ender_pearl, 4), 0, 250);
Smeltery.addMelting(TinkerSmeltery.metalBlock, 10, 50, new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000));
Smeltery.addMelting(TinkerWorld.metalBlock, 10, 50, new FluidStack(TinkerSmeltery.moltenEnderFluid, 1000));
Smeltery.addMelting(FluidType.Water, new ItemStack(Items.snowball, 1, 0), 0, 125);
Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.flint_and_steel, 1, 0), 0, TConstruct.ingotLiquidValue);
Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.compass, 1, 0), 0, TConstruct.ingotLiquidValue * 4);
@@ -963,7 +989,7 @@ public class TinkerSmeltery
Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_pickaxe, 1, 0), 0, TConstruct.ingotLiquidValue * 3);
Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_axe, 1, 0), 0, TConstruct.ingotLiquidValue * 3);
}
private void registerIngotCasting (FluidType ft)
{
ItemStack pattern = new ItemStack(TinkerSmeltery.metalPattern, 1, 0);
@@ -1,4 +1,4 @@
package tconstruct.world.blocks;
package tconstruct.smeltery.blocks;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@@ -3,6 +3,9 @@ package tconstruct.tools;
import java.util.EnumSet;
import mantle.items.abstracts.CraftingItem;
import mantle.pulsar.pulse.IPulse;
import mantle.pulsar.pulse.Pulse;
import mantle.pulsar.pulse.PulseProxy;
import mantle.utils.RecipeRemover;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -11,6 +14,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
@@ -103,21 +107,24 @@ import tconstruct.util.config.PHConstruct;
import tconstruct.world.TinkerWorld;
import tconstruct.world.blocks.SoilBlock;
import tconstruct.world.itemblocks.CraftedSoilItemBlock;
import tconstruct.world.items.GoldenHead;
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.SidedProxy;
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.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@Mod(modid = "TinkerTools", name = "TinkerTools", version = "${tinkertoolversion}")
public class TinkerTools
@ObjectHolder(TConstruct.modID)
@Pulse(id = TConstruct.modID)
public class TinkerTools implements IPulse //TODO: Remove IPulse implementation, keep annotation
{
/* Proxies for sides, used for graphics processing */
@SidedProxy(clientSide = "tconstruct.tools.ToolProxyClient", serverSide = "tconstruct.tools.ToolProxyCommon")
@PulseProxy(client = "tconstruct.tools.ToolProxyClient", server = "tconstruct.tools.ToolProxyCommon")
public static ToolProxyCommon proxy;
@Instance("TinkerTools")
@@ -356,6 +363,7 @@ public class TinkerTools
// compat
TConstructRegistry.addItemToDirectory(toolPartStrings[i], toolParts[i]);
}
goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead");
GameRegistry.registerItem(TinkerTools.goldHead, "goldHead");
TinkerTools.creativeModifier = new CreativeModifier().setUnlocalizedName("tconstruct.modifier.creative");
@@ -23,6 +23,7 @@ import tconstruct.client.gui.StencilTableGui;
import tconstruct.client.gui.ToolForgeGui;
import tconstruct.client.gui.ToolStationGui;
import tconstruct.client.tabs.TabRegistry;
import tconstruct.common.TProxyCommon;
import tconstruct.mechworks.MechworksProxyCommon;
import tconstruct.mechworks.inventory.ContainerLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
@@ -49,6 +50,21 @@ public class ToolProxyClient extends ToolProxyCommon
public ToolProxyClient()
{
MinecraftForge.EVENT_BUS.register(this);
registerGuiHandler();
}
@Override
protected void registerGuiHandler()
{
super.registerGuiHandler();
TProxyCommon.registerClientGuiHandler(toolStationID, this);
TProxyCommon.registerClientGuiHandler(partBuilderID, this);
TProxyCommon.registerClientGuiHandler(patternChestID, this);
TProxyCommon.registerClientGuiHandler(stencilTableID, this);
TProxyCommon.registerClientGuiHandler(frypanGuiID, this);
TProxyCommon.registerClientGuiHandler(toolForgeID, this);
TProxyCommon.registerClientGuiHandler(furnaceID, this);
TProxyCommon.registerClientGuiHandler(craftingStationID, this);
}
@Override
@@ -1,9 +1,11 @@
package tconstruct.tools;
import tconstruct.common.TProxyCommon;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.network.IGuiHandler;
public class ToolProxyCommon implements IGuiHandler
@@ -16,14 +18,24 @@ public class ToolProxyCommon implements IGuiHandler
public static final int toolForgeID = 5;
public static final int furnaceID = 8;
public static final int craftingStationID = 11;
public void preInit()
public ToolProxyCommon()
{
registerGuiHandler();
}
public void postInit()
protected void registerGuiHandler()
{
TProxyCommon.registerServerGuiHandler(toolStationID, this);
TProxyCommon.registerServerGuiHandler(partBuilderID, this);
TProxyCommon.registerServerGuiHandler(patternChestID, this);
TProxyCommon.registerServerGuiHandler(stencilTableID, this);
TProxyCommon.registerServerGuiHandler(frypanGuiID, this);
TProxyCommon.registerServerGuiHandler(toolForgeID, this);
TProxyCommon.registerServerGuiHandler(furnaceID, this);
TProxyCommon.registerServerGuiHandler(craftingStationID, this);
}
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
@@ -18,10 +18,10 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.smeltery.TinkerSmeltery;
import tconstruct.tools.ToolProxyCommon;
import tconstruct.tools.logic.ToolForgeLogic;
import tconstruct.tools.model.TableRender;
import tconstruct.world.TinkerWorld;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -82,7 +82,7 @@ public class ToolForgeBlock extends InventoryBlock
case 3:
return Blocks.emerald_block.getIcon(side, 0);
default:
return TinkerSmeltery.metalBlock.getIcon(side, meta - 4);
return TinkerWorld.metalBlock.getIcon(side, meta - 4);
}
}
@@ -1,785 +0,0 @@
package tconstruct.util;
import java.util.Random;
import mantle.blocks.BlockUtils;
import mantle.world.WorldHelper;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.boss.IBossDisplayData;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
import net.minecraftforge.event.entity.player.BonemealEvent;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
import tconstruct.common.TRepo;
import tconstruct.items.tools.FryingPan;
import tconstruct.library.ActiveToolMod;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.event.PartBuilderEvent;
import tconstruct.library.event.ToolCraftEvent;
import tconstruct.library.tools.ArrowMaterial;
import tconstruct.library.tools.BowMaterial;
import tconstruct.library.tools.BowstringMaterial;
import tconstruct.library.tools.FletchingMaterial;
import tconstruct.library.tools.ToolCore;
import tconstruct.library.tools.Weapon;
import tconstruct.smeltery.blocks.LiquidMetalFinite;
import tconstruct.smeltery.blocks.TankAirBlock;
import tconstruct.util.config.PHConstruct;
import tconstruct.util.player.ArmorExtended;
import tconstruct.util.player.TPlayerStats;
import tconstruct.world.entity.BlueSlime;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class TEventHandler
{
Random random = new Random();
/* Crafting */
@SubscribeEvent
public void craftTool (ToolCraftEvent.NormalTool event)
{
NBTTagCompound toolTag = event.toolTag.getCompoundTag("InfiTool");
if (PHConstruct.denyMattock && event.tool == TRepo.mattock)
{
int head = toolTag.getInteger("Head");
int handle = toolTag.getInteger("Handle");
int accessory = toolTag.getInteger("Accessory");
if (!allowCrafting(head, handle, accessory))
{
event.setResult(Result.DENY);
return;
}
}
int thaum = 0;
if (toolTag.getInteger("Head") == 31)
thaum++;
if (toolTag.getInteger("Handle") == 31)
thaum++;
if (toolTag.getInteger("Accessory") == 31)
thaum++;
if (toolTag.getInteger("Extra") == 31)
thaum++;
if ((thaum >= 3) || (!toolTag.hasKey("Accessory") && thaum >= 2))
{
int modifiers = toolTag.getInteger("Modifiers");
modifiers += 2;
toolTag.setInteger("Modifiers", modifiers);
}
else if (thaum >= 1)
{
int modifiers = toolTag.getInteger("Modifiers");
modifiers += 1;
toolTag.setInteger("Modifiers", modifiers);
}
if (event.tool == TRepo.shortbow)
{
BowMaterial top = TConstructRegistry.getBowMaterial(toolTag.getInteger("Head"));
BowMaterial bottom = TConstructRegistry.getBowMaterial(toolTag.getInteger("Accessory"));
BowstringMaterial string = (BowstringMaterial) TConstructRegistry.getCustomMaterial(toolTag.getInteger("Handle"), BowstringMaterial.class);
if (top != null && bottom != null && string != null)
{
if (toolTag.getInteger("Handle") == 1)
{
int modifiers = toolTag.getInteger("Modifiers");
modifiers += 1;
toolTag.setInteger("Modifiers", modifiers);
}
int durability = (int) ((top.durability + bottom.durability) / 2 * string.durabilityModifier);
toolTag.setInteger("TotalDurability", durability);
toolTag.setInteger("BaseDurability", durability);
int drawSpeed = (int) ((top.drawspeed + bottom.drawspeed) / 2 * string.drawspeedModifier);
toolTag.setInteger("DrawSpeed", drawSpeed);
toolTag.setInteger("BaseDrawSpeed", drawSpeed);
float flightSpeed = (top.flightSpeedMax + bottom.flightSpeedMax) / 2f * string.flightSpeedModifier;
toolTag.setFloat("FlightSpeed", flightSpeed);
}
}
if (event.tool == TRepo.arrow)
{
ArrowMaterial head = TConstructRegistry.getArrowMaterial(toolTag.getInteger("Head"));
ArrowMaterial shaft = TConstructRegistry.getArrowMaterial(toolTag.getInteger("Handle"));
FletchingMaterial fletching = (FletchingMaterial) TConstructRegistry.getCustomMaterial(toolTag.getInteger("Accessory"), FletchingMaterial.class);
if (head != null && shaft != null && fletching != null)
{
float mass = head.mass / 5f + shaft.mass + fletching.mass;
float shatter = (head.breakChance + shaft.breakChance + fletching.breakChance) / 4f;
float accuracy = (head.accuracy + shaft.accuracy + fletching.accuracy) / 3;
ItemStack arrow = new ItemStack(event.tool, 4);
toolTag.setInteger("TotalDurability", 0);
toolTag.setFloat("Mass", mass);
toolTag.setFloat("BreakChance", shatter);
toolTag.setFloat("Accuracy", accuracy);
toolTag.setInteger("Unbreaking", 10);
arrow.setTagCompound(event.toolTag);
event.overrideResult(arrow);
}
}
if (event.tool == TRepo.battlesign)
{
int modifiers = toolTag.getInteger("Modifiers");
modifiers += 1;
toolTag.setInteger("Modifiers", modifiers);
}
}
private boolean allowCrafting (int head, int handle, int accessory)
{
int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 };
for (int i = 0; i < nonMetals.length; i++)
{
if (head == nonMetals[i] || handle == nonMetals[i] || accessory == nonMetals[i])
return false;
}
return true;
}
@SubscribeEvent
public void craftPart (PartBuilderEvent.NormalPart event)
{
if (event.pattern.getItem() == TRepo.woodPattern && event.pattern.getItemDamage() == 23)
{
ItemStack result = craftBowString(event.material);
if (result != null)
{
event.overrideResult(new ItemStack[] { result, null });
}
}
if (event.pattern.getItem() == TRepo.woodPattern && event.pattern.getItemDamage() == 24)
{
ItemStack result = craftFletching(event.material);
if (result != null)
{
event.overrideResult(new ItemStack[] { result, null });
}
}
}
public static ItemStack craftBowString (ItemStack stack)
{
if (stack.stackSize < 3)
return null;
BowstringMaterial mat = (BowstringMaterial) TConstructRegistry.getCustomMaterial(stack, BowstringMaterial.class);
if (mat != null)
return mat.craftingItem.copy();
return null;
}
public static ItemStack craftFletching (ItemStack stack)
{
if (matchesLeaves(stack))
{
FletchingMaterial leaves = (FletchingMaterial) TConstructRegistry.getCustomMaterial(new ItemStack(Blocks.leaves), FletchingMaterial.class);
return leaves.craftingItem.copy();
}
FletchingMaterial mat = (FletchingMaterial) TConstructRegistry.getCustomMaterial(stack, FletchingMaterial.class);
if (mat != null)
return mat.craftingItem.copy();
return null;
}
public static boolean matchesLeaves (ItemStack stack)
{
if (stack != null)
{
Block block = BlockUtils.getBlockFromItemStack(stack);
if (block != null)
{
if (block.isLeaves(null, 0, 0, 0))
return true;
}
}
return false;
}
/* Damage */
@SubscribeEvent
public void onHurt (LivingHurtEvent event)
{
EntityLivingBase reciever = event.entityLiving;
if (reciever instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entityLiving;
// Cutlass
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null && player.isUsingItem())
{
Item item = stack.getItem();
if (item == TRepo.cutlass)
{
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 3 * 20, 1));
}
else if (item == TRepo.battlesign)
{
event.ammount *= 1.5; //Puts battlesign blocking at 3/4 instead of 1/2
}
}
}
else if (reciever instanceof EntityCreeper)
{
Entity attacker = event.source.getEntity();
if (attacker instanceof EntityLivingBase)
{
Entity target = ((EntityCreeper) reciever).getAttackTarget();
if (target != null)
{
float d1 = reciever.getDistanceToEntity(((EntityCreeper) reciever).getAttackTarget());
float d2 = reciever.getDistanceToEntity(attacker);
if (d2 < d1)
{
((EntityCreeper) event.entityLiving).setAttackTarget((EntityLivingBase) event.source.getEntity());
}
}
}
}
}
@SubscribeEvent
public void onAttack (LivingAttackEvent event)
{
//System.out.println("Damage: "+event.ammount);
if (event.entityLiving instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entityLiving;
//Cutlass
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null && stack.getItem() == TRepo.battlesign && player.isUsingItem())
{
DamageSource source = event.source;
if (!source.isUnblockable() && !source.isMagicDamage() && !source.isExplosion())
{
if (source instanceof EntityDamageSourceIndirect)
{
if (random.nextInt(3) == 0)
{
Entity attacker = source.getEntity();
Entity projectile = ((EntityDamageSourceIndirect) source).getSourceOfDamage();
projectile.motionX *= -1;
projectile.motionZ *= -1;
projectile.setDead();
event.setCanceled(true);
if (projectile.getClass() == EntityArrow.class && !player.worldObj.isRemote)
{
EntityArrow reflection = null;
if (attacker instanceof EntityLivingBase)
reflection = new EntityArrow(player.worldObj, (EntityLivingBase) attacker, 0);
else
reflection = new EntityArrow(player.worldObj, player, 0);
Vec3 look = player.getLookVec();
reflection.posX = projectile.posX;
reflection.posY = projectile.posY;
reflection.posZ = projectile.posZ;
reflection.motionX = (projectile.motionX + (look.xCoord * 8)) / 6;
reflection.motionY = (projectile.motionY + (look.yCoord * 8)) / 6;
reflection.motionZ = (projectile.motionZ + (look.zCoord * 8)) / 6;
reflection.damage = ((EntityArrow) projectile).damage;
player.worldObj.spawnEntityInWorld(reflection);
}
}
}
else
{
Entity attacker = source.getEntity();
if(attacker != null)
{
attacker.attackEntityFrom(DamageSource.causeThornsDamage(player), event.ammount);
}
}
}
}
}
}
/* Drops */
@SubscribeEvent
public void onLivingDrop (LivingDropsEvent event)
{
if (event.entityLiving == null)
return;
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof FryingPan)
{
for (int i = 0; i < event.drops.size(); i++)
{
ItemStack is = event.drops.get(i).getEntityItem();
if (FurnaceRecipes.smelting().getSmeltingResult(is) != null && FurnaceRecipes.smelting().getSmeltingResult(is).getItem() instanceof ItemFood)
{
NBTTagCompound stackCompound = is.getTagCompound();
if (stackCompound == null)
{
stackCompound = new NBTTagCompound();
}
stackCompound.setBoolean("frypanKill", true);
is.setTagCompound(stackCompound);
}
}
}
}
if (random.nextInt(200) == 0 && event.entityLiving instanceof IMob && event.source.damageType.equals("player"))
{
if (event.entityLiving instanceof BlueSlime)
{
BlueSlime slime = (BlueSlime) event.entityLiving;
if (slime.getSlimeSize() < 8)
return;
}
int count = event.entityLiving instanceof EntityDragon ? 5 : 1;
for (int i = 0; i < count; i++)
{
ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 1);
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
entityitem.delayBeforeCanPickup = 10;
event.drops.add(entityitem);
}
}
if (event.entityLiving instanceof IBossDisplayData)
{
ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 3);
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
entityitem.delayBeforeCanPickup = 10;
event.drops.add(entityitem);
}
if (!event.entityLiving.isChild() && event.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
{
if (event.entityLiving.getClass() == EntityCow.class)
{
int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1;
for (int iter = 0; iter < amount; ++iter)
{
addDrops(event, new ItemStack(Items.leather, 1));
}
}
if (event.entityLiving.getClass() == EntityChicken.class)
{
int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1;
for (int iter = 0; iter < amount; ++iter)
{
addDrops(event, new ItemStack(Items.feather, 1));
}
}
}
if (event.recentlyHit)
{
if (event.entityLiving.getClass() == EntitySkeleton.class)
{
EntitySkeleton enemy = (EntitySkeleton) event.entityLiving;
if (event.source.damageType.equals("player"))
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore)
{
int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading");
if (stack.getItem() == TRepo.cleaver)
beheading += 2;
if (beheading > 0 && random.nextInt(100) < beheading * 10)
{
addDrops(event, new ItemStack(Items.skull, 1, enemy.getSkeletonType()));
}
}
}
if (enemy.getSkeletonType() == 1 && random.nextInt(Math.max(1, 5 - event.lootingLevel)) == 0)
{
addDrops(event, new ItemStack(TRepo.materials, 1, 8));
}
}
if (event.entityLiving.getClass() == EntityZombie.class)
{
EntityZombie enemy = (EntityZombie) event.entityLiving;
if (event.source.damageType.equals("player"))
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore)
{
int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading");
if (stack != null && stack.hasTagCompound() && stack.getItem() == TRepo.cleaver)
beheading += 2;
if (beheading > 0 && random.nextInt(100) < beheading * 10)
{
addDrops(event, new ItemStack(Items.skull, 1, 2));
}
}
if (stack != null && stack.hasTagCompound() && stack.getItem() == TRepo.cleaver && random.nextInt(100) < 10) //Swap out for real beheading
{
addDrops(event, new ItemStack(Items.skull, 1, 2));
}
}
}
if (event.entityLiving.getClass() == EntityCreeper.class)
{
EntityCreeper enemy = (EntityCreeper) event.entityLiving;
if (event.source.damageType.equals("player"))
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore)
{
int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading");
if (stack.getItem() == TRepo.cleaver)
beheading += 2;
if (beheading > 0 && random.nextInt(100) < beheading * 5)
{
addDrops(event, new ItemStack(Items.skull, 1, 4));
}
}
}
}
}
if (event.entityLiving.getClass() == EntityGhast.class)
{
if (PHConstruct.uhcGhastDrops)
{
for (EntityItem o : event.drops)
{
if (o.getEntityItem().getItem() == Items.ghast_tear)
{
o.setEntityItemStack(new ItemStack(Items.gold_ingot, 1));
}
}
}
else
{
addDrops(event, new ItemStack(Items.ghast_tear, 1));
}
}
// }
if (event.entityLiving instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entityLiving;
if (PHConstruct.dropPlayerHeads)
{
ItemStack dropStack = new ItemStack(Items.skull, 1, 3);
NBTTagCompound nametag = new NBTTagCompound();
nametag.setString("SkullOwner", player.getDisplayName());
dropStack.setTagCompound(nametag);
addDrops(event, dropStack);
}
else if (event.source.damageType.equals("player"))
{
EntityPlayer source = (EntityPlayer) event.source.getEntity();
ItemStack stack = source.getCurrentEquippedItem();
if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof ToolCore)
{
int beheading = stack.getTagCompound().getCompoundTag("InfiTool").getInteger("Beheading");
if (stack.getItem() == TRepo.cleaver)
beheading += 2;
if (beheading > 0 && random.nextInt(100) < beheading * 50)
{
ItemStack dropStack = new ItemStack(Items.skull, 1, 3);
NBTTagCompound nametag = new NBTTagCompound();
nametag.setString("SkullOwner", player.getDisplayName());
dropStack.setTagCompound(nametag);
addDrops(event, dropStack);
}
}
}
}
}
/*@SubscribeEvent
public void onLivingDeath (LivingDeathEvent event)
{
Entity cause = event.source.getSourceOfDamage();
if (cause != null && cause instanceof EntityPlayer)
{
EntityPlayer murderer = (EntityPlayer) cause;
ItemStack stack = murderer.getHeldItem();
if (stack != null && stack.getItem() instanceof Weapon)
{
murderer.addStat(TAchievements.achievements.get("tconstruct:enemySlayer"), 1);
}
}
}*/
void addDrops (LivingDropsEvent event, ItemStack dropStack)
{
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
entityitem.delayBeforeCanPickup = 10;
event.drops.add(entityitem);
}
/*
* @ForgeSubscribe public void onLivingSpawn (EntityJoinWorldEvent event) {
* if (event.entity instanceof EntityXPOrb) {
* TConstruct.logger.info("Entity: " + event.entity); } }
*/
@SubscribeEvent
public void onLivingSpawn (LivingSpawnEvent.SpecialSpawn event)
{
EntityLivingBase living = event.entityLiving;
if (living.getClass() == EntitySpider.class && random.nextInt(100) == 0)
{
EntityCreeper creeper = new EntityCreeper(living.worldObj);
spawnEntityLiving(living.posX, living.posY + 1, living.posZ, creeper, living.worldObj);
if (living.riddenByEntity != null)
creeper.mountEntity(living.riddenByEntity);
else
creeper.mountEntity(living);
EntityXPOrb orb = new EntityXPOrb(living.worldObj, living.posX, living.posY, living.posZ, random.nextInt(20) + 20);
orb.mountEntity(creeper);
}
}
public static void spawnEntityLiving (double x, double y, double z, EntityLiving entity, World world)
{
if (!world.isRemote)
{
entity.setPosition(x, y, z);
entity.onSpawnWithEgg((IEntityLivingData) null);
world.spawnEntityInWorld(entity);
}
}
/* Bonemeal */
@SubscribeEvent
public void bonemealEvent (BonemealEvent event)
{
if (!event.world.isRemote)
{
if (event.block == TRepo.slimeSapling)
{
if (TRepo.slimeSapling.boneFertilize(event.world, event.x, event.y, event.z, event.world.rand, event.entityPlayer))
event.setResult(Event.Result.ALLOW);
}
}
}
/* Ore Dictionary */
@SubscribeEvent
public void registerOre (OreRegisterEvent evt)
{
if (evt.Name == "crystalQuartz")
{
TRepo.modAttack.addStackToMatchList(evt.Ore, 2);
}
else if (evt.Name == "crystalCerusQuartz")
{
TRepo.modAttack.addStackToMatchList(evt.Ore, 24);
}
}
@SubscribeEvent
public void bucketFill (FillBucketEvent evt)
{
if (evt.current.getItem() == Items.bucket && evt.target.typeOfHit == MovingObjectType.ENTITY)
{
int hitX = evt.target.blockX;
int hitY = evt.target.blockY;
int hitZ = evt.target.blockZ;
if (evt.entityPlayer != null && !evt.entityPlayer.canPlayerEdit(hitX, hitY, hitZ, evt.target.sideHit, evt.current))
{
return;
}
Block bID = evt.world.getBlock(hitX, hitY, hitZ);
for (int id = 0; id < TRepo.fluidBlocks.length; id++)
{
if (bID == TRepo.fluidBlocks[id])
{
if (evt.entityPlayer.capabilities.isCreativeMode)
{
WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ);
}
else
{
if (TRepo.fluidBlocks[id] instanceof LiquidMetalFinite)
{
WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ);
/*
* int quanta = 0; for (int posX = -1; posX <= 1;
* posX++) { for (int posZ = -1; posZ <= 1; posZ++)
* { int localID = evt.world.getBlockId(hitX + posX,
* hitY, hitZ + posZ); if (localID == bID) { quanta
* += evt.world.getBlockMetadata(hitX + posX, hitY,
* hitZ + posZ) + 1; } } }
*
* if (quanta >= 8) { while (quanta > 0) { for (int
* posX = -1; posX <= 1; posX++) { for (int posZ =
* -1; posZ <= 1; posZ++) { int localID =
* evt.world.getBlockId(hitX + posX, hitY, hitZ +
* posZ); if (localID == bID) { quanta -= 1; int
* meta = evt.world.getBlockMetadata(hitX + posX,
* hitY, hitZ + posZ); if (meta > 0)
* evt.world.setBlockMetadataWithNotify(hitX + posX,
* hitY, hitZ + posZ, meta - 1, 3); else
* evt.world.setBlockToAir(hitX + posX, hitY, hitZ +
* posZ); } } } } }
*/
}
else
{
WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ);
}
evt.setResult(Result.ALLOW);
evt.result = new ItemStack(TRepo.buckets, 1, id);
}
}
}
}
}
// TODO 1.7 Fix this -- for ticking stuffs in extra armor slots
@SubscribeEvent
public void livingUpdate (LivingUpdateEvent event)
{
if (event.entityLiving instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entityLiving;
TPlayerStats stats = TPlayerStats.get(player);
if (stats != null && stats.armor != null)
{
ArmorExtended armor = stats.armor;
for (int i = 0; i < armor.getSizeInventory(); i++)
{
if (armor.getStackInSlot(i) != null)
{
armor.getStackInSlot(i).getItem().onUpdate(armor.getStackInSlot(i), player.worldObj, player, i, false);
armor.getStackInSlot(i).getItem().onArmorTick(player.worldObj, player, armor.getStackInSlot(i));
}
}
}
}
}
// Player interact event - prevent breaking of tank air blocks in creative
@SubscribeEvent
public void playerInteract (PlayerInteractEvent event)
{
if (event.action == Action.LEFT_CLICK_BLOCK)
{
Block block = event.entity.worldObj.getBlock(event.x, event.y, event.z);
if (block instanceof TankAirBlock)
{
event.setCanceled(true);
}
}
}
@SubscribeEvent
public void harvestBlock (HarvestDropsEvent event)
{
if (event.harvester == null)
return;
ItemStack stack = event.harvester.getCurrentEquippedItem();
if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ToolCore))
return;
if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Lava"))
{
for (int i = 0; i < event.drops.size(); i++)
{
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(event.drops.get(i));
if (result != null)
event.drops.set(i, result.copy());
}
}
}
@SubscribeEvent
public void breakBlock (BreakEvent event)
{
ItemStack stack = event.getPlayer().getCurrentEquippedItem();
if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ToolCore))
return;
if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Broken"))
{
event.setCanceled(true);
}
else
{
for (ActiveToolMod mod : TConstructRegistry.activeModifiers)
if (mod.beforeBlockBreak((ToolCore)stack.getItem(), stack, event.x, event.y, event.z, event.getPlayer()))
event.setCanceled(true);
}
}
}
@@ -1,9 +1,11 @@
package tconstruct.util.config;
import java.io.File;
import java.io.IOException;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import tconstruct.TConstruct;
import tconstruct.library.tools.AbilityHelper;
import tconstruct.tools.TinkerTools;
import cpw.mods.fml.common.Loader;
@@ -11,11 +13,51 @@ import cpw.mods.fml.common.Loader;
public class PHConstruct
{
public static void initProps (File confFile)
public static void initProps (File location)
{
/* Before we do anything, let's set up which modules can and cannot load. */
File modules = new File(location + "/TinkersModules.txt");
/* Some basic debugging will go a long way */
try
{
modules.createNewFile();
}
catch (IOException e)
{
TConstruct.logger.warn("Could not create module configuration file for TConstruct. Reason:");
TConstruct.logger.warn(e.getLocalizedMessage());
}
/* [Forge] Configuration class, used as config method */
Configuration config = new Configuration(confFile);
Configuration config = new Configuration(modules);
config.load();
worldModule = config.get("Modules: Disabling these will disable a chunk of the mod", "World", true, "Ores, slime islands, essence berries, and the like.").getBoolean(true);
toolModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Tools", true, "The main core of the mod! All of the tools, the tables, and the patterns are here.").getBoolean(true);
smelteryModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Liquid metals, casting, and the multiblock structure.").getBoolean(true);
mechworksModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Mechanical machinations and steampunk inspired shenanigans.").getBoolean(true);
armorModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Armor", true, "Modifyable armors, such as the traveller's gear.").getBoolean(true);
prayerModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Prayers", true, "Area of effect and time delayed status changes. Scrolltastic!").getBoolean(true);
cropifyModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Cropify", true, "Tinkering with the world never felt this bushy.").getBoolean(true);
config.save();
/* Here we will set up the config file for the mod
* First: Create a folder inside the config folder
* Second: Create the actual config file
* Note: Configs are a pain, but absolutely necessary for every mod.
*/
File newFile = new File(location + "/TinkersWorkshop.txt");
try
{
newFile.createNewFile();
}
catch (IOException e)
{
TConstruct.logger.warn("Could not create configuration file for TConstruct. Reason:");
TConstruct.logger.warn(e.getLocalizedMessage());
}
config = new Configuration(newFile);
cfglocation = location;
/* Load the configuration file */
config.load();
@@ -51,7 +93,7 @@ public class PHConstruct
ingotsAlumiteAlloy = config.get("Smeltery Output Modification", "Alumite ingot return", 3, "Number of ingots returned from smelting Alumite in the smeltery").getDouble(3);
ingotsManyullynAlloy = config.get("Smeltery Output Modification", "Manyullyn ingot return", 1, "Number of ingots returned from smelting Manyullyn in the smeltery").getDouble(1);
ingotsPigironAlloy = config.get("Smeltery Output Modification", "Pig Iron ingot return", 1, "Number of ingots returned from smelting Pig Iron in the smeltery").getDouble(1);
exoCraftingEnabled = config.get("Equipables", "Exo-Armor-Craftable", true).getBoolean(true);
capesEnabled = config.get("Superfun", "Enable-TCon-Capes", true).getBoolean(true);
@@ -171,7 +213,6 @@ public class PHConstruct
/* Save the configuration file */
config.save();
String location = Loader.instance().getConfigDir().toString();
File gt = new File(location + "/GregTech");
if (gt.exists())
{
@@ -182,6 +223,15 @@ public class PHConstruct
}
}
//Modules
public static boolean worldModule;
public static boolean toolModule;
public static boolean smelteryModule;
public static boolean mechworksModule;
public static boolean armorModule;
public static boolean prayerModule;
public static boolean cropifyModule;
public static boolean exoCraftingEnabled;
public static boolean capesEnabled;
+58 -68
View File
@@ -1,5 +1,8 @@
package tconstruct.world;
import mantle.pulsar.pulse.IPulse;
import mantle.pulsar.pulse.Pulse;
import mantle.pulsar.pulse.PulseProxy;
import mantle.utils.RecipeRemover;
import net.minecraft.block.Block;
import net.minecraft.block.Block.SoundType;
@@ -15,17 +18,13 @@ import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import tconstruct.TConstruct;
import tconstruct.armor.TinkerArmor;
import tconstruct.blocks.SlabBase;
import tconstruct.blocks.logic.DryingRackLogic;
import tconstruct.blocks.slime.SlimeFluid;
import tconstruct.blocks.slime.SlimeGel;
import tconstruct.blocks.slime.SlimeGrass;
@@ -37,13 +36,9 @@ import tconstruct.blocks.traps.Punji;
import tconstruct.client.StepSoundSlime;
import tconstruct.common.itemblocks.MetadataItemBlock;
import tconstruct.library.TConstructRegistry;
import tconstruct.mechworks.TinkerMechworks;
import tconstruct.mechworks.entity.item.EntityLandmineFirework;
import tconstruct.mechworks.entity.item.ExplosivePrimed;
import tconstruct.mechworks.itemblocks.ItemBlockLandmine;
import tconstruct.mechworks.logic.TileEntityLandmine;
import tconstruct.smeltery.TinkerSmeltery;
import tconstruct.smeltery.blocks.MetalOre;
import tconstruct.smeltery.itemblocks.MetalItemBlock;
import tconstruct.tools.TDispenserBehaviorArrow;
import tconstruct.tools.TinkerTools;
import tconstruct.tools.blocks.MultiBrick;
@@ -63,9 +58,12 @@ import tconstruct.world.blocks.SlimeExplosive;
import tconstruct.world.blocks.SlimePad;
import tconstruct.world.blocks.StoneLadder;
import tconstruct.world.blocks.StoneTorch;
import tconstruct.world.blocks.TMetalBlock;
import tconstruct.world.blocks.WoodRail;
import tconstruct.world.entity.BlueSlime;
import tconstruct.world.entity.Crystal;
import tconstruct.world.gen.TBaseWorldGenerator;
import tconstruct.world.gen.TerrainGenEventHandler;
import tconstruct.world.itemblocks.BarricadeItem;
import tconstruct.world.itemblocks.GravelOreItem;
import tconstruct.world.itemblocks.HamboneItemBlock;
@@ -81,22 +79,22 @@ import tconstruct.world.itemblocks.WoolSlab1Item;
import tconstruct.world.itemblocks.WoolSlab2Item;
import tconstruct.world.items.OreBerries;
import tconstruct.world.items.StrangeFood;
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.SidedProxy;
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.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@Mod(modid = "TinkerWorld", name = "TinkerWorld", version = "${tinkerworldversion}")
public class TinkerWorld
@ObjectHolder(TConstruct.modID)
@Pulse(id = TConstruct.modID)
public class TinkerWorld implements IPulse //TODO: Remove IPulse implementation, keep annotation
{
@Instance("TinkerWorld")
public static TinkerWorld instance;
@SidedProxy(clientSide = "tconstruct.world.TinkerWorldProxyClient", serverSide = "tconstruct.world.TinkerWorldProxyCommon")
@PulseProxy(client = "tconstruct.world.TinkerWorldProxyClient", server = "tconstruct.world.TinkerWorldProxyCommon")
public static TinkerWorldProxyCommon proxy;
public static Item strangeFood;
@@ -135,6 +133,7 @@ public class TinkerWorld
public static ChestGenHooks tinkerHouseChest;
public static ChestGenHooks tinkerHousePatterns;
public static Block punji;
public static Block metalBlock;
public TinkerWorld()
{
@@ -167,7 +166,8 @@ public class TinkerWorld
TinkerWorld.slimePool = new SlimeFluid(TinkerWorld.blueSlimeFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(TinkerWorld.slimeStep).setBlockName("liquid.slime");
GameRegistry.registerBlock(TinkerWorld.slimePool, "liquid.slime");
TinkerWorld.blueSlimeFluid.setBlock(TinkerWorld.slimePool);
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerWorld.blueSlimeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 24), new ItemStack(Items.bucket)));
//TODO: Add a new bucket for blue slime
//FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TinkerWorld.blueSlimeFluid, 1000), new ItemStack(TinkerSmeltery.buckets, 1, 24), new ItemStack(Items.bucket)));
// Slime Islands
TinkerWorld.slimeGel = new SlimeGel().setStepSound(TinkerWorld.slimeStep).setLightOpacity(0).setBlockName("slime.gel");
@@ -214,8 +214,6 @@ public class TinkerWorld
GameRegistry.registerBlock(TinkerWorld.woolSlab2, WoolSlab2Item.class, "WoolSlab2");
// Traps
GameRegistry.registerBlock(TinkerMechworks.landmine, ItemBlockLandmine.class, "Redstone.Landmine");
GameRegistry.registerTileEntity(TileEntityLandmine.class, "Landmine");
GameRegistry.registerBlock(TinkerWorld.punji, "trap.punji");
GameRegistry.registerBlock(TinkerWorld.barricadeOak, BarricadeItem.class, "trap.barricade.oak");
GameRegistry.registerBlock(TinkerWorld.barricadeSpruce, BarricadeItem.class, "trap.barricade.spruce");
@@ -223,8 +221,6 @@ public class TinkerWorld
GameRegistry.registerBlock(TinkerWorld.barricadeJungle, BarricadeItem.class, "trap.barricade.jungle");
GameRegistry.registerBlock(TinkerWorld.slimeExplosive, MetadataItemBlock.class, "explosive.slime");
GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack");
GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack");
// fluids
// Slime Islands
@@ -281,6 +277,10 @@ public class TinkerWorld
// Items.minecartPowered.setMaxStackSize(3);
Items.cake.setMaxStackSize(16);
// Block.torchWood.setTickRandomly(false);
TinkerWorld.metalBlock = new TMetalBlock(Material.iron, 10.0F).setBlockName("tconstruct.metalblock");
TinkerWorld.metalBlock.stepSound = Block.soundTypeMetal;
GameRegistry.registerBlock(TinkerWorld.metalBlock, MetalItemBlock.class, "MetalBlock");
}
@EventHandler
@@ -291,6 +291,9 @@ public class TinkerWorld
oreRegistry();
addLoot();
createEntities();
GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0);
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler());
}
@EventHandler
@@ -306,8 +309,6 @@ public class TinkerWorld
EntityRegistry.registerModEntity(Crystal.class, "Crystal", 2, TConstruct.instance, 32, 3, true);
EntityRegistry.registerModEntity(LaunchedPotion.class, "Launched Potion", 3, TConstruct.instance, 32, 3, true);
EntityRegistry.registerModEntity(ArrowEntity.class, "Arrow", 4, TConstruct.instance, 32, 5, true);
EntityRegistry.registerModEntity(EntityLandmineFirework.class, "LandmineFirework", 5, TConstruct.instance, 32, 5, true);
EntityRegistry.registerModEntity(ExplosivePrimed.class, "SlimeExplosive", 6, TConstruct.instance, 32, 5, true);
// EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1,
// TConstruct.instance, 32, 5, true);
@@ -322,31 +323,31 @@ public class TinkerWorld
String[] patSurround = { "###", "#m#", "###" };
// Metal conversion Recipes
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 3), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 9)); // Copper
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 5), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 10)); // Tin
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 6), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 11)); // Aluminum
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 3), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 9)); // Copper
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 5), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 10)); // Tin
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 6), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 11)); // Aluminum
// GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6),
// patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 4), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 13)); // Bronze
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 7), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 14)); // AluBrass
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 0), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 3)); // Cobalt
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 1), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 4)); // Ardite
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 2), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 5)); // Manyullyn
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 8), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 15)); // Alumite
GameRegistry.addRecipe(new ItemStack(TinkerSmeltery.metalBlock, 1, 9), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 16)); // Steel
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 4), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 13)); // Bronze
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 7), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 14)); // AluBrass
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 0), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 3)); // Cobalt
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 1), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 4)); // Ardite
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 2), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 5)); // Manyullyn
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 8), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 15)); // Alumite
GameRegistry.addRecipe(new ItemStack(TinkerWorld.metalBlock, 1, 9), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 16)); // Steel
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 11), "#", '#', new ItemStack(TinkerTools.materials, 1, 12)); // Aluminum raw ->
// ingot
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 9), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 3)); // Copper
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 10), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 5)); // Tin
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 11), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 6)); // Aluminum
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 13), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 4)); // Bronze
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 14), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 7)); // AluBrass
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 3), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 0)); // Cobalt
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 4), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 1)); // Ardite
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 5), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 2)); // Manyullyn
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 15), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 8)); // Alumite
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 16), "m", 'm', new ItemStack(TinkerSmeltery.metalBlock, 1, 9)); // Steel
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 9), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 3)); // Copper
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 10), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 5)); // Tin
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 11), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 6)); // Aluminum
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 13), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 4)); // Bronze
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 14), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 7)); // AluBrass
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 3), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 0)); // Cobalt
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 4), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 1)); // Ardite
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 5), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 2)); // Manyullyn
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 15), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 8)); // Alumite
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 9, 16), "m", 'm', new ItemStack(TinkerWorld.metalBlock, 1, 9)); // Steel
GameRegistry.addRecipe(new ItemStack(Items.iron_ingot), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 19)); // Iron
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 9), patBlock, '#', new ItemStack(TinkerTools.materials, 1, 20)); // Copper
@@ -404,17 +405,6 @@ public class TinkerWorld
GameRegistry.addRecipe(new ItemStack(Items.clock), " i ", "iri", " i ", 'i', aluBrass, 'r', new ItemStack(Items.redstone));
// Gold Pressure Plate - Vanilla alternativ
GameRegistry.addRecipe(new ItemStack(Blocks.light_weighted_pressure_plate), "ii", 'i', aluBrass);
// Landmine Recipes
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 0), "mcm", "rpr", 'm', "plankWood", 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', Items.redstone,
'p', Blocks.stone_pressure_plate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 1), "mcm", "rpr", 'm', Blocks.stone, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r', Items.redstone,
'p', Blocks.stone_pressure_plate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 2), "mcm", "rpr", 'm', Blocks.obsidian, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r',
Items.redstone, 'p', Blocks.stone_pressure_plate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerMechworks.landmine, 1, 3), "mcm", "rpr", 'm', Items.repeater, 'c', new ItemStack(TinkerTools.blankPattern, 1, 1), 'r',
Items.redstone, 'p', Blocks.stone_pressure_plate));
// Ultra hardcore recipes
GameRegistry.addRecipe(new ItemStack(TinkerTools.goldHead), patSurround, '#', new ItemStack(Items.gold_ingot), 'm', new ItemStack(Items.skull, 1, 3));
@@ -437,9 +427,6 @@ public class TinkerWorld
GameRegistry.addRecipe(new ItemStack(TinkerWorld.barricadeJungle, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 3));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerWorld.barricadeOak, 1, 0), "b", "b", 'b', "logWood"));
// EssenceExtractor Recipe
// Slime Recipes
GameRegistry.addRecipe(new ItemStack(TinkerWorld.slimeGel, 1, 0), "##", "##", '#', TinkerWorld.strangeFood);
GameRegistry.addRecipe(new ItemStack(TinkerWorld.strangeFood, 4, 0), "#", '#', new ItemStack(TinkerWorld.slimeGel, 1, 0));
@@ -455,6 +442,9 @@ public class TinkerWorld
TinkerWorld.strangeFood, 1, 1), new ItemStack(TinkerWorld.strangeFood, 1, 1), new ItemStack(Items.redstone));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerWorld.slimeChannel, 1, 0), "slimeball", "slimeball", "slimeball", "slimeball", new ItemStack(Items.redstone)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkerWorld.slimePad, 1, 0), TinkerWorld.slimeChannel, "slimeball"));
OreDictionary.registerOre("hambone", new ItemStack(TinkerWorld.meatBlock));
GameRegistry.addRecipe(new ItemStack(TinkerWorld.meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Items.bone), 'm', new ItemStack(Items.porkchop));
}
private void addRecipesForFurnace ()
@@ -535,19 +525,19 @@ public class TinkerWorld
OreDictionary.registerOre("ingotPigIron", new ItemStack(TinkerTools.materials, 1, 34));
OreDictionary.registerOre("itemRawRubber", new ItemStack(TinkerTools.materials, 1, 36));
OreDictionary.registerOre("blockCobalt", new ItemStack(TinkerSmeltery.metalBlock, 1, 0));
OreDictionary.registerOre("blockArdite", new ItemStack(TinkerSmeltery.metalBlock, 1, 1));
OreDictionary.registerOre("blockManyullyn", new ItemStack(TinkerSmeltery.metalBlock, 1, 2));
OreDictionary.registerOre("blockCopper", new ItemStack(TinkerSmeltery.metalBlock, 1, 3));
OreDictionary.registerOre("blockBronze", new ItemStack(TinkerSmeltery.metalBlock, 1, 4));
OreDictionary.registerOre("blockTin", new ItemStack(TinkerSmeltery.metalBlock, 1, 5));
OreDictionary.registerOre("blockAluminum", new ItemStack(TinkerSmeltery.metalBlock, 1, 6));
OreDictionary.registerOre("blockAluminium", new ItemStack(TinkerSmeltery.metalBlock, 1, 6));
OreDictionary.registerOre("blockAluminumBrass", new ItemStack(TinkerSmeltery.metalBlock, 1, 7));
OreDictionary.registerOre("blockAluminiumBrass", new ItemStack(TinkerSmeltery.metalBlock, 1, 7));
OreDictionary.registerOre("blockAlumite", new ItemStack(TinkerSmeltery.metalBlock, 1, 8));
OreDictionary.registerOre("blockSteel", new ItemStack(TinkerSmeltery.metalBlock, 1, 9));
OreDictionary.registerOre("blockEnder", new ItemStack(TinkerSmeltery.metalBlock, 1, 10));
OreDictionary.registerOre("blockCobalt", new ItemStack(TinkerWorld.metalBlock, 1, 0));
OreDictionary.registerOre("blockArdite", new ItemStack(TinkerWorld.metalBlock, 1, 1));
OreDictionary.registerOre("blockManyullyn", new ItemStack(TinkerWorld.metalBlock, 1, 2));
OreDictionary.registerOre("blockCopper", new ItemStack(TinkerWorld.metalBlock, 1, 3));
OreDictionary.registerOre("blockBronze", new ItemStack(TinkerWorld.metalBlock, 1, 4));
OreDictionary.registerOre("blockTin", new ItemStack(TinkerWorld.metalBlock, 1, 5));
OreDictionary.registerOre("blockAluminum", new ItemStack(TinkerWorld.metalBlock, 1, 6));
OreDictionary.registerOre("blockAluminium", new ItemStack(TinkerWorld.metalBlock, 1, 6));
OreDictionary.registerOre("blockAluminumBrass", new ItemStack(TinkerWorld.metalBlock, 1, 7));
OreDictionary.registerOre("blockAluminiumBrass", new ItemStack(TinkerWorld.metalBlock, 1, 7));
OreDictionary.registerOre("blockAlumite", new ItemStack(TinkerWorld.metalBlock, 1, 8));
OreDictionary.registerOre("blockSteel", new ItemStack(TinkerWorld.metalBlock, 1, 9));
OreDictionary.registerOre("blockEnder", new ItemStack(TinkerWorld.metalBlock, 1, 10));
ensureOreIsRegistered("blockIron", new ItemStack(Blocks.iron_block));
ensureOreIsRegistered("blockGold", new ItemStack(Blocks.gold_block));