mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 23:45:48 +00:00
Merge pull request #819 from Parker8283/patch-pluginporting
Re-implemented all plugins
This commit is contained in:
commit
f5179c1af6
42 files changed
+939
-619
No files matched your search
+12
-13
@@ -9,17 +9,16 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
mavenLocal()
|
||||
maven {
|
||||
name = 'ForgeFS'
|
||||
url = 'http://files.minecraftforge.net/maven'
|
||||
}
|
||||
maven {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
@@ -31,10 +30,10 @@ repositories {
|
||||
name 'CB Maven FS'
|
||||
url "http://chickenbones.net/maven/"
|
||||
}
|
||||
maven {
|
||||
maven {
|
||||
name "ProfMobius Maven FS"
|
||||
url "http://mobiusstrip.eu/maven"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name 'DVS1 Maven FS'
|
||||
url 'http://dvs1.progwml6.com/files/maven'
|
||||
@@ -42,7 +41,7 @@ repositories {
|
||||
maven {
|
||||
name 'ForgeFS'
|
||||
url 'http://files.minecraftforge.net/maven'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Load ForgeGradle
|
||||
@@ -65,11 +64,11 @@ configurations {
|
||||
|
||||
dependencies {
|
||||
compile "mantle:Mantle:${config.minecraft_version}-${config.mantle_version}:deobf"
|
||||
compile "codechicken:CodeChickenLib:${config.minecraft_version}-${config.CCLIB_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${config.minecraft_version}-${config.ccc_version}:dev"
|
||||
compile "codechicken:CodeChickenLib:${config.minecraft_version}-${config.CCLIB_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${config.minecraft_version}-${config.ccc_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${config.minecraft_version}-${config.NEI_version}:dev"
|
||||
//compile "mcp.mobius.waila:Waila:${config.waila_version}:dev"
|
||||
deployerJars 'org.apache.maven.wagon:wagon-ssh:2.2'
|
||||
compile "mcp.mobius.waila:Waila:${config.waila_version}:dev"
|
||||
deployerJars 'org.apache.maven.wagon:wagon-ssh:2.2'
|
||||
}
|
||||
|
||||
// Finds and sets version data
|
||||
@@ -101,7 +100,7 @@ version = "${config.minecraft_version}-${artifact_version}"
|
||||
|
||||
minecraft {
|
||||
version = config.minecraft_version + "-" + config.forge_version
|
||||
assetDir = 'run/assets'
|
||||
runDir = 'run'
|
||||
replace '${version}', project.version
|
||||
}
|
||||
|
||||
@@ -156,7 +155,7 @@ task libJar(type: Jar) {
|
||||
// Create Maven source jar
|
||||
task sourceJar(type: Jar, dependsOn:classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
from sourceSets.main.allJava
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
+4
-5
@@ -1,9 +1,8 @@
|
||||
minecraft_version=1.7.10
|
||||
minecraft_version_old=1.7.2
|
||||
forge_version=10.13.0.1187
|
||||
mantle_version=161.45beb09
|
||||
CCLIB_version=1.1.1.93
|
||||
mantle_version=0.3.1.jenkins169
|
||||
CCLIB_version=1.1.1.95
|
||||
NEI_version=1.0.2.15
|
||||
ccc_version=1.0.1.8
|
||||
ccc_version=1.0.2.9
|
||||
mod_version=1.6.0
|
||||
waila_version=1.5.3
|
||||
waila_version=1.5.3_1.7.10
|
||||
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Tue Oct 29 18:00:54 CDT 2013
|
||||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
@@ -1,33 +0,0 @@
|
||||
package tconstruct.plugins;
|
||||
|
||||
import static tconstruct.TConstruct.moduleLoader;
|
||||
import tconstruct.plugins.ic2.IC2;
|
||||
import tconstruct.plugins.imc.AppEng;
|
||||
import tconstruct.plugins.imc.BuildcraftTransport;
|
||||
import tconstruct.plugins.imc.Mystcraft;
|
||||
import tconstruct.plugins.imc.Thaumcraft;
|
||||
import tconstruct.plugins.nei.NotEnoughItems;
|
||||
import tconstruct.plugins.te3.ThermalExpansion;
|
||||
import tconstruct.plugins.waila.Waila;
|
||||
|
||||
public class PluginController
|
||||
{
|
||||
|
||||
private PluginController() {} // Don't need to instantiate this.
|
||||
|
||||
public static void registerModules()
|
||||
{
|
||||
// Mystcraft is pushed in through the backdoor so it can't be disabled.
|
||||
moduleLoader.registerUncheckedModule(Mystcraft.class);
|
||||
|
||||
// Register the remaining plugin classes normally
|
||||
moduleLoader.registerModule(AppEng.class);
|
||||
moduleLoader.registerModule(BuildcraftTransport.class);
|
||||
moduleLoader.registerModule(IC2.class);
|
||||
moduleLoader.registerModule(Thaumcraft.class);
|
||||
moduleLoader.registerModule(NotEnoughItems.class);
|
||||
moduleLoader.registerModule(Waila.class);
|
||||
moduleLoader.registerModule(ThermalExpansion.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class AppEng implements ILoadableModule
|
||||
{
|
||||
|
||||
private static List<String> spatialIOLogics = Arrays.asList("AdaptiveSmelteryLogic", "AqueductLogic", "CastingBasinLogic", "CastingChannelLogic", "CastingTableLogic", "CraftingStationLogic",
|
||||
"DryingRackLogic", "EssenceExtractorLogic", "FaucetLogic", "FrypanLogic", "GolemPedestalLogic", "LavaTankLogic", "PartBuilderLogic", "PatternChestLogic", "SmelteryDrainLogic",
|
||||
"SmelteryLogic", "StencilTableLogic", "TankAirLogic", "TileEntityLandmine", "ToolForgeLogic", "ToolStationLogic", "TowerFurnaceLogic", "MultiServantLogic");
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "AppliedEnergistics";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[AppEng] Registering for Spatial IO.");
|
||||
for (String s : spatialIOLogics)
|
||||
{
|
||||
FMLInterModComms.sendMessage("AppliedEnergistics", "movabletile", "tconstruct.blocks.logic." + s);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class BuildcraftTransport implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "BuildCraft|Transport";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[BC|Transport] Registering facades.");
|
||||
// Smeltery Blocks
|
||||
addFacade(TRepo.smeltery, 2);
|
||||
for (int sc = 4; sc < 11; sc++)
|
||||
{
|
||||
addFacade(TRepo.smeltery, sc);
|
||||
}
|
||||
|
||||
addFacade(TRepo.searedBlock, 0);
|
||||
addFacade(TRepo.searedBlockNether, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void addFacade (Block b, int meta)
|
||||
{
|
||||
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", new ItemStack(b, 1, meta));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class Thaumcraft implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "Thaumcraft";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[Thaumcraft] Registering harvestables.");
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 12));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 13));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 14));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerry, 1, 15));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerrySecond, 1, 12));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TRepo.oreBerrySecond, 1, 13));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package tconstruct.plugins.minefactoryreloaded;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.FactoryRegistry;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
public class MFRRegister
|
||||
{
|
||||
public static void registerWithMFR ()
|
||||
{
|
||||
FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TRepo.oreBerry.blockID, TRepo.oreBerries.itemID, 0));
|
||||
FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TRepo.oreBerrySecond.blockID, TRepo.oreBerries.itemID, 4));
|
||||
FactoryRegistry.registerGrindable(new GrindableHorse());
|
||||
FactoryRegistry.registerLiquidDrinkHandler(TRepo.bloodFluid.getName(), new Drinkables());
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package tconstruct.plugins.nei;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.recipe.DefaultOverlayHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import mantle.module.ILoadableModule;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.client.gui.CraftingStationGui;
|
||||
|
||||
public class NotEnoughItems implements ILoadableModule
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "NotEnoughItems";
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
TConstruct.logger.info("NotEnoughItems detected. Registering TConstruct NEI plugin.");
|
||||
registerNEICompat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
public static void registerNEICompat ()
|
||||
{
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
{
|
||||
API.registerGuiOverlay(CraftingStationGui.class, "crafting");
|
||||
API.registerGuiOverlayHandler(CraftingStationGui.class, new DefaultOverlayHandler(), "crafting");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package tconstruct.plugins.te3;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class TE3Helper {
|
||||
|
||||
public static void addInductionSmelterRecipe(int energy, ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int chance)
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
data.setInteger("energy", energy);
|
||||
|
||||
NBTTagCompound input1Compound = new NBTTagCompound();
|
||||
input1.writeToNBT(input1Compound);
|
||||
data.setTag("primaryInput", input1Compound);
|
||||
|
||||
NBTTagCompound input2Compound = new NBTTagCompound();
|
||||
input2.writeToNBT(input2Compound);
|
||||
data.setTag("secondaryInput", input2Compound);
|
||||
|
||||
NBTTagCompound output1Compound = new NBTTagCompound();
|
||||
output1.writeToNBT(output1Compound);
|
||||
data.setTag("primaryOutput", output1Compound);
|
||||
|
||||
if (output2 != null) {
|
||||
NBTTagCompound output2Compound = new NBTTagCompound();
|
||||
output2.writeToNBT(output2Compound);
|
||||
data.setTag("secondaryOutput", output2Compound);
|
||||
|
||||
data.setInteger("secondaryChance", chance);
|
||||
}
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", data);
|
||||
}
|
||||
|
||||
public static void addPulveriserRecipe(int energy, ItemStack input, ItemStack output, ItemStack bonus, int chance)
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
data.setInteger("energy", energy);
|
||||
|
||||
NBTTagCompound inputCompound = new NBTTagCompound();
|
||||
input.writeToNBT(inputCompound);
|
||||
data.setTag("input", inputCompound);
|
||||
|
||||
NBTTagCompound outputCompound = new NBTTagCompound();
|
||||
output.writeToNBT(outputCompound);
|
||||
data.setTag("primaryOutput", outputCompound);
|
||||
|
||||
if (bonus != null) {
|
||||
NBTTagCompound outputCompound2 = new NBTTagCompound();
|
||||
bonus.writeToNBT(outputCompound2);
|
||||
data.setTag("secondaryOutput", outputCompound2);
|
||||
|
||||
data.setInteger("secondaryChance", chance);
|
||||
}
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", data);
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package tconstruct.plugins.te3;
|
||||
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ThermalExpansion implements ILoadableModule
|
||||
{
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "ThermalExpansion";
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
ItemStack crystalCinnabar = OreDictionary.getOres("crystalCinnabar").get(0);
|
||||
|
||||
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 11), new ItemStack(TRepo.materials, 1, 40), null, 0);
|
||||
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 39), null, 0);
|
||||
TE3Helper.addPulveriserRecipe(1000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 38), null, 0);
|
||||
|
||||
TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), new ItemStack(TRepo.materials, 2, 39), GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1), 10);
|
||||
TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 1), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 3), new ItemStack(Items.iron_ingot), 100);
|
||||
TE3Helper.addPulveriserRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), new ItemStack(TRepo.materials, 2, 38), GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1), 10);
|
||||
TE3Helper.addInductionSmelterRecipe(12000, new ItemStack(TRepo.oreSlag, 1, 2), crystalCinnabar.copy(), new ItemStack(TRepo.materials, 3, 4), new ItemStack(Items.gold_ingot), 100);
|
||||
|
||||
TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 4), new ItemStack(TRepo.materials, 1, 3), new ItemStack(TRepo.materials, 1, 5), null, 0);
|
||||
TE3Helper.addInductionSmelterRecipe(4000, new ItemStack(TRepo.materials, 1, 9), new ItemStack(TRepo.materials, 3, 11), new ItemStack(TRepo.materials, 4, 14), null, 0);
|
||||
} @Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
public class Waila implements ILoadableModule
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "Waila";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
{
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("Waila detected. Registering TConstruct tank blocks with Waila registry.");
|
||||
|
||||
FMLInterModComms.sendMessage("Waila", "register", "tconstruct.plugins.waila.WailaRegistrar.wailaCallback");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
// Nothing
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -10,43 +10,43 @@ import net.minecraft.item.ItemStack;
|
||||
* @author King Lemming
|
||||
*
|
||||
*/
|
||||
public interface IEnergyContainerItem
|
||||
{
|
||||
public interface IEnergyContainerItem {
|
||||
|
||||
/**
|
||||
* Adds energy to an item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged.
|
||||
*
|
||||
* @param container
|
||||
* ItemStack to be charged.
|
||||
* @param maxReceive
|
||||
* Maximum amount of energy to be sent into the item.
|
||||
* @param simulate
|
||||
* If TRUE, the charge will only be simulated.
|
||||
* @return Amount of energy that was (or would have been, if simulated) received by the item.
|
||||
*/
|
||||
int receiveEnergy (ItemStack container, int maxReceive, boolean simulate);
|
||||
/**
|
||||
* Adds energy to a container item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged.
|
||||
*
|
||||
* @param container
|
||||
* ItemStack to be charged.
|
||||
* @param maxReceive
|
||||
* Maximum amount of energy to be sent into the item.
|
||||
* @param simulate
|
||||
* If TRUE, the charge will only be simulated.
|
||||
* @return Amount of energy that was (or would have been, if simulated) received by the item.
|
||||
*/
|
||||
int receiveEnergy(ItemStack container, int maxReceive, boolean simulate);
|
||||
|
||||
/**
|
||||
* Removes energy from an item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally discharged.
|
||||
*
|
||||
* @param container
|
||||
* ItemStack to be discharged.
|
||||
* @param maxExtract
|
||||
* Maximum amount of energy to be extracted from the item.
|
||||
* @param simulate
|
||||
* If TRUE, the discharge will only be simulated.
|
||||
* @return Amount of energy that was (or would have been, if simulated) extracted from the item.
|
||||
*/
|
||||
int extractEnergy (ItemStack container, int maxExtract, boolean simulate);
|
||||
/**
|
||||
* Removes energy from a container item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally
|
||||
* discharged.
|
||||
*
|
||||
* @param container
|
||||
* ItemStack to be discharged.
|
||||
* @param maxExtract
|
||||
* Maximum amount of energy to be extracted from the item.
|
||||
* @param simulate
|
||||
* If TRUE, the discharge will only be simulated.
|
||||
* @return Amount of energy that was (or would have been, if simulated) extracted from the item.
|
||||
*/
|
||||
int extractEnergy(ItemStack container, int maxExtract, boolean simulate);
|
||||
|
||||
/**
|
||||
* Get the amount of energy currently stored in the item.
|
||||
*/
|
||||
int getEnergyStored (ItemStack container);
|
||||
/**
|
||||
* Get the amount of energy currently stored in the container item.
|
||||
*/
|
||||
int getEnergyStored(ItemStack container);
|
||||
|
||||
/**
|
||||
* Get the max amount of energy that can be stored in the item.
|
||||
*/
|
||||
int getMaxEnergyStored (ItemStack container);
|
||||
/**
|
||||
* Get the max amount of energy that can be stored in the container item.
|
||||
*/
|
||||
int getMaxEnergyStored(ItemStack container);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -193,82 +193,16 @@ public abstract class Ability
|
||||
}
|
||||
|
||||
/**
|
||||
* The following are helper functions to create abilities packaged with Morph.
|
||||
* Use these to ability instances for mapping vanilla abilities to mobs.
|
||||
* Self explanatory.
|
||||
* Creates an ability by type.
|
||||
* Check out AbilityHandler to see each Ability type and the parse function in their respective classes for the arguments.
|
||||
* @return
|
||||
*/
|
||||
public static Ability getNewAbilityClimb()
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityClimb").invoke(null);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}//TODO add new abilities
|
||||
public static Ability getNewAbilityFireImmunity()
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityFireImmunity").invoke(null);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilityFloat(float terminalVelocity, boolean negateFallDamage)
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityFloat", float.class, boolean.class).invoke(null, terminalVelocity, negateFallDamage);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilityFly(boolean slowdownInWater)
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityFly", boolean.class).invoke(null, slowdownInWater);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilityFly()
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityFly", boolean.class).invoke(null, true);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilityHostile()
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityHostile").invoke(null);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilitySunburn()
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilitySunburn").invoke(null);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilitySwim(boolean canBreatheOnLand)
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilitySwim", boolean.class).invoke(null, canBreatheOnLand);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static Ability getNewAbilityWaterAllergy()
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("getNewAbilityWaterAllergy").invoke(null);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Ability createNewAbilityByType(String type, String[] arguments)
|
||||
{
|
||||
try {
|
||||
return (Ability)Class.forName("morph.common.ability.AbilityHandler").getDeclaredMethod("createNewAbilityByType", String.class, String[].class).invoke(null, type, arguments);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* @author PowerCrystals
|
||||
*
|
||||
* Class used to register plants and other farming-related things with MFR. Will do nothing if MFR does not exist.
|
||||
*
|
||||
*/
|
||||
public class FactoryRegistry
|
||||
{
|
||||
/*
|
||||
* This may be called at any time during pre-init, init or post-init, assuming all blocks and items
|
||||
* that are being accessed from the registry have been appropriately registered.
|
||||
* Possible messages:
|
||||
*
|
||||
* // Registration:
|
||||
* addLaserPreferredOre | NBTTag with an ItemStack saved on it, with the color on the "value" attribute,
|
||||
* | A ValuedItem with item and value set.
|
||||
* registerAutoSpawnerBlacklist | The String identifier of an entity,
|
||||
* | A subclass of EntityLivingBase.
|
||||
* registerFertilizable | An instance of IFactoryFertilizable.
|
||||
* registerFertilizer | An instance of IFactoryFertilizer.
|
||||
* registerFruitLog | The String identifier of a block.
|
||||
* registerGrindable | An instance of IFactoryGrindable.
|
||||
* registerGrinderBlacklist | A subclass of EntityLivingBase.
|
||||
* registerHarvestable | An instance of IFactoryHarvestable.
|
||||
* registerLaserOre | NBTTag with an ItemStack saved on it, with the weight on the "value" attribute,
|
||||
* | A ValuedItem with item and value set.
|
||||
* registerLiquidDrinkHandler | A ValuedItem with key and object set; ILiquidDrinkHandler expected.
|
||||
* registerMobEggHandler | An instance of IMobEggHandler.
|
||||
* registerPickableFruit | An instance of IFactoryFruit.
|
||||
* registerPlantable | An instance of IFactoryPlantable.
|
||||
* registerRanchable | An instance of IFactoryRanchable.
|
||||
* registerRedNetLogicCircuit | An instance of IRedNetLogicCircuit.
|
||||
* registerRubberTreeBiome | The biomeName field of a biome to white list for rubber trees to spawn in.
|
||||
* registerSafariNetBlacklist | A subclass of EntityLivingBase.
|
||||
* registerSafariNetHandler | An instance of ISafariNetHandler.
|
||||
* registerSludgeDrop | NBTTag with an ItemStack saved on it, with the weight on the "value" attribute,
|
||||
* | A ValuedItem with item and value set.
|
||||
* registerSpawnHandler | An instance of IMobSpawnHandler.
|
||||
* registerVillagerTradeMob | An instance of IRandomMobProvider.
|
||||
*
|
||||
* // Simple implementations:
|
||||
* { Harvestables
|
||||
* registerHarvestable_Standard | The String identifier of a block.
|
||||
* registerHarvestable_Log | The String identifier of a block.
|
||||
* registerHarvestable_Leaves | The String identifier of a block.
|
||||
* registerHarvestable_Vine | The String identifier of a block.
|
||||
* registerHarvestable_Shrub | The String identifier of a block.
|
||||
* registerHarvestable_Mushroom | The String identifier of a block.
|
||||
* registerHarvestable_Crop | An ItemStack of a block, with a damage value indicating the meta value to harvest at.
|
||||
* | A ValuedItem with value and object set; Block expected.
|
||||
* registerHarvestable_Gourd | An NBTTag with the stem and fruit attributes, both String identifiers of blocks.
|
||||
* }
|
||||
* { Plantables
|
||||
* registerPlantable_Standard | An NBTTag with the seed (Item, String identifier), and
|
||||
* crop (Block, String identifier) attributes set, optionally
|
||||
* also having the meta (Integer, placed metadata value) attribute set.
|
||||
* No special checks for location, just sustainability.
|
||||
* registerPlantable_Crop | An NBTTag with the seed (Item, String identifier), and
|
||||
* crop (Block, String identifier) attributes set, optionally
|
||||
* also having the meta (Integer, placed metadata value) attribute set.
|
||||
* Will automatically hoe dirt and grass into farmland when planting.
|
||||
* registerPlantable_Sapling | An NBTTag with the sapling (Block, String identifier), and optionally
|
||||
* the seed (Item, String identifier) attributes set.
|
||||
* }
|
||||
* { Fertilizer
|
||||
* registerFertilizer | An NBTTag with the fert (Item, String identifier), meta (Integer), and
|
||||
* type (Integer, index into FertilizerType.values()) attributes set.
|
||||
* }
|
||||
* { Fertilizables
|
||||
* registerFertilizable_Grass | The String identifier of a block. Will bonemeal the block and expect
|
||||
* tall grass be planted above and around it, must be IGrowable. Works with
|
||||
* the GrowPlant and Grass type fertilizers, not recommended for crop plants.
|
||||
* registerFertilizable_Gourd | The String identifier of a block. Must be IGrowable, and expects identical
|
||||
* behavior to vanilla stems. Works with the GrowPlant fertilizers.
|
||||
* registerFertilizable_Crop | An NBTTag with the plant (Block, String identifier, IGrowable), and
|
||||
* meta (Integer, max growth phase) attributes set, optionally also having
|
||||
* the type (Integer, index into FertilizerType) attribute set.
|
||||
* registerFertilizable_Cocoa | An NBTTag with the plant (Block, String identifier), and optionally also
|
||||
* the type (Integer, index into FertilizerType) attributes set.
|
||||
* Expects metadata of the block to exactly match cocoa pods.
|
||||
* registerFertilizable_Standard | An NBTTag with the plant (Block, String identifier, IGrowable), and
|
||||
* optionally also the type (Integer, index into FertilizerType) attributes set.
|
||||
* Expects the block to change when successfully grown (e.g., saplings).
|
||||
* }
|
||||
*/
|
||||
public static void sendMessage(String message, Object value)
|
||||
{
|
||||
if (!Loader.isModLoaded("MineFactoryReloaded") ||
|
||||
Loader.instance().activeModContainer() == null)
|
||||
return;
|
||||
try
|
||||
{
|
||||
Method m = FMLInterModComms.class.getDeclaredMethod("enqueueMessage", Object.class, String.class, IMCMessage.class);
|
||||
m.setAccessible(true);
|
||||
Constructor<IMCMessage> c = IMCMessage.class.getDeclaredConstructor(String.class, Object.class);
|
||||
c.setAccessible(true);
|
||||
m.invoke(null, Loader.instance().activeModContainer(), "MineFactoryReloaded", c.newInstance(message, value));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
/**
|
||||
* @author PowerCrystals
|
||||
*
|
||||
* Determines what algorithm the Harvester uses when it encounters this IFactoryHarvestable in the world.
|
||||
*/
|
||||
public enum HarvestType
|
||||
{
|
||||
/**
|
||||
* Just break the single block - no special action needed. e.g. Carrots, flowers, wheat.
|
||||
*/
|
||||
Normal,
|
||||
/**
|
||||
* Search for harvestable blocks adjacent to this block but leave this block. e.g. Pumpkin, melon
|
||||
*/
|
||||
Gourd,
|
||||
/**
|
||||
* Search for identical blocks above.
|
||||
*/
|
||||
Column,
|
||||
/**
|
||||
* Search for identical blocks above but leave the bottom one for the future. e.g. Cactus, sugarcane.
|
||||
*/
|
||||
LeaveBottom,
|
||||
/**
|
||||
* This block is the base of a tree and the harvester should enter tree-cutting mode.
|
||||
*/
|
||||
Tree,
|
||||
/**
|
||||
* This block is the base of the tree and the harvester should enter tree-cutting mode.
|
||||
* The tree is searched for in the negative y axis instead.
|
||||
*/
|
||||
TreeFlipped,
|
||||
/**
|
||||
* This block is part of a tree as above.
|
||||
*/
|
||||
TreeLeaf,
|
||||
/**
|
||||
* This block is part of a tree as above, but fruits are cut before logs. e.g. cocoa
|
||||
* The tree is not searched for.
|
||||
*/
|
||||
TreeFruit
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* @author PowerCrystals
|
||||
*
|
||||
* Defines a grindable entity for the Grinder.
|
||||
*/
|
||||
public interface IFactoryGrindable
|
||||
{
|
||||
/**
|
||||
* @return The class that this grindable instance is handling. This must be a subtype of EntityLivingBase or the entity will never
|
||||
* be noticed by the Grinder.
|
||||
*/
|
||||
public Class<? extends EntityLivingBase> getGrindableEntity();
|
||||
|
||||
/**
|
||||
* @param world The world this entity is in.
|
||||
* @param entity The entity instance being ground.
|
||||
* @param random A Random instance.
|
||||
* @return The drops generated when this entity is killed.
|
||||
*/
|
||||
public List<MobDrop> grind(World world, EntityLivingBase entity, Random random);
|
||||
|
||||
/**
|
||||
* @param entity The entity instance being ground.
|
||||
* @return Whether this entity has been fully processed or not.
|
||||
*/
|
||||
public boolean processEntity(EntityLivingBase entity);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* @author PowerCrystals
|
||||
*
|
||||
* Defines a harvestable block for the Harvester.
|
||||
*/
|
||||
public interface IFactoryHarvestable
|
||||
{
|
||||
/**
|
||||
* @return The block this harvestable instance is managing.
|
||||
*/
|
||||
public Block getPlant();
|
||||
|
||||
/**
|
||||
* @return The type of harvest the Harvester should perform on this block.
|
||||
*/
|
||||
public HarvestType getHarvestType();
|
||||
|
||||
/**
|
||||
* @return Whether or not the Harvester should break the block when harvesting. If false, no changes will be performed by the Harvester itself.
|
||||
*/
|
||||
public boolean breakBlock();
|
||||
|
||||
/**
|
||||
* @param world The world this block is in.
|
||||
* @param harvesterSettings The harvester's current settings. Do not modify these.
|
||||
* @param x The X coordinate of the block being harvested.
|
||||
* @param y The Y coordinate of the block being harvested.
|
||||
* @param z The Z coordinate of the block being harvested.
|
||||
* @return True if this block can be harvested.
|
||||
*/
|
||||
public boolean canBeHarvested(World world, Map<String, Boolean> harvesterSettings, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @param world The world this block is in.
|
||||
* @param rand A Random instance to use when generating drops.
|
||||
* @param harvesterSettings The harvester's current settings. Do not modify these.
|
||||
* @param x The X coordinate of the block being harvested.
|
||||
* @param y The Y coordinate of the block being harvested.
|
||||
* @param z The Z coordinate of the block being harvested.
|
||||
* @return The drops generated by breaking this block. For a default implementation, calling Block.getBlockDropped() is usually sufficient.
|
||||
*/
|
||||
public List<ItemStack> getDrops(World world, Random rand, Map<String, Boolean> harvesterSettings, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Called before the block is going to be harvested. Usually empty.
|
||||
* @param world The world this block is in.
|
||||
* @param x The X coordinate of the block being harvested.
|
||||
* @param y The Y coordinate of the block being harvested.
|
||||
* @param z The Z coordinate of the block being harvested.
|
||||
*/
|
||||
public void preHarvest(World world, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Called after the block is going to be harvested. Used to re-till soil, for example.
|
||||
* @param world The world this block is in.
|
||||
* @param x The X coordinate of the block being harvested.
|
||||
* @param y The Y coordinate of the block being harvested.
|
||||
* @param z The Z coordinate of the block being harvested.
|
||||
*/
|
||||
public void postHarvest(World world, int x, int y, int z);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
public interface ILiquidDrinkHandler
|
||||
{
|
||||
public void onDrink(EntityLivingBase player);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
|
||||
public class MobDrop extends WeightedRandom.Item
|
||||
{
|
||||
private ItemStack _stack;
|
||||
|
||||
public MobDrop(int weight, ItemStack stack)
|
||||
{
|
||||
super(weight);
|
||||
_stack = stack;
|
||||
}
|
||||
|
||||
public ItemStack getStack()
|
||||
{
|
||||
if(_stack == null) return null;
|
||||
return _stack.copy();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ValuedItem
|
||||
{
|
||||
public final int value;
|
||||
public final ItemStack item;
|
||||
public final String key;
|
||||
public final Object object;
|
||||
|
||||
public ValuedItem(int v, ItemStack i)
|
||||
{
|
||||
value = v;
|
||||
item = i;
|
||||
key = null;
|
||||
object = null;
|
||||
}
|
||||
|
||||
public ValuedItem(String v, Object i)
|
||||
{
|
||||
value = -1;
|
||||
item = null;
|
||||
key = v;
|
||||
object = i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Presently unused but included so that if they do get used in the future,
|
||||
* people including this in their jar and loading before MFR don't destroy everyone
|
||||
*/
|
||||
|
||||
public ValuedItem(int v, Object i)
|
||||
{
|
||||
value = v;
|
||||
item = null;
|
||||
key = null;
|
||||
object = i;
|
||||
}
|
||||
|
||||
public ValuedItem(String v, ItemStack i)
|
||||
{
|
||||
value = -1;
|
||||
item = i;
|
||||
key = v;
|
||||
object = null;
|
||||
}
|
||||
|
||||
public ValuedItem(int v, String k, ItemStack i)
|
||||
{
|
||||
value = v;
|
||||
item = i;
|
||||
key = k;
|
||||
object = null;
|
||||
}
|
||||
|
||||
public ValuedItem(int v, String k, Object i)
|
||||
{
|
||||
value = v;
|
||||
item = null;
|
||||
key = k;
|
||||
object = i;
|
||||
}
|
||||
|
||||
public ValuedItem(int v, String k, ItemStack i, Object o)
|
||||
{
|
||||
value = v;
|
||||
item = i;
|
||||
key = k;
|
||||
object = o;
|
||||
}
|
||||
}
|
||||
@@ -3,40 +3,12 @@ package tconstruct;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import mantle.pulsar.config.ForgeCFG;
|
||||
import mantle.pulsar.control.PulseManager;
|
||||
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.armor.player.TPlayerHandler;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.common.TConstructCreativeTab;
|
||||
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.plugins.imc.TinkerThaumcraft;
|
||||
import tconstruct.plugins.nei.TinkerNEI;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.util.EnvironmentChecks;
|
||||
import tconstruct.util.config.DimensionBlacklist;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import tconstruct.util.network.PacketPipeline;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import tconstruct.world.gen.SlimeIslandGen;
|
||||
import tconstruct.world.village.ComponentSmeltery;
|
||||
import tconstruct.world.village.ComponentToolWorkshop;
|
||||
import tconstruct.world.village.TVillageTrades;
|
||||
import tconstruct.world.village.VillageSmelteryHandler;
|
||||
import tconstruct.world.village.VillageToolStationHandler;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
@@ -51,6 +23,37 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import mantle.pulsar.config.ForgeCFG;
|
||||
import mantle.pulsar.control.PulseManager;
|
||||
import tconstruct.armor.TinkerArmor;
|
||||
import tconstruct.armor.player.TPlayerHandler;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.common.TConstructCreativeTab;
|
||||
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.plugins.ic2.TinkerIC2;
|
||||
import tconstruct.plugins.imc.TinkerAE2;
|
||||
import tconstruct.plugins.imc.TinkerBuildCraft;
|
||||
import tconstruct.plugins.imc.TinkerMystcraft;
|
||||
import tconstruct.plugins.imc.TinkerThaumcraft;
|
||||
import tconstruct.plugins.mfr.TinkerMFR;
|
||||
import tconstruct.plugins.nei.TinkerNEI;
|
||||
import tconstruct.plugins.te4.TinkerTE4;
|
||||
import tconstruct.plugins.waila.TinkerWaila;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.util.EnvironmentChecks;
|
||||
import tconstruct.util.config.DimensionBlacklist;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import tconstruct.util.network.PacketPipeline;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import tconstruct.world.gen.SlimeIslandGen;
|
||||
import tconstruct.world.village.*;
|
||||
|
||||
/**
|
||||
* TConstruct, the tool mod. Craft your tools with style, then modify until the
|
||||
@@ -121,6 +124,13 @@ public class TConstruct
|
||||
pulsar.registerPulse(new TinkerArmor());
|
||||
pulsar.registerPulse(new TinkerNEI());
|
||||
pulsar.registerPulse(new TinkerThaumcraft());
|
||||
pulsar.registerPulse(new TinkerWaila());
|
||||
pulsar.registerPulse(new TinkerBuildCraft());
|
||||
pulsar.registerPulse(new TinkerAE2());
|
||||
pulsar.registerPulse(new TinkerIC2());
|
||||
pulsar.registerPulse(new TinkerMystcraft());
|
||||
pulsar.registerPulse(new TinkerMFR());
|
||||
pulsar.registerPulse(new TinkerTE4());
|
||||
/*pulsar.registerPulse(new TinkerPrayers());
|
||||
pulsar.registerPulse(new TinkerCropify());*/
|
||||
|
||||
|
||||
+12
-23
@@ -1,33 +1,29 @@
|
||||
package tconstruct.plugins.ic2;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
|
||||
public class IC2 implements ILoadableModule
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers IC2 Compatibility", description = "Tinkers Construct compatibility for IndustrialCraft 2", modsRequired = "IC2")
|
||||
public class TinkerIC2
|
||||
{
|
||||
private static final String IC2_UUM_FLUIDNAME = "ic2fluiduumatter";
|
||||
|
||||
private static final String IC2_UUM_FLUIDNAME = "uumatter";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "IC2";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[IC2] Preparing for shenanigans.");
|
||||
TConstruct.logger.info("IC2 detected. Preparing for shenanigans.");
|
||||
|
||||
Fluid fluidUUM = FluidRegistry.getFluid(IC2_UUM_FLUIDNAME);
|
||||
if (fluidUUM == null)
|
||||
@@ -39,11 +35,4 @@ public class IC2 implements ILoadableModule
|
||||
// Block casting
|
||||
basinCasting.addCastingRecipe(new ItemStack(Blocks.diamond_block), fluidStackBlock, new ItemStack(Blocks.dirt), true, 50);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers AE2 Compatibility", description = "Tinkers Construct compatibility for Applied Energistics 2", modsRequired = "appliedenergistics2")
|
||||
public class TinkerAE2
|
||||
{
|
||||
private static List<String> spatialIOLogics = Arrays.asList(
|
||||
"EssenceExtractorLogic", "GolemPedestalLogic", //TODO What happened to these?
|
||||
"MultiServantLogic"); //TODO Should Mantle handle this?
|
||||
|
||||
private static List<String> spatialIOSmelteryLogics = Arrays.asList("AdaptiveSmelteryLogic", "AqueductLogic", "CastingBasinLogic", "CastingChannelLogic",
|
||||
"CastingTableLogic", "FaucetLogic", "LavaTankLogic", "SmelteryDrainLogic", "SmelteryLogic", "TankAirLogic", "TowerFurnaceLogic");
|
||||
|
||||
private static List<String> spatialIOToolLogics = Arrays.asList("CraftingStationLogic", "FrypanLogic", "PartBuilderLogic", "PatternChestLogic",
|
||||
"StencilTableLogic", "ToolForgeLogic", "ToolStationLogic");
|
||||
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
TConstruct.logger.info("AE2 detected. Registering for Spatial IO.");
|
||||
|
||||
addtoSpatialWhitelist("tconstruct.blocks.logic.DryingRackLogic");
|
||||
addtoSpatialWhitelist("tconstruct.mechworks.logic.TileEntityLandmine");
|
||||
|
||||
for(String s : spatialIOSmelteryLogics)
|
||||
{
|
||||
addtoSpatialWhitelist("tconstruct.smeltery.logic." + s);
|
||||
}
|
||||
|
||||
for(String s : spatialIOToolLogics)
|
||||
{
|
||||
addtoSpatialWhitelist("tconstruct.tools.logic." + s);
|
||||
}
|
||||
}
|
||||
|
||||
public void addtoSpatialWhitelist(String teClass)
|
||||
{
|
||||
FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial", teClass);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers BuildCraft Compatibility", description = "Tinkers Construct compatibility for BC Transport", modsRequired = "BuildCraft|Transport")
|
||||
public class TinkerBuildCraft
|
||||
{
|
||||
@Handler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
TConstruct.logger.info("BuildCraft detected. Registering facades.");
|
||||
// Smeltery Blocks
|
||||
addFacade(TinkerSmeltery.smeltery, 2);
|
||||
for (int sc = 4; sc < 11; sc++)
|
||||
{
|
||||
addFacade(TinkerSmeltery.smeltery, sc);
|
||||
}
|
||||
|
||||
addFacade(TinkerSmeltery.searedBlock, 0);
|
||||
addFacade(TinkerSmeltery.searedBlockNether, 0);
|
||||
}
|
||||
|
||||
private void addFacade (Block b, int meta)
|
||||
{
|
||||
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", new ItemStack(b, 1, meta));
|
||||
}
|
||||
}
|
||||
+12
-22
@@ -1,39 +1,29 @@
|
||||
package tconstruct.plugins.imc;
|
||||
|
||||
import mantle.module.ILoadableModule;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
public class Mystcraft implements ILoadableModule
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers Mystcraft Compatibility", forced = true, modsRequired = "Mystcraft")
|
||||
public class TinkerMystcraft
|
||||
{
|
||||
|
||||
private static String[] fluids = new String[] { "invar.molten", "electrum.molten", "bronze.molten", "aluminumbrass.molten", "manyullyn.molten", "alumite.molten", "cobalt.molten", "moltenArdite",
|
||||
"ender", "steel.molten", "platinum.molten" };
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static String modId = "Mystcraft";
|
||||
|
||||
@Override
|
||||
public void preInit ()
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("[Mystcraft] Blacklisting Mystcraft fluid symbols.");
|
||||
TConstruct.logger.info("Mystcraft detected. Blacklisting Mystcraft fluid symbols.");
|
||||
for (String nm : fluids)
|
||||
sendFluidBlacklist(nm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void sendFluidBlacklist (String FluidName)
|
||||
{
|
||||
NBTTagCompound NBTMsg = new NBTTagCompound();
|
||||
@@ -17,7 +17,7 @@ public class TinkerThaumcraft
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
TConstruct.logger.info("[Thaumcraft] Registering harvestables.");
|
||||
TConstruct.logger.info("Thaumcraft detected. Registering harvestables.");
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerry, 1, 12));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerry, 1, 13));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(TinkerWorld.oreBerry, 1, 14));
|
||||
|
||||
+7
-7
@@ -1,25 +1,25 @@
|
||||
package tconstruct.plugins.minefactoryreloaded;
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler;
|
||||
|
||||
public class Drinkables implements ILiquidDrinkHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onDrink (EntityPlayer player)
|
||||
public void onDrink (EntityLivingBase entity)
|
||||
{
|
||||
//boost health when drink
|
||||
if (player != null)
|
||||
if (entity != null)
|
||||
{
|
||||
PotionEffect potion = player.getActivePotionEffect(Potion.field_76434_w);
|
||||
PotionEffect potion = entity.getActivePotionEffect(Potion.field_76434_w);
|
||||
int duration = 0;
|
||||
if (potion != null)
|
||||
duration = potion.duration;
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0));
|
||||
duration = potion.getDuration();
|
||||
entity.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0));
|
||||
}
|
||||
|
||||
}
|
||||
+5
-4
@@ -1,4 +1,4 @@
|
||||
package tconstruct.plugins.minefactoryreloaded;
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -8,14 +8,15 @@ 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.IFactoryGrindable;
|
||||
import powercrystals.minefactoryreloaded.api.MobDrop;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
|
||||
public class GrindableHorse implements IFactoryGrindable
|
||||
{
|
||||
@Override
|
||||
public Class<?> getGrindableEntity ()
|
||||
public Class<? extends EntityLivingBase> getGrindableEntity ()
|
||||
{
|
||||
return EntityHorse.class;
|
||||
}
|
||||
@@ -25,7 +26,7 @@ public class GrindableHorse implements IFactoryGrindable
|
||||
{
|
||||
List<MobDrop> drops = new ArrayList<MobDrop>();
|
||||
|
||||
drops.add(new MobDrop(10, new ItemStack(TRepo.materials, random.nextInt(4) + 1, 36)));
|
||||
drops.add(new MobDrop(10, new ItemStack(TinkerTools.materials, random.nextInt(4) + 1, 36)));
|
||||
|
||||
return drops;
|
||||
}
|
||||
+12
-9
@@ -1,32 +1,35 @@
|
||||
package tconstruct.plugins.minefactoryreloaded;
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.HarvestType;
|
||||
import powercrystals.minefactoryreloaded.api.IFactoryHarvestable;
|
||||
|
||||
public class HarvestableOreBerry implements IFactoryHarvestable
|
||||
{
|
||||
private int _sourceBlockId;
|
||||
private int _berryItemId;
|
||||
private Block _sourceBlock;
|
||||
private Item _berryItem;
|
||||
private int _metaOffset;
|
||||
|
||||
public HarvestableOreBerry(int sourceBlockId, int berryItemId, int metaOffset)
|
||||
public HarvestableOreBerry(Block sourceBlock, Item berryItem, int metaOffset)
|
||||
{
|
||||
_sourceBlockId = sourceBlockId;
|
||||
_berryItemId = berryItemId;
|
||||
_sourceBlock = sourceBlock;
|
||||
_berryItem = berryItem;
|
||||
_metaOffset = metaOffset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlantId ()
|
||||
public Block getPlant ()
|
||||
{
|
||||
return _sourceBlockId;
|
||||
return _sourceBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,7 +53,7 @@ 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(_berryItemId, 1, world.getBlockMetadata(x, y, z) % 4 + _metaOffset) };
|
||||
ItemStack[] returnItems = { new ItemStack(_berryItem, 1, world.getBlockMetadata(x, y, z) % 4 + _metaOffset) };
|
||||
return Arrays.asList(returnItems);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import powercrystals.minefactoryreloaded.api.FactoryRegistry;
|
||||
import powercrystals.minefactoryreloaded.api.ValuedItem;
|
||||
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));
|
||||
FactoryRegistry.sendMessage("registerHarvestable", new HarvestableOreBerry(TinkerWorld.oreBerrySecond, TinkerWorld.oreBerries, 4));
|
||||
FactoryRegistry.sendMessage("registerGrindable", new GrindableHorse());
|
||||
FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem(TinkerSmeltery.bloodFluid.getName(), new Drinkables()));
|
||||
}
|
||||
}
|
||||
+10
-21
@@ -1,22 +1,17 @@
|
||||
package tconstruct.plugins.minefactoryreloaded;
|
||||
package tconstruct.plugins.mfr;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.plugins.ICompatPlugin;
|
||||
|
||||
public class MineFactoryReloaded implements ICompatPlugin
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers MFR Compatibility", description = "Tinkers Construct compatibility for MineFactory Reloaded", modsRequired = "MineFactoryReloaded")
|
||||
public class TinkerMFR
|
||||
{
|
||||
@Override
|
||||
public String getModId() {
|
||||
return "MineFactoryReloaded";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
TConstruct.logger.info("MineFactoryReloaded detected. Registering TConstruct farmables/grindables with MFR's Farming Registry.");
|
||||
MFRRegister.registerWithMFR();
|
||||
@@ -26,10 +21,4 @@ public class MineFactoryReloaded implements ICompatPlugin
|
||||
* Currently used weights are from about 50 (emerald) to 175 (coal).
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
package tconstruct.plugins.te4;
|
||||
|
||||
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
|
||||
*
|
||||
* @author KingLemming
|
||||
*/
|
||||
public class TE4Helper
|
||||
{
|
||||
|
||||
public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {
|
||||
|
||||
if (input == null || output == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
|
||||
input.writeToNBT(toSend.getCompoundTag("input"));
|
||||
output.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "FurnaceRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) {
|
||||
|
||||
addPulverizerRecipe(energy, input, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
toSend.setTag("primaryOutput", new NBTTagCompound());
|
||||
toSend.setTag("secondaryOutput", new NBTTagCompound());
|
||||
|
||||
input.writeToNBT(toSend.getCompoundTag("input"));
|
||||
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
|
||||
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
|
||||
toSend.setInteger("secondaryChance", secondaryChance);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {
|
||||
|
||||
addSawmillRecipe(energy, input, primaryOutput, null, 0);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
if (input == null || primaryOutput == null || secondaryOutput == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
toSend.setTag("primaryOutput", new NBTTagCompound());
|
||||
toSend.setTag("secondaryOutput", new NBTTagCompound());
|
||||
|
||||
input.writeToNBT(toSend.getCompoundTag("input"));
|
||||
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
|
||||
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
|
||||
toSend.setInteger("secondaryChance", secondaryChance);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
addSmelterRecipe(energy, primaryInput, secondaryInput, primaryOutput, secondaryOutput, 100);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("primaryInput", new NBTTagCompound());
|
||||
toSend.setTag("secondaryInput", new NBTTagCompound());
|
||||
toSend.setTag("primaryOutput", new NBTTagCompound());
|
||||
toSend.setTag("secondaryOutput", new NBTTagCompound());
|
||||
|
||||
primaryInput.writeToNBT(toSend.getCompoundTag("primaryInput"));
|
||||
secondaryInput.writeToNBT(toSend.getCompoundTag("secondaryInput"));
|
||||
primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
|
||||
secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
|
||||
toSend.setInteger("secondaryChance", secondaryChance);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", toSend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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"
|
||||
*
|
||||
* @param oreType
|
||||
*/
|
||||
public static void addSmelterBlastOre(String oreType) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setString("oreType", oreType);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "SmelterBlastOreType", toSend);
|
||||
}
|
||||
|
||||
public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {
|
||||
|
||||
if (input == null || output == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
|
||||
input.writeToNBT(toSend.getCompoundTag("input"));
|
||||
output.writeToNBT(toSend.getCompoundTag("output"));
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {
|
||||
|
||||
if (input == null || output == null || fluid == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
toSend.setTag("fluid", new NBTTagCompound());
|
||||
|
||||
input.writeToNBT(toSend.getCompoundTag("input"));
|
||||
output.writeToNBT(toSend.getCompoundTag("output"));
|
||||
toSend.setBoolean("reversible", reversible);
|
||||
fluid.writeToNBT(toSend.getCompoundTag("fluid"));
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {
|
||||
|
||||
if (input == null || output == null || fluid == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setInteger("energy", energy);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
toSend.setTag("fluid", new NBTTagCompound());
|
||||
|
||||
input.writeToNBT(toSend.getCompoundTag("input"));
|
||||
output.writeToNBT(toSend.getCompoundTag("output"));
|
||||
toSend.setBoolean("reversible", reversible);
|
||||
toSend.setInteger("chance", chance);
|
||||
fluid.writeToNBT(toSend.getCompoundTag("fluid"));
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
|
||||
}
|
||||
|
||||
public static void addMagmaticFuel(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setString("fluidName", fluidName);
|
||||
toSend.setInteger("energy", energy);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "MagmaticFuel", toSend);
|
||||
}
|
||||
|
||||
public static void addCompressionFuel(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setString("fluidName", fluidName);
|
||||
toSend.setInteger("energy", energy);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CompressionFuel", toSend);
|
||||
}
|
||||
|
||||
public static void addReactantFuel(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setString("fluidName", fluidName);
|
||||
toSend.setInteger("energy", energy);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "ReactantFuel", toSend);
|
||||
}
|
||||
|
||||
public static void addCoolant(String fluidName, int energy) {
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
|
||||
toSend.setString("fluidName", fluidName);
|
||||
toSend.setInteger("energy", energy);
|
||||
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "Coolant", toSend);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package tconstruct.plugins.te4;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers TE4 Compatibility", description = "Tinkers Construct compatibility for Thermal Expansion", modsRequired = "ThermalExpansion")
|
||||
public class TinkerTE4
|
||||
{
|
||||
@Handler
|
||||
public void init ()
|
||||
{
|
||||
TConstruct.logger.info("Thermal Expansion detected. Adding Pulverizer & Induction Smelter recipes");
|
||||
ItemStack crystalCinnabar = OreDictionary.getOres("crystalCinnabar").get(0);
|
||||
|
||||
TE4Helper.addPulverizerRecipe(1000, new ItemStack(TinkerTools.materials, 1, 11), new ItemStack(TinkerTools.materials, 1, 40), null, 0);
|
||||
TE4Helper.addPulverizerRecipe(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);
|
||||
|
||||
TE4Helper.addPulverizerRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 1), new ItemStack(TinkerTools.materials, 2, 39), GameRegistry.findItemStack("ThermalExpansion", "dustIron", 1), 10);
|
||||
TE4Helper.addSmelterRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 1), crystalCinnabar.copy(), new ItemStack(TinkerTools.materials, 3, 3), new ItemStack(Items.iron_ingot), 100);
|
||||
TE4Helper.addPulverizerRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 2), new ItemStack(TinkerTools.materials, 2, 38), GameRegistry.findItemStack("ThermalExpansion", "dustGold", 1), 10);
|
||||
TE4Helper.addSmelterRecipe(12000, new ItemStack(TinkerWorld.oreSlag, 1, 2), crystalCinnabar.copy(), new ItemStack(TinkerTools.materials, 3, 4), new ItemStack(Items.gold_ingot), 100);
|
||||
|
||||
TE4Helper.addSmelterRecipe(4000, new ItemStack(TinkerTools.materials, 1, 4), new ItemStack(TinkerTools.materials, 1, 3), new ItemStack(TinkerTools.materials, 1, 5), null, 0);
|
||||
TE4Helper.addSmelterRecipe(4000, new ItemStack(TinkerTools.materials, 1, 9), new ItemStack(TinkerTools.materials, 3, 11), new ItemStack(TinkerTools.materials, 4, 14), null, 0);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.blocks.logic.CastingBasinLogic;
|
||||
import tconstruct.smeltery.logic.CastingBasinLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import tconstruct.blocks.logic.CastingChannelLogic;
|
||||
import tconstruct.smeltery.logic.CastingChannelLogic;
|
||||
|
||||
public class CastingChannelDataProvider implements IWailaDataProvider
|
||||
{
|
||||
+1
-1
@@ -5,7 +5,7 @@ import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.blocks.logic.LavaTankLogic;
|
||||
import tconstruct.smeltery.logic.LavaTankLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.blocks.logic.SmelteryLogic;
|
||||
import tconstruct.smeltery.logic.SmelteryLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.blocks.logic.CastingTableLogic;
|
||||
import tconstruct.smeltery.logic.CastingTableLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import mantle.pulsar.pulse.Handler;
|
||||
import mantle.pulsar.pulse.Pulse;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers Waila Compatibility", description = "Tinkers Construct compatibility for Waila", modsRequired = "Waila")
|
||||
public class TinkerWaila
|
||||
{
|
||||
@Handler
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
TConstruct.logger.info("Waila detected. Registering TConstruct tank blocks with Waila registry.");
|
||||
FMLInterModComms.sendMessage("Waila", "register", "tconstruct.plugins.waila.WailaRegistrar.wailaCallback");
|
||||
}
|
||||
}
|
||||
+6
-8
@@ -1,15 +1,13 @@
|
||||
package tconstruct.plugins.waila;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.LavaTankBlock;
|
||||
import tconstruct.blocks.SmelteryBlock;
|
||||
import tconstruct.blocks.logic.CastingBasinLogic;
|
||||
import tconstruct.blocks.logic.CastingChannelLogic;
|
||||
import tconstruct.blocks.logic.CastingTableLogic;
|
||||
import tconstruct.smeltery.blocks.LavaTankBlock;
|
||||
import tconstruct.smeltery.blocks.SmelteryBlock;
|
||||
import tconstruct.smeltery.logic.CastingBasinLogic;
|
||||
import tconstruct.smeltery.logic.CastingChannelLogic;
|
||||
import tconstruct.smeltery.logic.CastingTableLogic;
|
||||
|
||||
public class WailaRegistrar
|
||||
{
|
||||
@@ -39,7 +37,7 @@ public class WailaRegistrar
|
||||
|
||||
public static String fluidNameHelper (FluidStack f)
|
||||
{
|
||||
return f.getFluid().getLocalizedName();
|
||||
return f.getFluid().getLocalizedName(f);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user