mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
83698cb73c
commit
84c2239244
561 files changed
+8872
-9300
No files matched your search
@@ -1,14 +1,16 @@
|
||||
package tconstruct.plugins;
|
||||
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.*;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.crafting.ModifyBuilder;
|
||||
import tconstruct.modifiers.armor.AModThaumicVision;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(
|
||||
@@ -31,10 +33,10 @@ public class TinkerThaumcraft {
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerry, 1, 13));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerry, 1, 14));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerry, 1, 15));
|
||||
FMLInterModComms.sendMessage(
|
||||
"Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerrySecond, 1, 12));
|
||||
FMLInterModComms.sendMessage(
|
||||
"Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerrySecond, 1, 13));
|
||||
FMLInterModComms
|
||||
.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerrySecond, 1, 12));
|
||||
FMLInterModComms
|
||||
.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerrySecond, 1, 13));
|
||||
}
|
||||
|
||||
private void registerModifiers() {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package tconstruct.plugins.fmp;
|
||||
|
||||
import codechicken.microblock.BlockMicroMaterial;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import codechicken.microblock.BlockMicroMaterial;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
|
||||
@Pulse(
|
||||
id = "Tinkers FMP Compatibility",
|
||||
@@ -15,6 +15,7 @@ import tconstruct.world.TinkerWorld;
|
||||
modsRequired = "ForgeMultipart",
|
||||
forced = true)
|
||||
public class TinkerFMP {
|
||||
|
||||
@Handler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ package tconstruct.plugins.gears;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.PatternBuilder;
|
||||
import tconstruct.library.util.IPattern;
|
||||
|
||||
public class GearCast extends Item implements IPattern {
|
||||
|
||||
public GearCast() {
|
||||
setTextureName("tinker:materials/gear_cast");
|
||||
setUnlocalizedName("tconstruct.GearPattern");
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
package tconstruct.plugins.gears;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.FluidType;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Pulse(
|
||||
id = "Tinkers Gears",
|
||||
description = "Adds a gear cast if other mods provide gears",
|
||||
pulsesRequired = "Tinkers' Smeltery")
|
||||
public class TinkerGears {
|
||||
|
||||
public static Item gearCast;
|
||||
|
||||
@Handler
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package tconstruct.plugins.ic2;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.*;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.*;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(
|
||||
@@ -17,6 +19,7 @@ import tconstruct.library.crafting.LiquidCasting;
|
||||
modsRequired = "IC2",
|
||||
forced = true)
|
||||
public class TinkerIC2 {
|
||||
|
||||
private static final String IC2_UUM_FLUIDNAME = "ic2fluiduumatter";
|
||||
|
||||
@Handler
|
||||
@@ -31,6 +34,10 @@ public class TinkerIC2 {
|
||||
|
||||
// Block casting
|
||||
basinCasting.addCastingRecipe(
|
||||
new ItemStack(Blocks.diamond_block), fluidStackBlock, new ItemStack(Blocks.dirt), true, 50);
|
||||
new ItemStack(Blocks.diamond_block),
|
||||
fluidStackBlock,
|
||||
new ItemStack(Blocks.dirt),
|
||||
true,
|
||||
50);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import java.util.*;
|
||||
|
||||
import mantle.pulsar.pulse.*;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(
|
||||
@@ -13,6 +14,7 @@ import tconstruct.TConstruct;
|
||||
modsRequired = "appliedenergistics2",
|
||||
forced = true)
|
||||
public class TinkerAE2 {
|
||||
|
||||
private static final List<String> spatialIOLogics = Arrays.asList(
|
||||
"EssenceExtractorLogic",
|
||||
"GolemPedestalLogic", // TODO What happened to these?
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import mantle.pulsar.pulse.*;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
|
||||
@Pulse(
|
||||
id = "Tinkers BuildCraft Compatibility",
|
||||
@@ -13,6 +15,7 @@ import tconstruct.smeltery.TinkerSmeltery;
|
||||
modsRequired = "BuildCraft|Transport",
|
||||
forced = true)
|
||||
public class TinkerBuildCraft {
|
||||
|
||||
@Handler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
TConstruct.logger.info("BuildCraft detected. Registering facades.");
|
||||
|
||||
@@ -2,10 +2,12 @@ package tconstruct.plugins.imc;
|
||||
|
||||
import static tconstruct.smeltery.TinkerSmeltery.*;
|
||||
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import mantle.pulsar.pulse.*;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
|
||||
@Pulse(
|
||||
id = "Tinkers Mystcraft Compatibility",
|
||||
@@ -13,33 +15,18 @@ import tconstruct.TConstruct;
|
||||
modsRequired = "Mystcraft",
|
||||
pulsesRequired = "Tinkers' Smeltery")
|
||||
public class TinkerMystcraft {
|
||||
|
||||
@Handler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
final Fluid[] fluids = new Fluid[] {
|
||||
// precious tinker fluids
|
||||
moltenGoldFluid,
|
||||
moltenSteelFluid,
|
||||
moltenEmeraldFluid,
|
||||
moltenQuartzFluid,
|
||||
moltenArditeFluid,
|
||||
moltenCobaltFluid,
|
||||
// all alloys
|
||||
pigIronFluid,
|
||||
moltenBronzeFluid,
|
||||
moltenAlumiteFluid,
|
||||
moltenAlubrassFluid,
|
||||
moltenManyullynFluid,
|
||||
// precious TE fluids
|
||||
moltenEnderFluid,
|
||||
moltenSilverFluid,
|
||||
moltenInvarFluid,
|
||||
moltenElectrumFluid,
|
||||
moltenShinyFluid,
|
||||
moltenSignalumFluid,
|
||||
moltenLumiumFluid,
|
||||
moltenMithrilFluid,
|
||||
moltenEnderiumFluid
|
||||
};
|
||||
// precious tinker fluids
|
||||
moltenGoldFluid, moltenSteelFluid, moltenEmeraldFluid, moltenQuartzFluid, moltenArditeFluid,
|
||||
moltenCobaltFluid,
|
||||
// all alloys
|
||||
pigIronFluid, moltenBronzeFluid, moltenAlumiteFluid, moltenAlubrassFluid, moltenManyullynFluid,
|
||||
// precious TE fluids
|
||||
moltenEnderFluid, moltenSilverFluid, moltenInvarFluid, moltenElectrumFluid, moltenShinyFluid,
|
||||
moltenSignalumFluid, moltenLumiumFluid, moltenMithrilFluid, moltenEnderiumFluid };
|
||||
|
||||
TConstruct.logger.info("Mystcraft detected. Blacklisting Mystcraft fluid symbols.");
|
||||
for (Fluid fluid : fluids) {
|
||||
|
||||
@@ -2,15 +2,18 @@ package tconstruct.plugins.imc;
|
||||
|
||||
import static tconstruct.smeltery.TinkerSmeltery.*;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@Pulse(id = "Tinkers RF-Tools Compatibility", forced = true, modsRequired = TinkerRfTools.modid)
|
||||
public class TinkerRfTools {
|
||||
|
||||
static final String modid = "rftools";
|
||||
|
||||
@Handler
|
||||
@@ -64,13 +67,17 @@ public class TinkerRfTools {
|
||||
"dimlet_configure",
|
||||
String.format("Material.%s=%d,%d,%d,%d", "tile.tconstruct.stoneore1", 500000, 25000, 15000, 5));
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_preventloot", String.format("Material.%s", "tile.tconstruct.stoneore1"));
|
||||
modid,
|
||||
"dimlet_preventloot",
|
||||
String.format("Material.%s", "tile.tconstruct.stoneore1"));
|
||||
FMLInterModComms.sendMessage(
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
String.format("Material.%s=%d,%d,%d,%d", "tile.tconstruct.stoneore2", 400000, 20000, 10000, 5));
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_preventloot", String.format("Material.%s", "tile.tconstruct.stoneore2"));
|
||||
modid,
|
||||
"dimlet_preventloot",
|
||||
String.format("Material.%s", "tile.tconstruct.stoneore2"));
|
||||
FMLInterModComms.sendMessage(
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
@@ -114,27 +121,18 @@ public class TinkerRfTools {
|
||||
private void blacklist() {
|
||||
// blacklist alloys
|
||||
final Fluid[] fluidBlacklist = {
|
||||
// all alloys
|
||||
pigIronFluid,
|
||||
moltenBronzeFluid,
|
||||
moltenAlumiteFluid,
|
||||
moltenAlubrassFluid,
|
||||
moltenManyullynFluid,
|
||||
moltenInvarFluid,
|
||||
moltenElectrumFluid,
|
||||
moltenSignalumFluid,
|
||||
moltenLumiumFluid,
|
||||
moltenMithrilFluid,
|
||||
moltenEnderiumFluid,
|
||||
// and shiny
|
||||
moltenShinyFluid
|
||||
};
|
||||
// all alloys
|
||||
pigIronFluid, moltenBronzeFluid, moltenAlumiteFluid, moltenAlubrassFluid, moltenManyullynFluid,
|
||||
moltenInvarFluid, moltenElectrumFluid, moltenSignalumFluid, moltenLumiumFluid, moltenMithrilFluid,
|
||||
moltenEnderiumFluid,
|
||||
// and shiny
|
||||
moltenShinyFluid };
|
||||
|
||||
for (Fluid fluid : fluidBlacklist) {
|
||||
if (fluid == null) continue;
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_blacklist", "Liquid." + fluid.getName());
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Liquid." + fluid.getName() + "=999999,999999,999999,6");
|
||||
FMLInterModComms
|
||||
.sendMessage(modid, "dimlet_configure", "Liquid." + fluid.getName() + "=999999,999999,999999,6");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_preventworldgen", "Liquid." + fluid.getName());
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_preventloot", "Liquid." + fluid.getName());
|
||||
}
|
||||
@@ -142,13 +140,21 @@ public class TinkerRfTools {
|
||||
// blacklist oreberry bushes
|
||||
if (TinkerWorld.oreBerry != null) {
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Material." + "tile.ore.berries.one=123456,123456,123456,6");
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
"Material." + "tile.ore.berries.one=123456,123456,123456,6");
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Material." + "tile.ore.berries.one1=123456,123456,123456,6");
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
"Material." + "tile.ore.berries.one1=123456,123456,123456,6");
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Material." + "tile.ore.berries.one2=123456,123456,123456,6");
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
"Material." + "tile.ore.berries.one2=123456,123456,123456,6");
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Material." + "tile.ore.berries.one3=123456,123456,123456,6");
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
"Material." + "tile.ore.berries.one3=123456,123456,123456,6");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_blacklist", "Material." + "tile.ore.berries.one");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_blacklist", "Material." + "tile.ore.berries.one1");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_blacklist", "Material." + "tile.ore.berries.one2");
|
||||
@@ -164,9 +170,13 @@ public class TinkerRfTools {
|
||||
}
|
||||
if (TinkerWorld.oreBerrySecond != null) {
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Material." + "tile.ore.berries.two=123456,123456,123456,6");
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
"Material." + "tile.ore.berries.two=123456,123456,123456,6");
|
||||
FMLInterModComms.sendMessage(
|
||||
modid, "dimlet_configure", "Material." + "tile.ore.berries.two1=123456,123456,123456,6");
|
||||
modid,
|
||||
"dimlet_configure",
|
||||
"Material." + "tile.ore.berries.two1=123456,123456,123456,6");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_blacklist", "Material." + "tile.ore.berries.two");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_blacklist", "Material." + "tile.ore.berries.two1");
|
||||
FMLInterModComms.sendMessage(modid, "dimlet_preventworldgen", "Material." + "tile.ore.berries.two");
|
||||
|
||||
@@ -2,6 +2,7 @@ package tconstruct.plugins.mfr;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.*;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler;
|
||||
|
||||
public class Drinkables implements ILiquidDrinkHandler {
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.*;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
|
||||
public class GrindableHorse implements IFactoryGrindable {
|
||||
|
||||
@Override
|
||||
public Class<? extends EntityLivingBase> getGrindableEntity() {
|
||||
return EntityHorse.class;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.*;
|
||||
|
||||
public class HarvestableOreBerry implements IFactoryHarvestable {
|
||||
|
||||
private final Block _sourceBlock;
|
||||
private final Item _berryItem;
|
||||
private final int _metaOffset;
|
||||
@@ -38,9 +41,9 @@ public class HarvestableOreBerry implements IFactoryHarvestable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(
|
||||
World world, Random rand, Map<String, Boolean> harvesterSettings, int x, int y, int z) {
|
||||
ItemStack[] returnItems = {new ItemStack(_berryItem, 1, world.getBlockMetadata(x, y, z) % 4 + _metaOffset)};
|
||||
public List<ItemStack> getDrops(World world, Random rand, Map<String, Boolean> harvesterSettings, int x, int y,
|
||||
int z) {
|
||||
ItemStack[] returnItems = { new ItemStack(_berryItem, 1, world.getBlockMetadata(x, y, z) % 4 + _metaOffset) };
|
||||
return Arrays.asList(returnItems);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,13 +5,17 @@ import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
public class MFRRegister {
|
||||
|
||||
public static void registerWithMFR() {
|
||||
FactoryRegistry.sendMessage(
|
||||
"registerHarvestable", new HarvestableOreBerry(TinkerWorld.oreBerry, TinkerWorld.oreBerries, 0));
|
||||
"registerHarvestable",
|
||||
new HarvestableOreBerry(TinkerWorld.oreBerry, TinkerWorld.oreBerries, 0));
|
||||
FactoryRegistry.sendMessage(
|
||||
"registerHarvestable", new HarvestableOreBerry(TinkerWorld.oreBerrySecond, TinkerWorld.oreBerries, 4));
|
||||
"registerHarvestable",
|
||||
new HarvestableOreBerry(TinkerWorld.oreBerrySecond, TinkerWorld.oreBerries, 4));
|
||||
FactoryRegistry.sendMessage("registerGrindable", new GrindableHorse());
|
||||
FactoryRegistry.sendMessage(
|
||||
"registerLiquidDrinkHandler", new ValuedItem(TinkerSmeltery.bloodFluid.getName(), new Drinkables()));
|
||||
"registerLiquidDrinkHandler",
|
||||
new ValuedItem(TinkerSmeltery.bloodFluid.getName(), new Drinkables()));
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.*;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(
|
||||
@@ -12,14 +12,15 @@ import tconstruct.TConstruct;
|
||||
modsRequired = "MineFactoryReloaded",
|
||||
forced = true)
|
||||
public class TinkerMFR {
|
||||
|
||||
@Handler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
TConstruct.logger.info(
|
||||
"MineFactoryReloaded detected. Registering TConstruct farmables/grindables with MFR's Farming Registry.");
|
||||
MFRRegister.registerWithMFR();
|
||||
/*
|
||||
* Perhaps TC ores should be registered as drops from the MFR Laser Drill here, but I don't know which things would be suitable for that.
|
||||
* Syntax: FarmingRegistry.registerLaserOre(int weight, ItemStack droppedStack));
|
||||
* Perhaps TC ores should be registered as drops from the MFR Laser Drill here, but I don't know which things
|
||||
* would be suitable for that. Syntax: FarmingRegistry.registerLaserOre(int weight, ItemStack droppedStack));
|
||||
* Currently used weights are from about 50 (emerald) to 175 (coal).
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
|
||||
import tconstruct.client.ArmorControls;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.guihook.IContainerInputHandler;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import tconstruct.client.ArmorControls;
|
||||
|
||||
public class BeltToggleFromGuiInputHandler implements IContainerInputHandler {
|
||||
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.nei.recipe.DefaultOverlayHandler;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
import tconstruct.tools.gui.CraftingStationGui;
|
||||
import tconstruct.tools.inventory.CraftingStationContainer;
|
||||
import tconstruct.tools.logic.CraftingStationLogic;
|
||||
import codechicken.nei.recipe.DefaultOverlayHandler;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
|
||||
/**
|
||||
* Modified copy of DefaultOverlayHandler from NotEnoughItems
|
||||
*/
|
||||
public class CraftingStationOverlayHandler extends DefaultOverlayHandler {
|
||||
|
||||
@Override
|
||||
public void overlayRecipe(GuiContainer gui, IRecipeHandler recipe, int recipeIndex, boolean shift) {
|
||||
if (gui.inventorySlots instanceof CraftingStationContainer) {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.tools.gui.CraftingStationGui;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.api.IStackPositioner;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.tools.gui.CraftingStationGui;
|
||||
|
||||
public class CraftingStationStackPositioner implements IStackPositioner {
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import tconstruct.tools.gui.CraftingStationGui;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import tconstruct.tools.gui.CraftingStationGui;
|
||||
|
||||
public class NEITConstructConfig implements IConfigureNEI {
|
||||
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.crafting.AlloyMix;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
||||
public class RecipeHandlerAlloying extends RecipeHandlerBase {
|
||||
|
||||
public static final Rectangle OUTPUT_TANK = new Rectangle(118, 9, 18, 32);
|
||||
|
||||
public class CachedAlloyingRecipe extends CachedBaseRecipe {
|
||||
|
||||
private final List<FluidTankElement> fluidTanks;
|
||||
private int minAmount;
|
||||
|
||||
@@ -42,10 +46,14 @@ public class RecipeHandlerAlloying extends RecipeHandlerBase {
|
||||
for (FluidStack stack : recipe.mixers) {
|
||||
if (counter == recipe.mixers.size() - 1) {
|
||||
tank = new FluidTankElement(
|
||||
new Rectangle(21 + width * counter, 9, 36 - width * counter, 32), maxAmount * mult, stack);
|
||||
new Rectangle(21 + width * counter, 9, 36 - width * counter, 32),
|
||||
maxAmount * mult,
|
||||
stack);
|
||||
} else {
|
||||
tank = new FluidTankElement(
|
||||
new Rectangle(21 + width * counter, 9, width, 32), maxAmount * mult, stack);
|
||||
new Rectangle(21 + width * counter, 9, width, 32),
|
||||
maxAmount * mult,
|
||||
stack);
|
||||
}
|
||||
tank.fluid.amount *= mult;
|
||||
this.fluidTanks.add(tank);
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.recipe.GuiCraftingRecipe;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -23,11 +17,21 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.recipe.GuiCraftingRecipe;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
|
||||
public abstract class CachedBaseRecipe extends CachedRecipe {
|
||||
|
||||
public List<FluidTankElement> getFluidTanks() {
|
||||
return null;
|
||||
}
|
||||
@@ -202,6 +206,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
public static class FluidTankElement {
|
||||
|
||||
public Rectangle position;
|
||||
public FluidStack fluid;
|
||||
public int capacity;
|
||||
@@ -240,8 +245,8 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
GL11.glColor3ub((byte) (color >> 16 & 0xFF), (byte) (color >> 8 & 0xFF), (byte) (color & 0xFF));
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
int amount = Math.max(
|
||||
Math.min(this.position.height, this.fluid.amount * this.position.height / this.capacity), 1);
|
||||
int amount = Math
|
||||
.max(Math.min(this.position.height, this.fluid.amount * this.position.height / this.capacity), 1);
|
||||
int posY = this.position.y + this.position.height - amount;
|
||||
|
||||
for (int i = 0; i < this.position.width; i += 16) {
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import tconstruct.library.crafting.CastingRecipe;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
||||
public abstract class RecipeHandlerCastingBase extends RecipeHandlerBase {
|
||||
|
||||
public static final Rectangle MOLTEN_FLOW = new Rectangle(60, 8, 6, 11);
|
||||
public static final Rectangle MOLTEN_FLOW_NO_ITEM = new Rectangle(60, 8, 6, 27);
|
||||
|
||||
public class CachedCastingRecipe extends CachedBaseRecipe {
|
||||
|
||||
private final List<PositionedStack> resources;
|
||||
private final FluidTankElement metal;
|
||||
private PositionedStack output;
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.CastingRecipe;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
|
||||
public class RecipeHandlerCastingBasin extends RecipeHandlerCastingBase {
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.CastingRecipe;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
|
||||
public class RecipeHandlerCastingTable extends RecipeHandlerCastingBase {
|
||||
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.crafting.DryingRackRecipes;
|
||||
import tconstruct.library.crafting.DryingRackRecipes.DryingRecipe;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import java.awt.Rectangle;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import tconstruct.library.crafting.DryingRackRecipes;
|
||||
import tconstruct.library.crafting.DryingRackRecipes.DryingRecipe;
|
||||
|
||||
public class RecipeHandlerDryingRack extends RecipeHandlerBase {
|
||||
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mantle.utils.ItemMetaWrapper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
||||
public class RecipeHandlerMelting extends RecipeHandlerBase {
|
||||
|
||||
public static final Rectangle MOLTEN_TANK = new Rectangle(115, 20, 18, 18);
|
||||
|
||||
public class CachedMeltingRecipe extends CachedBaseRecipe {
|
||||
|
||||
private final PositionedStack input;
|
||||
private final int temperature;
|
||||
private final FluidTankElement output;
|
||||
@@ -94,8 +99,7 @@ public class RecipeHandlerMelting extends RecipeHandlerBase {
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(FluidStack result) {
|
||||
for (Entry<ItemMetaWrapper, FluidStack> pair :
|
||||
Smeltery.getSmeltingList().entrySet()) {
|
||||
for (Entry<ItemMetaWrapper, FluidStack> pair : Smeltery.getSmeltingList().entrySet()) {
|
||||
if (areFluidsEqual(pair.getValue(), result)) {
|
||||
this.arecipes.add(new CachedMeltingRecipe(new ItemStack(pair.getKey().item, 1, pair.getKey().meta)));
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.CastingRecipe;
|
||||
import tconstruct.library.crafting.PatternBuilder;
|
||||
@@ -22,6 +23,8 @@ import tconstruct.library.util.HarvestLevels;
|
||||
import tconstruct.library.util.IToolPart;
|
||||
import tconstruct.tools.items.ToolPart;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
||||
public class RecipeHandlerToolMaterials extends RecipeHandlerBase {
|
||||
|
||||
@@ -129,8 +132,7 @@ public class RecipeHandlerToolMaterials extends RecipeHandlerBase {
|
||||
60,
|
||||
0x404040,
|
||||
false);
|
||||
String heart = crecipe.material.attack == 2
|
||||
? StatCollector.translateToLocal("gui.partcrafter8")
|
||||
String heart = crecipe.material.attack == 2 ? StatCollector.translateToLocal("gui.partcrafter8")
|
||||
: StatCollector.translateToLocal("gui.partcrafter9");
|
||||
if (crecipe.material.attack() % 2 == 0) {
|
||||
GuiDraw.drawString(
|
||||
@@ -229,8 +231,7 @@ public class RecipeHandlerToolMaterials extends RecipeHandlerBase {
|
||||
}
|
||||
}
|
||||
if (!PHConstruct.craftMetalTools) {
|
||||
for (CastingRecipe recipe :
|
||||
TConstructRegistry.getTableCasting().getCastingRecipes()) {
|
||||
for (CastingRecipe recipe : TConstructRegistry.getTableCasting().getCastingRecipes()) {
|
||||
ItemStack castResult = recipe.getResult();
|
||||
if (castResult.getItem() instanceof IToolPart) {
|
||||
if (((IToolPart) castResult.getItem()).getMaterialID(castResult) == matID) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package tconstruct.plugins.te4;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
/**
|
||||
* Taken from CoFHLib
|
||||
*/
|
||||
@@ -31,14 +32,14 @@ public class TE4Helper {
|
||||
addPulverizerRecipe(energy, input, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
public static void addPulverizerRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {
|
||||
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput) {
|
||||
|
||||
addPulverizerRecipe(energy, input, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
public static void addPulverizerRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
|
||||
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput, int secondaryChance) {
|
||||
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
@@ -63,14 +64,14 @@ public class TE4Helper {
|
||||
addSawmillRecipe(energy, input, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
public static void addSawmillRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput) {
|
||||
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput) {
|
||||
|
||||
addSawmillRecipe(energy, input, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
public static void addSawmillRecipe(
|
||||
int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
|
||||
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput,
|
||||
int secondaryChance) {
|
||||
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
@@ -90,29 +91,20 @@ public class TE4Helper {
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addSmelterRecipe(
|
||||
int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput) {
|
||||
public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput,
|
||||
ItemStack primaryOutput) {
|
||||
|
||||
addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
public static void addSmelterRecipe(
|
||||
int energy,
|
||||
ItemStack primaryInput,
|
||||
ItemStack secondaryInput,
|
||||
ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput) {
|
||||
public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput,
|
||||
ItemStack primaryOutput, ItemStack secondaryOutput) {
|
||||
|
||||
addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
public static void addSmelterRecipe(
|
||||
int energy,
|
||||
ItemStack primaryInput,
|
||||
ItemStack secondaryInput,
|
||||
ItemStack primaryOutput,
|
||||
ItemStack secondaryOutput,
|
||||
int secondaryChance) {
|
||||
public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput,
|
||||
ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
|
||||
|
||||
if (primaryInput == null || secondaryInput == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
@@ -135,8 +127,8 @@ public class TE4Helper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to register an Ore TYPE as a "Blast" recipe - it will require Pyrotheum Dust to smelt. Do not add the prefix. This is an opt-in for ores which
|
||||
* do NOT have vanilla furnace recipes.
|
||||
* Use this to register an Ore TYPE as a "Blast" recipe - it will require Pyrotheum Dust to smelt. Do not add the
|
||||
* prefix. This is an opt-in for ores which do NOT have vanilla furnace recipes.
|
||||
*
|
||||
* Ex: "Steel" or "ElectrumFlux", not "dustSteel" or "dustElectrumFlux"
|
||||
*
|
||||
@@ -168,8 +160,8 @@ public class TE4Helper {
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addTransposerFill(
|
||||
int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {
|
||||
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid,
|
||||
boolean reversible) {
|
||||
|
||||
if (input == null || output == null || fluid == null) {
|
||||
return;
|
||||
@@ -189,8 +181,8 @@ public class TE4Helper {
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addTransposerExtract(
|
||||
int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {
|
||||
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance,
|
||||
boolean reversible) {
|
||||
|
||||
if (input == null || output == null || fluid == null) {
|
||||
return;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package tconstruct.plugins.te4;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.*;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -11,11 +9,15 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.*;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(
|
||||
@@ -24,6 +26,7 @@ import tconstruct.world.TinkerWorld;
|
||||
modsRequired = "ThermalExpansion",
|
||||
forced = true)
|
||||
public class TinkerTE4 {
|
||||
|
||||
@Handler
|
||||
public void init() {
|
||||
TConstruct.logger.info("Thermal Expansion detected. Adding Pulverizer & Induction Smelter recipes");
|
||||
@@ -36,9 +39,17 @@ public class TinkerTE4 {
|
||||
null,
|
||||
0);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
1000, new ItemStack(TinkerTools.materials, 1, 3), new ItemStack(TinkerTools.materials, 1, 39), null, 0);
|
||||
1000,
|
||||
new ItemStack(TinkerTools.materials, 1, 3),
|
||||
new ItemStack(TinkerTools.materials, 1, 39),
|
||||
null,
|
||||
0);
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
1000, new ItemStack(TinkerTools.materials, 1, 4), new ItemStack(TinkerTools.materials, 1, 38), null, 0);
|
||||
1000,
|
||||
new ItemStack(TinkerTools.materials, 1, 4),
|
||||
new ItemStack(TinkerTools.materials, 1, 38),
|
||||
null,
|
||||
0);
|
||||
|
||||
TE4Helper.addPulverizerRecipe(
|
||||
12000,
|
||||
@@ -85,12 +96,13 @@ public class TinkerTE4 {
|
||||
// Dust Recipes
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessOreRecipe(new ItemStack(TinkerTools.materials, 1, 41), "dustArdite", "dustCobalt"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(
|
||||
new ItemStack(TinkerTools.materials, 4, 42),
|
||||
"dustAluminum",
|
||||
"dustAluminum",
|
||||
"dustAluminum",
|
||||
"dustCopper"));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessOreRecipe(
|
||||
new ItemStack(TinkerTools.materials, 4, 42),
|
||||
"dustAluminum",
|
||||
"dustAluminum",
|
||||
"dustAluminum",
|
||||
"dustCopper"));
|
||||
}
|
||||
|
||||
@Handler
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package tconstruct.plugins.te4;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -12,11 +10,15 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.crafting.FluidType;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@GameRegistry.ObjectHolder(TinkersThermalFoundation.TF_MOD_ID)
|
||||
@Pulse(
|
||||
@@ -25,6 +27,7 @@ import tconstruct.world.TinkerWorld;
|
||||
modsRequired = TinkersThermalFoundation.TF_MOD_ID,
|
||||
forced = true)
|
||||
public class TinkersThermalFoundation {
|
||||
|
||||
static final String TF_MOD_ID = "ThermalFoundation";
|
||||
|
||||
@Handler
|
||||
@@ -55,33 +58,32 @@ public class TinkersThermalFoundation {
|
||||
Smeltery.addSmelteryFuel(pyrotheumFluid, 5000, 70); // pyrotheum lasts 3.5 seconds per 15 mb
|
||||
|
||||
// liquid redstone
|
||||
for (ItemStack stack : OreDictionary.getOres("blockRedstone"))
|
||||
Smeltery.addMelting(
|
||||
stack,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
3000,
|
||||
new FluidStack(redstoneFluid, 900));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustRedstone"))
|
||||
Smeltery.addMelting(
|
||||
stack, Blocks.redstone_block, stack.getItemDamage(), 2500, new FluidStack(redstoneFluid, 100));
|
||||
for (ItemStack stack : OreDictionary.getOres("blockRedstone")) Smeltery.addMelting(
|
||||
stack,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
3000,
|
||||
new FluidStack(redstoneFluid, 900));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustRedstone")) Smeltery.addMelting(
|
||||
stack,
|
||||
Blocks.redstone_block,
|
||||
stack.getItemDamage(),
|
||||
2500,
|
||||
new FluidStack(redstoneFluid, 100));
|
||||
|
||||
// liquid glowstone
|
||||
for (ItemStack stack : OreDictionary.getOres("glowstone"))
|
||||
Smeltery.addMelting(
|
||||
stack,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
3000,
|
||||
new FluidStack(glowstoneFluid, 1000));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustGlowstone"))
|
||||
Smeltery.addMelting(
|
||||
stack, Blocks.glowstone, stack.getItemDamage(), 2500, new FluidStack(glowstoneFluid, 250));
|
||||
for (ItemStack stack : OreDictionary.getOres("glowstone")) Smeltery.addMelting(
|
||||
stack,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
3000,
|
||||
new FluidStack(glowstoneFluid, 1000));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustGlowstone")) Smeltery
|
||||
.addMelting(stack, Blocks.glowstone, stack.getItemDamage(), 2500, new FluidStack(glowstoneFluid, 250));
|
||||
|
||||
// liquid pyrotheum
|
||||
for (ItemStack stack : OreDictionary.getOres("dustPyrotheum"))
|
||||
Smeltery.addMelting(
|
||||
stack, Blocks.glowstone, stack.getItemDamage(), 1299, new FluidStack(pyrotheumFluid, 100));
|
||||
for (ItemStack stack : OreDictionary.getOres("dustPyrotheum")) Smeltery
|
||||
.addMelting(stack, Blocks.glowstone, stack.getItemDamage(), 1299, new FluidStack(pyrotheumFluid, 100));
|
||||
|
||||
// liquid cryotheum
|
||||
for (ItemStack stack : OreDictionary.getOres("dustCryotheum"))
|
||||
@@ -134,6 +136,11 @@ public class TinkersThermalFoundation {
|
||||
if (stack == null || stack.getItem() == null) stack = new ItemStack(TinkerWorld.metalBlock);
|
||||
|
||||
FluidType.registerFluidType(
|
||||
name, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), temp, fluid, false);
|
||||
name,
|
||||
Block.getBlockFromItem(stack.getItem()),
|
||||
stack.getItemDamage(),
|
||||
temp,
|
||||
fluid,
|
||||
false);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package tconstruct.plugins.ubc;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import exterminatorJeff.undergroundBiomes.api.UBAPIHook;
|
||||
import exterminatorJeff.undergroundBiomes.api.UBOreTexturizer.BlocksAreAlreadySet;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import exterminatorJeff.undergroundBiomes.api.UBAPIHook;
|
||||
import exterminatorJeff.undergroundBiomes.api.UBOreTexturizer.BlocksAreAlreadySet;
|
||||
|
||||
@Pulse(
|
||||
id = "Tinkers' Underground Biomes Compatiblity",
|
||||
@@ -15,6 +15,7 @@ import tconstruct.world.TinkerWorld;
|
||||
pulsesRequired = "Tinkers' World",
|
||||
forced = true)
|
||||
public class TinkerUBC {
|
||||
|
||||
@Handler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
registerBlock(3, "Copper");
|
||||
@@ -26,7 +27,10 @@ public class TinkerUBC {
|
||||
String overlayTexture = blockName.toLowerCase();
|
||||
try {
|
||||
UBAPIHook.ubAPIHook.ubOreTexturizer.requestUBOreSetup(
|
||||
TinkerWorld.oreSlag, meta, "tinker:ore_" + overlayTexture + "_overlay", "MetalOre." + blockName);
|
||||
TinkerWorld.oreSlag,
|
||||
meta,
|
||||
"tinker:ore_" + overlayTexture + "_overlay",
|
||||
"MetalOre." + blockName);
|
||||
} catch (RuntimeException exception) {
|
||||
// we have to work around this because otherwise FML would access this for some reason
|
||||
// and crash because BlocksAreAlreadySet Exception is not present without UBC
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.SpecialChars;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -12,6 +14,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import tconstruct.smeltery.logic.CastingBasinLogic;
|
||||
|
||||
public class BasinDataProvider implements IWailaDataProvider {
|
||||
@@ -25,28 +28,32 @@ public class BasinDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
if (accessor.getTileEntity() instanceof CastingBasinLogic && config.getConfig("tcon.basin", true)) {
|
||||
CastingBasinLogic te = (CastingBasinLogic) accessor.getTileEntity();
|
||||
if (te.getFluidAmount() != 0) {
|
||||
FluidStack fs = te.getFluid();
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount + "/"
|
||||
+ te.getCapacity());
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount
|
||||
+ "/"
|
||||
+ te.getCapacity());
|
||||
final int progress = te.getProgress();
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.progress") + progress + "%");
|
||||
} else {
|
||||
if (te.getStackInSlot(0) != null) {
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.contains")
|
||||
+ te.getStackInSlot(0).getDisplayName());
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.contains")
|
||||
+ te.getStackInSlot(0).getDisplayName());
|
||||
} else {
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty"));
|
||||
}
|
||||
@@ -56,14 +63,14 @@ public class BasinDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(
|
||||
EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.*;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -10,6 +12,7 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.*;
|
||||
|
||||
import tconstruct.smeltery.logic.CastingChannelLogic;
|
||||
|
||||
public class CastingChannelDataProvider implements IWailaDataProvider {
|
||||
@@ -20,14 +23,14 @@ public class CastingChannelDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
if (accessor.getTileEntity() instanceof CastingChannelLogic) {
|
||||
CastingChannelLogic te = (CastingChannelLogic) accessor.getTileEntity();
|
||||
FluidTankInfo internalTank = te.getTankInfo(null)[0];
|
||||
@@ -38,10 +41,13 @@ public class CastingChannelDataProvider implements IWailaDataProvider {
|
||||
|
||||
if (internalTank.fluid != null && internalTank.fluid.amount > 0) {
|
||||
FluidStack fs = internalTank.fluid;
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount + "/"
|
||||
+ internalTank.capacity);
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount
|
||||
+ "/"
|
||||
+ internalTank.capacity);
|
||||
} else {
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty"));
|
||||
}
|
||||
@@ -61,14 +67,14 @@ public class CastingChannelDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(
|
||||
EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.*;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -9,6 +11,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import tconstruct.smeltery.logic.LavaTankLogic;
|
||||
|
||||
public class SearedTankDataProvider implements IWailaDataProvider {
|
||||
@@ -19,22 +22,25 @@ public class SearedTankDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
if (accessor.getTileEntity() instanceof LavaTankLogic && config.getConfig("tcon.searedtank", true)) {
|
||||
LavaTankLogic te = (LavaTankLogic) accessor.getTileEntity();
|
||||
if (te.containsFluid()) {
|
||||
FluidStack fs = te.tank.getFluid();
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount + "/"
|
||||
+ te.tank.getCapacity());
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount
|
||||
+ "/"
|
||||
+ te.tank.getCapacity());
|
||||
} else {
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty"));
|
||||
}
|
||||
@@ -43,14 +49,14 @@ public class SearedTankDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(
|
||||
EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.*;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -9,6 +11,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import tconstruct.smeltery.logic.SmelteryLogic;
|
||||
|
||||
public class SmelteryDataProvider implements IWailaDataProvider {
|
||||
@@ -19,14 +22,14 @@ public class SmelteryDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
if (accessor.getTileEntity() instanceof SmelteryLogic && config.getConfig("tcon.smeltery", true)) {
|
||||
SmelteryLogic te = (SmelteryLogic) accessor.getTileEntity();
|
||||
if (te.validStructure) {
|
||||
@@ -39,8 +42,8 @@ public class SmelteryDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
currenttip.add(
|
||||
SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.invalidstructure"));
|
||||
currenttip
|
||||
.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.invalidstructure"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,14 +51,14 @@ public class SmelteryDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(
|
||||
EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import tconstruct.smeltery.logic.CastingTableLogic;
|
||||
|
||||
public class TableDataProvider implements IWailaDataProvider {
|
||||
@@ -24,25 +27,29 @@ public class TableDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
if (accessor.getTileEntity() instanceof CastingTableLogic && config.getConfig("tcon.table", true)) {
|
||||
CastingTableLogic te = (CastingTableLogic) accessor.getTileEntity();
|
||||
if (te.getStackInSlot(1) != null) {
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.contains")
|
||||
+ te.getStackInSlot(1).getDisplayName());
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.contains")
|
||||
+ te.getStackInSlot(1).getDisplayName());
|
||||
}
|
||||
if (te.getFluid() != null) {
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(te.getFluid()));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + te.getFluidAmount() + "/"
|
||||
+ te.getCapacity());
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.liquidtag")
|
||||
+ WailaRegistrar.fluidNameHelper(te.getFluid()));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tconstruct.waila.amounttag") + te.getFluidAmount()
|
||||
+ "/"
|
||||
+ te.getCapacity());
|
||||
final int progress = te.getProgress();
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.progress") + progress + "%");
|
||||
}
|
||||
@@ -51,14 +58,14 @@ public class TableDataProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(
|
||||
ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(
|
||||
EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.*;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(
|
||||
@@ -12,6 +12,7 @@ import tconstruct.TConstruct;
|
||||
modsRequired = "Waila",
|
||||
forced = true)
|
||||
public class TinkerWaila {
|
||||
|
||||
@Handler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
TConstruct.logger.info("Waila detected. Registering TConstruct tank blocks with Waila registry.");
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.smeltery.blocks.*;
|
||||
import tconstruct.smeltery.logic.*;
|
||||
|
||||
public class WailaRegistrar {
|
||||
|
||||
public static void wailaCallback(IWailaRegistrar registrar) {
|
||||
TConstruct.logger.info("[Waila-Compat] Got registrar: " + registrar);
|
||||
|
||||
|
||||
Reference in new issue
Block a user