made progress with addition to research tree, for #1951
This commit is contained in:
parent
149700c721
commit
4a1bc66d63
12 changed files with 425 additions and 29 deletions
|
@ -134,6 +134,9 @@ import buildcraft.core.science.Tier;
|
|||
@Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
public class BuildCraftBuilders extends BuildCraftMod {
|
||||
|
||||
@Mod.Instance("BuildCraft|Builders")
|
||||
public static BuildCraftBuilders instance;
|
||||
|
||||
public static final char BPT_SEP_CHARACTER = '-';
|
||||
public static final int LIBRARY_PAGE_SIZE = 12;
|
||||
public static final int MAX_BLUEPRINTS_NAME_SIZE = 32;
|
||||
|
@ -161,8 +164,6 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
public static TechnoSimpleItem technoBlueprintItem = new TechnoSimpleItem();
|
||||
|
||||
public static ActionFiller[] fillerActions;
|
||||
@Mod.Instance("BuildCraft|Builders")
|
||||
public static BuildCraftBuilders instance;
|
||||
|
||||
public static BlueprintDatabase serverDB;
|
||||
public static BlueprintDatabase clientDB;
|
||||
|
|
|
@ -96,7 +96,10 @@ import buildcraft.core.recipes.IntegrationRecipeManager;
|
|||
import buildcraft.core.recipes.RefineryRecipeManager;
|
||||
import buildcraft.core.render.BlockHighlightHandler;
|
||||
import buildcraft.core.robots.EntityRobot;
|
||||
import buildcraft.core.science.TechnoField;
|
||||
import buildcraft.core.science.TechnoSimpleItem;
|
||||
import buildcraft.core.science.TechnoStatement;
|
||||
import buildcraft.core.science.Technology;
|
||||
import buildcraft.core.science.Tier;
|
||||
import buildcraft.core.triggers.ActionMachineControl;
|
||||
import buildcraft.core.triggers.ActionMachineControl.Mode;
|
||||
|
@ -120,9 +123,14 @@ import buildcraft.core.utils.WorldPropertyIsOre;
|
|||
import buildcraft.core.utils.WorldPropertyIsShoveled;
|
||||
import buildcraft.core.utils.WorldPropertyIsSoft;
|
||||
import buildcraft.core.utils.WorldPropertyIsWood;
|
||||
import buildcraft.silicon.ItemRedstoneChipset.Chipset;
|
||||
|
||||
@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", acceptedMinecraftVersions = "[1.7.10,1.8)", dependencies = "required-after:Forge@[10.13.0.1179,)")
|
||||
public class BuildCraftCore extends BuildCraftMod {
|
||||
|
||||
@Mod.Instance("BuildCraft|Core")
|
||||
public static BuildCraftCore instance;
|
||||
|
||||
public static final boolean NONRELEASED_BLOCKS = true;
|
||||
|
||||
public static enum RenderMode {
|
||||
|
@ -192,9 +200,6 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public static boolean loadDefaultRecipes = true;
|
||||
public static boolean consumeWaterSources = false;
|
||||
|
||||
@Mod.Instance("BuildCraft|Core")
|
||||
public static BuildCraftCore instance;
|
||||
|
||||
public static Achievement woodenGearAchievement;
|
||||
public static Achievement stoneGearAchievement;
|
||||
public static Achievement ironGearAchievement;
|
||||
|
@ -226,7 +231,28 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
|
||||
public static GameProfile gameProfile = new GameProfile(UUID.nameUUIDFromBytes("buildcraft.core".getBytes()), "[BuildCraft]");
|
||||
|
||||
private static TechnoSimpleItem technoWrenchItem = new TechnoSimpleItem();
|
||||
public static TechnoField technoTransport = new TechnoField();
|
||||
public static TechnoField technoEnergy = new TechnoField();
|
||||
public static TechnoField technoLiquid = new TechnoField();
|
||||
public static TechnoField technoCrafting = new TechnoField();
|
||||
public static TechnoField technoMining = new TechnoField();
|
||||
public static TechnoField technoBuilding = new TechnoField();
|
||||
public static TechnoField technoSilicon = new TechnoField();
|
||||
public static TechnoField technoRobotics = new TechnoField();
|
||||
public static TechnoField technoCommander = new TechnoField();
|
||||
|
||||
public static TechnoSimpleItem technoWrenchItem = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoMapLocation = new TechnoSimpleItem();
|
||||
|
||||
public static TechnoStatement technoTriggerMachineActive = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerEnergyHigh = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerContainsInventory = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerContainsFluid = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerRedstoneActive = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerInventoryBelow25 = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerFluidContainerBelow25 = new TechnoStatement();
|
||||
public static TechnoStatement technoActionRedstone = new TechnoStatement();
|
||||
public static TechnoStatement technoActionOn = new TechnoStatement();
|
||||
|
||||
private static FloatBuffer modelviewF;
|
||||
private static FloatBuffer projectionF;
|
||||
|
@ -407,6 +433,10 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
iconProvider.registerIcons(event.map);
|
||||
StatementIconProvider.INSTANCE.registerIcons(event.map);
|
||||
EnumColor.registerIcons(event.map);
|
||||
|
||||
for (Technology t : Technology.technologies.values()) {
|
||||
t.registerIcons(event.map);
|
||||
}
|
||||
} else if (event.map.getTextureType() == 0) {
|
||||
BuildCraftCore.redLaserTexture = event.map.registerIcon("buildcraft:blockRedLaser");
|
||||
BuildCraftCore.blueLaserTexture = event.map.registerIcon("buildcraft:blockBlueLaser");
|
||||
|
@ -420,10 +450,139 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public void loadTechnology(FMLPostInitializationEvent evt) {
|
||||
Tier.initializeTechnologies();
|
||||
|
||||
// Technology Clusters
|
||||
|
||||
technoTransport.initialize(
|
||||
Tier.WoodenGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Transport",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoEnergy.initialize(
|
||||
Tier.WoodenGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Energy",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoLiquid.initialize(
|
||||
Tier.WoodenGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Liquid",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoCrafting.initialize(
|
||||
Tier.WoodenGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Crafting",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoMining.initialize(
|
||||
Tier.IronGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Mining",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoBuilding.initialize(
|
||||
Tier.GoldenGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Building",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoSilicon.initialize(
|
||||
Tier.RedstoneCrystalGear,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Silicon",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoRobotics.initialize(
|
||||
Tier.DiamondChipset,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Robotics",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
technoCommander.initialize(
|
||||
Tier.RedstoneCrystalChipset,
|
||||
"buildcraft:unknown",
|
||||
"technology.field.Commander",
|
||||
new ItemStack(woodenGearItem, 15));
|
||||
|
||||
// Items
|
||||
|
||||
technoWrenchItem.initialize(
|
||||
Tier.StoneGear,
|
||||
wrenchItem,
|
||||
new ItemStack(stoneGearItem, 10));
|
||||
|
||||
technoMapLocation.initialize(
|
||||
Tier.DiamondChipset,
|
||||
mapLocationItem,
|
||||
new ItemStack(stoneGearItem, 10),
|
||||
technoRobotics);
|
||||
|
||||
// Statements
|
||||
|
||||
technoTriggerMachineActive.initialize(
|
||||
Tier.Chipset,
|
||||
triggerMachineActive,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoTriggerEnergyHigh.initialize(
|
||||
Tier.Chipset,
|
||||
triggerEnergyHigh,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoTriggerContainsInventory.initialize(
|
||||
Tier.Chipset,
|
||||
triggerContainsInventory,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoTriggerContainsFluid.initialize(
|
||||
Tier.Chipset,
|
||||
triggerContainsFluid,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoTriggerRedstoneActive.initialize(
|
||||
Tier.Chipset,
|
||||
triggerRedstoneActive,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoTriggerInventoryBelow25.initialize(
|
||||
Tier.Chipset,
|
||||
triggerInventoryBelow25,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoTriggerFluidContainerBelow25.initialize(
|
||||
Tier.Chipset,
|
||||
triggerFluidContainerBelow25,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoActionRedstone.initialize(
|
||||
Tier.Chipset,
|
||||
actionRedstone,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
|
||||
technoActionOn.initialize(
|
||||
Tier.Chipset,
|
||||
actionOn,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
technoSilicon);
|
||||
}
|
||||
|
||||
public void loadRecipes() {
|
||||
|
|
|
@ -48,6 +48,7 @@ import buildcraft.api.core.BlockIndex;
|
|||
import buildcraft.api.core.JavaTools;
|
||||
import buildcraft.api.fuels.IronEngineCoolant;
|
||||
import buildcraft.api.fuels.IronEngineFuel;
|
||||
import buildcraft.api.gates.ITrigger;
|
||||
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
||||
import buildcraft.core.BlockSpring;
|
||||
import buildcraft.core.DefaultProps;
|
||||
|
@ -56,8 +57,8 @@ import buildcraft.core.Version;
|
|||
import buildcraft.core.network.BuildCraftChannelHandler;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.science.TechnoSimpleItem;
|
||||
import buildcraft.core.science.TechnoStatement;
|
||||
import buildcraft.core.science.Tier;
|
||||
import buildcraft.core.triggers.BCTrigger;
|
||||
import buildcraft.energy.BlockBuildcraftFluid;
|
||||
import buildcraft.energy.BlockEnergyConverter;
|
||||
import buildcraft.energy.BlockEnergyEmitter;
|
||||
|
@ -80,11 +81,15 @@ import buildcraft.energy.worldgen.BiomeGenOilDesert;
|
|||
import buildcraft.energy.worldgen.BiomeGenOilOcean;
|
||||
import buildcraft.energy.worldgen.BiomeInitializer;
|
||||
import buildcraft.energy.worldgen.OilPopulate;
|
||||
import buildcraft.silicon.ItemRedstoneChipset.Chipset;
|
||||
import buildcraft.transport.network.PacketHandlerTransport;
|
||||
|
||||
@Mod(name = "BuildCraft Energy", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Energy", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
public class BuildCraftEnergy extends BuildCraftMod {
|
||||
|
||||
@Mod.Instance("BuildCraft|Energy")
|
||||
public static BuildCraftEnergy instance;
|
||||
|
||||
public static final int ENERGY_REMOVE_BLOCK = 25;
|
||||
public static final int ENERGY_EXTRACT_ITEM = 2;
|
||||
public static boolean spawnOilSprings = true;
|
||||
|
@ -105,22 +110,22 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
public static Item bucketRedPlasma;
|
||||
public static Item fuel;
|
||||
|
||||
public static TechnoSimpleItem technoRedstoneEngine = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoStoneEngine = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoIronEngine = new TechnoSimpleItem();
|
||||
|
||||
public static boolean canOilBurn;
|
||||
public static double oilWellScalar = 1.0;
|
||||
public static Set<Integer> oilBiomeIDs = new HashSet<Integer>();
|
||||
public static Set<Integer> excessiveOilBiomeIDs = new HashSet<Integer>();
|
||||
public static Set<Integer> excludeOilBiomeIDs = new HashSet<Integer>();
|
||||
public static TreeMap<BlockIndex, Integer> saturationStored = new TreeMap<BlockIndex, Integer>();
|
||||
public static BCTrigger triggerBlueEngineHeat = new TriggerEngineHeat(EnergyStage.BLUE);
|
||||
public static BCTrigger triggerGreenEngineHeat = new TriggerEngineHeat(EnergyStage.GREEN);
|
||||
public static BCTrigger triggerYellowEngineHeat = new TriggerEngineHeat(EnergyStage.YELLOW);
|
||||
public static BCTrigger triggerRedEngineHeat = new TriggerEngineHeat(EnergyStage.RED);
|
||||
@Mod.Instance("BuildCraft|Energy")
|
||||
public static BuildCraftEnergy instance;
|
||||
public static ITrigger triggerBlueEngineHeat = new TriggerEngineHeat(EnergyStage.BLUE);
|
||||
public static ITrigger triggerGreenEngineHeat = new TriggerEngineHeat(EnergyStage.GREEN);
|
||||
public static ITrigger triggerYellowEngineHeat = new TriggerEngineHeat(EnergyStage.YELLOW);
|
||||
public static ITrigger triggerRedEngineHeat = new TriggerEngineHeat(EnergyStage.RED);
|
||||
|
||||
public static TechnoSimpleItem technoRedstoneEngine = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoStoneEngine = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoIronEngine = new TechnoSimpleItem();
|
||||
|
||||
public static TechnoStatement technologyTriggerRedEngineHeat = new TechnoStatement();
|
||||
|
||||
private static Fluid buildcraftFluidOil;
|
||||
private static Fluid buildcraftFluidFuel;
|
||||
|
@ -381,6 +386,13 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
|
||||
technoIronEngine.initialize(Tier.IronGear, new ItemStack(engineBlock, 1, 2),
|
||||
new ItemStack(BuildCraftCore.ironGearItem, 20), technoStoneEngine);
|
||||
|
||||
technologyTriggerRedEngineHeat.initialize(
|
||||
Tier.IronChipset,
|
||||
triggerRedEngineHeat,
|
||||
"",
|
||||
Chipset.IRON.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
}
|
||||
|
||||
public static void loadRecipes() {
|
||||
|
|
|
@ -76,6 +76,9 @@ import buildcraft.factory.schematics.SchematicTank;
|
|||
@Mod(name = "BuildCraft Factory", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Factory", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
public class BuildCraftFactory extends BuildCraftMod {
|
||||
|
||||
@Mod.Instance("BuildCraft|Factory")
|
||||
public static BuildCraftFactory instance;
|
||||
|
||||
public static final int MINING_MJ_COST_PER_BLOCK = 64;
|
||||
public static BlockQuarry quarryBlock;
|
||||
public static BlockMiningWell miningWellBlock;
|
||||
|
@ -102,8 +105,6 @@ public class BuildCraftFactory extends BuildCraftMod {
|
|||
public static float miningMultiplier = 1;
|
||||
public static int miningDepth = 256;
|
||||
public static PumpDimensionList pumpDimensionList;
|
||||
@Mod.Instance("BuildCraft|Factory")
|
||||
public static BuildCraftFactory instance;
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent evt) {
|
||||
|
|
|
@ -59,6 +59,7 @@ import buildcraft.core.robots.boards.BoardRobotPickerNBT;
|
|||
import buildcraft.core.robots.boards.BoardRobotPlanterNBT;
|
||||
import buildcraft.core.robots.boards.BoardRobotShovelmanNBT;
|
||||
import buildcraft.core.science.TechnoSimpleItem;
|
||||
import buildcraft.core.science.TechnoStatement;
|
||||
import buildcraft.core.science.Tier;
|
||||
import buildcraft.silicon.BlockLaser;
|
||||
import buildcraft.silicon.BlockLaserTable;
|
||||
|
@ -112,6 +113,8 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
public static Item redstoneCrystal;
|
||||
public static Item robotItem;
|
||||
|
||||
public static ITrigger triggerRobotSleep = new TriggerRobotSleep();
|
||||
|
||||
public static IAction actionRobotGotoStation = new ActionRobotGotoStation();
|
||||
public static IAction actionRobotWakeUp = new ActionRobotWakeUp();
|
||||
public static IAction actionRobotWorkInArea = new ActionRobotWorkInArea();
|
||||
|
@ -121,8 +124,6 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
public static IAction actionStationForbidRobot = new ActionStationForbidRobot();
|
||||
public static IAction actionStationDropInPipe = new ActionStationRequestItemsPipe();
|
||||
|
||||
public static ITrigger triggerRobotSleep = new TriggerRobotSleep();
|
||||
|
||||
public static TechnoSimpleItem technoRedstoneBoard = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoLaserBlock = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoAssemblyTableBlock = new TechnoSimpleItem();
|
||||
|
@ -132,6 +133,15 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
public static TechnoSimpleItem technoRedstoneCrystal = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoRobotItem = new TechnoSimpleItem();
|
||||
|
||||
public static TechnoStatement technoTriggerRobotSleep = new TechnoStatement();
|
||||
public static TechnoStatement technoActionRobotGotoStation = new TechnoStatement();
|
||||
public static TechnoStatement technoActionRobotWakeUp = new TechnoStatement();
|
||||
public static TechnoStatement technoActionRobotWorkInArea = new TechnoStatement();
|
||||
public static TechnoStatement technoActionRobotFilter = new TechnoStatement();
|
||||
public static TechnoStatement technoActionStationRequestItems = new TechnoStatement();
|
||||
public static TechnoStatement technoActionStationForbidRobot = new TechnoStatement();
|
||||
public static TechnoStatement technoActionStationDropInPipe = new TechnoStatement();
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent evt) {
|
||||
SchematicRegistry.declareBlueprintSupport("BuildCraft|Silicon");
|
||||
|
@ -213,6 +223,8 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
|
||||
@Mod.EventHandler
|
||||
public void loadTechnology(FMLPostInitializationEvent evt) {
|
||||
// Items and blocks
|
||||
|
||||
technoLaserBlock.initialize(
|
||||
Tier.EmeraldGear,
|
||||
laserBlock,
|
||||
|
@ -252,6 +264,64 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
Tier.RedstoneCrystalChipset,
|
||||
zonePlanBlock,
|
||||
new ItemStack(BuildCraftCore.diamondGearItem /* */, 5));
|
||||
|
||||
// Statements
|
||||
|
||||
technoTriggerRobotSleep.initialize(
|
||||
Tier.DiamondChipset,
|
||||
triggerRobotSleep,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionRobotGotoStation.initialize(
|
||||
Tier.DiamondChipset,
|
||||
actionRobotGotoStation,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionRobotWakeUp.initialize(
|
||||
Tier.DiamondChipset,
|
||||
actionRobotWakeUp,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionRobotWorkInArea.initialize(
|
||||
Tier.EmeraldChipset,
|
||||
actionRobotWorkInArea,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionRobotFilter.initialize(
|
||||
Tier.EmeraldChipset,
|
||||
actionRobotFilter,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionStationRequestItems.initialize(
|
||||
Tier.DiamondChipset,
|
||||
actionStationRequestItems,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionStationForbidRobot.initialize(
|
||||
Tier.EmeraldChipset,
|
||||
actionStationForbidRobot,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
|
||||
technoActionStationDropInPipe.initialize(
|
||||
Tier.DiamondChipset,
|
||||
actionStationDropInPipe,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoRobotics);
|
||||
}
|
||||
|
||||
public static void loadRecipes() {
|
||||
|
|
|
@ -52,8 +52,10 @@ import buildcraft.core.Version;
|
|||
import buildcraft.core.network.BuildCraftChannelHandler;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.science.TechnoSimpleItem;
|
||||
import buildcraft.core.science.TechnoStatement;
|
||||
import buildcraft.core.science.Tier;
|
||||
import buildcraft.core.triggers.ActionPipeClose;
|
||||
import buildcraft.silicon.ItemRedstoneChipset.Chipset;
|
||||
import buildcraft.transport.BlockFilteredBuffer;
|
||||
import buildcraft.transport.BlockGenericPipe;
|
||||
import buildcraft.transport.GuiHandler;
|
||||
|
@ -128,6 +130,9 @@ import buildcraft.transport.triggers.TriggerRedstoneFaderInput;
|
|||
@Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
public class BuildCraftTransport extends BuildCraftMod {
|
||||
|
||||
@Mod.Instance("BuildCraft|Transport")
|
||||
public static BuildCraftTransport instance;
|
||||
|
||||
public static BlockGenericPipe genericPipeBlock;
|
||||
public static float pipeDurability;
|
||||
public static Item pipeWaterproof;
|
||||
|
@ -223,8 +228,14 @@ public class BuildCraftTransport extends BuildCraftMod {
|
|||
public static TechnoSimpleItem technoPipePowerGold = new TechnoSimpleItem();
|
||||
public static TechnoSimpleItem technoPipePowerDiamond = new TechnoSimpleItem();
|
||||
|
||||
@Mod.Instance("BuildCraft|Transport")
|
||||
public static BuildCraftTransport instance;
|
||||
public static TechnoStatement technoTriggerPipe = new TechnoStatement();
|
||||
public static TechnoStatement technoTriggerPipeWireActive = new TechnoStatement();
|
||||
public static TechnoStatement technoActionPipeWire = new TechnoStatement();
|
||||
public static TechnoStatement technoActionPipeClose = new TechnoStatement();
|
||||
public static TechnoStatement technoActionPipeColor = new TechnoStatement();
|
||||
public static TechnoStatement technoActionPipeDirection = new TechnoStatement();
|
||||
public static TechnoStatement technoActionPowerLimiter = new TechnoStatement();
|
||||
public static TechnoStatement technoActionExtractionPresetRed = new TechnoStatement();
|
||||
|
||||
private static LinkedList<PipeRecipe> pipeRecipes = new LinkedList<PipeRecipe>();
|
||||
|
||||
|
@ -702,6 +713,65 @@ public class BuildCraftTransport extends BuildCraftMod {
|
|||
technoPipeItemsDiamond,
|
||||
technoPipePowerWood);
|
||||
|
||||
// Statements
|
||||
|
||||
technoTriggerPipe.initialize(
|
||||
Tier.Chipset,
|
||||
triggerPipe [0],
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
|
||||
technoTriggerPipeWireActive.initialize(
|
||||
Tier.Chipset,
|
||||
triggerPipeWireActive[0],
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
|
||||
technoActionPipeWire.initialize(
|
||||
Tier.Chipset,
|
||||
actionPipeWire[0],
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
|
||||
technoActionPipeClose.initialize(
|
||||
Tier.IronChipset,
|
||||
actionPipeClose,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
|
||||
technoActionPipeColor.initialize(
|
||||
Tier.Chipset,
|
||||
actionPipeColor[0],
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
|
||||
technoActionPipeDirection.initialize(
|
||||
Tier.Chipset,
|
||||
actionPipeDirection[0],
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon,
|
||||
BuildCraftTransport.technoPipeItemsIron);
|
||||
|
||||
technoActionPowerLimiter.initialize(
|
||||
Tier.Chipset,
|
||||
actionPowerLimiter[1],
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon,
|
||||
BuildCraftTransport.technoPipePowerIron);
|
||||
|
||||
technoActionExtractionPresetRed.initialize(
|
||||
Tier.Chipset,
|
||||
actionExtractionPresetRed,
|
||||
"",
|
||||
Chipset.RED.getStack(5),
|
||||
BuildCraftCore.technoSilicon);
|
||||
}
|
||||
|
||||
public void loadRecipes() {
|
||||
|
|
|
@ -66,6 +66,11 @@ public class GuiScienceBook extends GuiAdvancedInterface {
|
|||
return techno.getStackToDisplay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return techno.getLocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSprite(int cornerX, int cornerY) {
|
||||
super.drawSprite(cornerX, cornerY);
|
||||
|
@ -124,6 +129,18 @@ public class GuiScienceBook extends GuiAdvancedInterface {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
Technology t = getResearchedTechnology();
|
||||
|
||||
if (t != null) {
|
||||
return t.getLocalizedName();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Technology getResearchedTechnology() {
|
||||
return ((ContainerScienceBook) gui.getContainer()).book.getResearchedTechnology();
|
||||
}
|
||||
|
|
|
@ -57,7 +57,12 @@ public class TechnoField extends Technology {
|
|||
|
||||
@Override
|
||||
public String getLocalizedName() {
|
||||
return "";
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public static ItemStack toStack(Object obj) {
|
||||
|
@ -74,7 +79,7 @@ public class TechnoField extends Technology {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
|
||||
public void registerIcons(IIconRegister register) {
|
||||
icon = register.registerIcon(iconResource);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class TechnoSimpleItem extends Technology {
|
|||
|
||||
@Override
|
||||
public String getLocalizedName() {
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ItemStack toStack(Object obj) {
|
||||
|
|
61
common/buildcraft/core/science/TechnoStatement.java
Executable file
61
common/buildcraft/core/science/TechnoStatement.java
Executable file
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||
*/
|
||||
package buildcraft.core.science;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import buildcraft.api.gates.IStatement;
|
||||
|
||||
public class TechnoStatement extends Technology {
|
||||
|
||||
private IStatement statementToDisplay;
|
||||
private String unlocalizedName;
|
||||
|
||||
public void initialize(Tier iTier,
|
||||
IStatement statementToDisplay,
|
||||
String unlocalizedName,
|
||||
ItemStack requirement,
|
||||
Technology... iPrerequisites) {
|
||||
initialize(iTier, statementToDisplay, unlocalizedName, requirement, null, null, iPrerequisites);
|
||||
}
|
||||
|
||||
public void initialize(Tier iTier,
|
||||
IStatement statementToDisplay,
|
||||
String unlocalizedName,
|
||||
ItemStack requirement1,
|
||||
ItemStack requirement2,
|
||||
Technology... iPrerequisites) {
|
||||
initialize(iTier, statementToDisplay, unlocalizedName, requirement1, requirement2, null, iPrerequisites);
|
||||
}
|
||||
|
||||
public void initialize(Tier iTier,
|
||||
IStatement iStatementToDisplay,
|
||||
String unlocalizedName,
|
||||
ItemStack requirement1,
|
||||
ItemStack requirement2,
|
||||
ItemStack requirement3,
|
||||
Technology... iPrerequisites) {
|
||||
|
||||
super.initialize("statement:" + iStatementToDisplay.getUniqueTag(),
|
||||
iTier, requirement1, requirement2, requirement3, iPrerequisites);
|
||||
|
||||
statementToDisplay = iStatementToDisplay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon() {
|
||||
return statementToDisplay.getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocalizedName() {
|
||||
return unlocalizedName;
|
||||
}
|
||||
}
|
|
@ -66,6 +66,6 @@ public class TechnoTier extends Technology {
|
|||
|
||||
@Override
|
||||
public String getLocalizedName() {
|
||||
return "";
|
||||
return "Tier " + (technoTier.ordinal() + 1) + " (" + itemToDisplay.getDisplayName() + ")";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public abstract class Technology {
|
||||
|
||||
private static final HashMap<String, Technology> technologies = new HashMap<String, Technology>();
|
||||
public static final HashMap<String, Technology> technologies = new HashMap<String, Technology>();
|
||||
private static final LinkedList[] registry = new LinkedList[Tier.values().length];
|
||||
|
||||
protected ArrayList<Technology> followups = new ArrayList<Technology>();
|
||||
|
|
Loading…
Reference in a new issue