Merge mc16 into Builder
This commit is contained in:
commit
efcdbeb8c5
333 changed files with 3337 additions and 3738 deletions
|
@ -18,8 +18,8 @@
|
|||
|
||||
<property name="mcpsrc.dir" value="${mcp.dir}/src"/>
|
||||
|
||||
<property name="mc.version" value="1.5.2"/>
|
||||
<property name="forge.version" value="7.8.0.686"/>
|
||||
<property name="mc.version" value="1.6.2"/>
|
||||
<property name="forge.version" value="9.10.0.790"/>
|
||||
<!-- <property name="project.version" value="0.0.0"/>-->
|
||||
|
||||
<property name="buildcraft.name" value="buildcraft"/>
|
||||
|
|
|
@ -34,7 +34,7 @@ item.diamondGearItem=Diamond Gear
|
|||
item.templateItem=Template
|
||||
item.wrenchItem=Wrench
|
||||
item.fuel=Fuel
|
||||
item.pipeWaterproof=Pipe Waterproof
|
||||
item.pipeWaterproof=Pipe Sealant
|
||||
item.pipeGate.0=Gate
|
||||
item.pipeGate.1=Iron AND Gate
|
||||
item.pipeGate.2=Iron OR Gate
|
||||
|
@ -68,24 +68,24 @@ item.PipeItemsGold=Golden Transport Pipe
|
|||
item.PipeItemsDiamond=Diamond Transport Pipe
|
||||
item.PipeItemsObsidian=Obsidian Transport Pipe
|
||||
item.PipeItemsEmerald=Emerald Transport Pipe
|
||||
item.PipeLiquidsWood=Wooden Waterproof Pipe
|
||||
item.PipeLiquidsCobblestone=Cobblestone Waterproof Pipe
|
||||
item.PipeLiquidsStone=Stone Waterproof Pipe
|
||||
item.PipeLiquidsIron=Iron Waterproof Pipe
|
||||
item.PipeLiquidsGold=Golden Waterproof Pipe
|
||||
item.PipeLiquidsEmerald=Emerald Waterproof Pipe
|
||||
item.PipePowerWood=Wooden Conductive Pipe
|
||||
item.PipePowerCobblestone=Cobblestone Conductive Pipe
|
||||
item.PipePowerStone=Stone Conductive Pipe
|
||||
item.PipePowerQuartz=Quartz Conductive Pipe
|
||||
item.PipePowerGold=Golden Conductive Pipe
|
||||
item.PipePowerDiamond=Diamond Conductive Pipe
|
||||
item.PipeLiquidsWood=Wooden Fluid Pipe
|
||||
item.PipeLiquidsCobblestone=Cobblestone Fluid Pipe
|
||||
item.PipeLiquidsStone=Stone Fluid Pipe
|
||||
item.PipeLiquidsIron=Iron Fluid Pipe
|
||||
item.PipeLiquidsGold=Golden Fluid Pipe
|
||||
item.PipeLiquidsEmerald=Emerald Fluid Pipe
|
||||
item.PipePowerWood=Wooden Kinesis Pipe
|
||||
item.PipePowerCobblestone=Cobblestone Kinesis Pipe
|
||||
item.PipePowerStone=Stone Kinesis Pipe
|
||||
item.PipePowerQuartz=Quartz Kinesis Pipe
|
||||
item.PipePowerGold=Golden Kinesis Pipe
|
||||
item.PipePowerDiamond=Diamond Kinesis Pipe
|
||||
item.PipeItemsStripes=Stripes Transport Pipe
|
||||
item.PipeStructureCobblestone=Cobblestone Structure Pipe
|
||||
item.PipeItemsVoid=Void Transport Pipe
|
||||
item.PipeLiquidsVoid=Void Waterproof Pipe
|
||||
item.PipeLiquidsVoid=Void Fluid Pipe
|
||||
item.PipeItemsSandstone=Sandstone Transport Pipe
|
||||
item.PipeLiquidsSandstone=Sandstone Waterproof Pipe
|
||||
item.PipeLiquidsSandstone=Sandstone Fluid Pipe
|
||||
item.Facade=Facade
|
||||
item.PipePlug=Pipe Plug
|
||||
tile.miningWellBlock=Mining Well
|
||||
|
|
|
@ -7,32 +7,17 @@
|
|||
*/
|
||||
package buildcraft;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.bptblocks.BptBlockBed;
|
||||
import buildcraft.api.bptblocks.BptBlockCustomStack;
|
||||
import buildcraft.api.bptblocks.BptBlockDelegate;
|
||||
import buildcraft.api.bptblocks.BptBlockDirt;
|
||||
import buildcraft.api.bptblocks.BptBlockDoor;
|
||||
import buildcraft.api.bptblocks.BptBlockFluid;
|
||||
import buildcraft.api.bptblocks.BptBlockIgnore;
|
||||
import buildcraft.api.bptblocks.BptBlockIgnoreMeta;
|
||||
import buildcraft.api.bptblocks.BptBlockInventory;
|
||||
import buildcraft.api.bptblocks.BptBlockLever;
|
||||
import buildcraft.api.bptblocks.BptBlockLiquid;
|
||||
import buildcraft.api.bptblocks.BptBlockPiston;
|
||||
import buildcraft.api.bptblocks.BptBlockPumpkin;
|
||||
import buildcraft.api.bptblocks.BptBlockRedstoneRepeater;
|
||||
|
@ -76,9 +61,8 @@ import buildcraft.core.blueprints.BptPlayerIndex;
|
|||
import buildcraft.core.blueprints.BptRootIndex;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
||||
|
@ -88,6 +72,19 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.TreeMap;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
@Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerBuilders.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
@ -112,7 +109,7 @@ public class BuildCraftBuilders {
|
|||
@Instance("BuildCraft|Builders")
|
||||
public static BuildCraftBuilders instance;
|
||||
|
||||
@Init
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent evt) {
|
||||
// Create filler registry
|
||||
FillerManager.registry = new FillerRegistry();
|
||||
|
@ -171,10 +168,10 @@ public class BuildCraftBuilders {
|
|||
new BptBlockRedstoneRepeater(Block.redstoneRepeaterActive.blockID);
|
||||
new BptBlockRedstoneRepeater(Block.redstoneRepeaterIdle.blockID);
|
||||
|
||||
new BptBlockLiquid(Block.waterStill.blockID, new ItemStack(Item.bucketWater));
|
||||
new BptBlockLiquid(Block.waterMoving.blockID, new ItemStack(Item.bucketWater));
|
||||
new BptBlockLiquid(Block.lavaStill.blockID, new ItemStack(Item.bucketLava));
|
||||
new BptBlockLiquid(Block.lavaMoving.blockID, new ItemStack(Item.bucketLava));
|
||||
new BptBlockFluid(Block.waterStill.blockID, new ItemStack(Item.bucketWater));
|
||||
new BptBlockFluid(Block.waterMoving.blockID, new ItemStack(Item.bucketWater));
|
||||
new BptBlockFluid(Block.lavaStill.blockID, new ItemStack(Item.bucketLava));
|
||||
new BptBlockFluid(Block.lavaMoving.blockID, new ItemStack(Item.bucketLava));
|
||||
|
||||
new BptBlockIgnoreMeta(Block.rail.blockID);
|
||||
new BptBlockIgnoreMeta(Block.railPowered.blockID);
|
||||
|
@ -217,7 +214,7 @@ public class BuildCraftBuilders {
|
|||
|
||||
}
|
||||
|
||||
@PreInit
|
||||
@EventHandler
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
Property templateItemId = BuildCraftCore.mainConfiguration.getItem("templateItem.id", DefaultProps.TEMPLATE_ITEM_ID);
|
||||
Property blueprintItemId = BuildCraftCore.mainConfiguration.getItem("blueprintItem.id", DefaultProps.BLUEPRINT_ITEM_ID);
|
||||
|
@ -312,12 +309,10 @@ public class BuildCraftBuilders {
|
|||
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'), new ItemStack(Item.dyePowder, 1, 11),
|
||||
Character.valueOf('c'), Block.workbench, Character.valueOf('g'), BuildCraftCore.goldGearItem, Character.valueOf('C'), Block.chest});
|
||||
|
||||
|
||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(builderBlock, 1), new Object[]{"btb", "ycy", "gCg", Character.valueOf('b'),
|
||||
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'), new ItemStack(Item.dyePowder, 1, 11),
|
||||
Character.valueOf('c'), Block.workbench, Character.valueOf('g'), BuildCraftCore.diamondGearItem, Character.valueOf('C'), Block.chest});
|
||||
|
||||
|
||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(architectBlock, 1), new Object[]{"btb", "ycy", "gCg", Character.valueOf('b'),
|
||||
new ItemStack(Item.dyePowder, 1, 0), Character.valueOf('t'), markerBlock, Character.valueOf('y'), new ItemStack(Item.dyePowder, 1, 11),
|
||||
Character.valueOf('c'), Block.workbench, Character.valueOf('g'), BuildCraftCore.diamondGearItem, Character.valueOf('C'),
|
||||
|
@ -326,6 +321,7 @@ public class BuildCraftBuilders {
|
|||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), new Object[]{"bbb", "bBb", "bbb", Character.valueOf('b'),
|
||||
new ItemStack(blueprintItem), Character.valueOf('B'), Block.bookShelf});
|
||||
|
||||
|
||||
// / INIT FILLER PATTERNS
|
||||
FillerManager.registry.addRecipe(new FillerFillAll(), new Object[]{"bbb", "bbb", "bbb", 'g', Block.glass, 'b', Block.brick});
|
||||
FillerManager.registry.addRecipe(new FillerFlattener(), new Object[]{"ggg", "bbb", "bbb", 'g', Block.glass, 'b', Block.brick});
|
||||
|
@ -386,7 +382,7 @@ public class BuildCraftBuilders {
|
|||
}
|
||||
}
|
||||
|
||||
@Mod.ServerStopping
|
||||
@EventHandler
|
||||
public void ServerStop(FMLServerStoppingEvent event) {
|
||||
TilePathMarker.clearAvailableMarkersList();
|
||||
}
|
||||
|
@ -394,7 +390,7 @@ public class BuildCraftBuilders {
|
|||
@ForgeSubscribe
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre evt) {
|
||||
if (evt.map == Minecraft.getMinecraft().renderEngine.textureMapBlocks) {
|
||||
if (evt.map.textureType == 0) {
|
||||
TextureMap terrainMap = evt.map;
|
||||
BuilderProxyClient.fillerFillAllTexture = terrainMap.registerIcon("buildcraft:fillerPatterns/fillAll");
|
||||
BuilderProxyClient.fillerClearTexture = terrainMap.registerIcon("buildcraft:fillerPatterns/clear");
|
||||
|
|
|
@ -8,27 +8,11 @@
|
|||
|
||||
package buildcraft;
|
||||
|
||||
import buildcraft.builders.blueprints.BlueprintDatabase;
|
||||
import java.io.File;
|
||||
import java.util.TreeMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFluid;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.api.gates.ActionManager;
|
||||
import buildcraft.builders.blueprints.BlueprintDatabase;
|
||||
import buildcraft.core.BlockIndex;
|
||||
import buildcraft.core.BlockSpring;
|
||||
import buildcraft.core.BuildCraftConfiguration;
|
||||
|
@ -57,18 +41,15 @@ import buildcraft.core.triggers.BCAction;
|
|||
import buildcraft.core.triggers.BCTrigger;
|
||||
import buildcraft.core.triggers.DefaultActionProvider;
|
||||
import buildcraft.core.triggers.DefaultTriggerProvider;
|
||||
import buildcraft.core.triggers.TriggerFluidContainer;
|
||||
import buildcraft.core.triggers.TriggerInventory;
|
||||
import buildcraft.core.triggers.TriggerLiquidContainer;
|
||||
import buildcraft.core.triggers.TriggerMachine;
|
||||
import buildcraft.core.utils.Localization;
|
||||
import buildcraft.transport.triggers.TriggerRedstoneInput;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.Mod.ServerStarting;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -80,6 +61,21 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
|
|||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.io.File;
|
||||
import java.util.TreeMap;
|
||||
import java.util.logging.Logger;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFluid;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
@Mod(name = "BuildCraft", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", dependencies = "required-after:Forge@[7.7.2.682,)")
|
||||
@NetworkMod(channels = { DefaultProps.NET_CHANNEL_NAME }, packetHandler = PacketHandler.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
@ -142,10 +138,10 @@ public class BuildCraftCore {
|
|||
public static BCTrigger triggerContainsInventory = new TriggerInventory(DefaultProps.TRIGGER_CONTAINS_INVENTORY, TriggerInventory.State.Contains);
|
||||
public static BCTrigger triggerSpaceInventory = new TriggerInventory(DefaultProps.TRIGGER_SPACE_INVENTORY, TriggerInventory.State.Space);
|
||||
public static BCTrigger triggerFullInventory = new TriggerInventory(DefaultProps.TRIGGER_FULL_INVENTORY, TriggerInventory.State.Full);
|
||||
public static BCTrigger triggerEmptyLiquid = new TriggerLiquidContainer(DefaultProps.TRIGGER_EMPTY_LIQUID, TriggerLiquidContainer.State.Empty);
|
||||
public static BCTrigger triggerContainsLiquid = new TriggerLiquidContainer(DefaultProps.TRIGGER_CONTAINS_LIQUID, TriggerLiquidContainer.State.Contains);
|
||||
public static BCTrigger triggerSpaceLiquid = new TriggerLiquidContainer(DefaultProps.TRIGGER_SPACE_LIQUID, TriggerLiquidContainer.State.Space);
|
||||
public static BCTrigger triggerFullLiquid = new TriggerLiquidContainer(DefaultProps.TRIGGER_FULL_LIQUID, TriggerLiquidContainer.State.Full);
|
||||
public static BCTrigger triggerEmptyFluid = new TriggerFluidContainer(DefaultProps.TRIGGER_EMPTY_LIQUID, TriggerFluidContainer.State.Empty);
|
||||
public static BCTrigger triggerContainsFluid = new TriggerFluidContainer(DefaultProps.TRIGGER_CONTAINS_LIQUID, TriggerFluidContainer.State.Contains);
|
||||
public static BCTrigger triggerSpaceFluid = new TriggerFluidContainer(DefaultProps.TRIGGER_SPACE_LIQUID, TriggerFluidContainer.State.Space);
|
||||
public static BCTrigger triggerFullFluid = new TriggerFluidContainer(DefaultProps.TRIGGER_FULL_LIQUID, TriggerFluidContainer.State.Full);
|
||||
public static BCTrigger triggerRedstoneActive = new TriggerRedstoneInput(DefaultProps.TRIGGER_REDSTONE_ACTIVE, true);
|
||||
public static BCTrigger triggerRedstoneInactive = new TriggerRedstoneInput(DefaultProps.TRIGGER_REDSTONE_INACTIVE, false);
|
||||
|
||||
|
@ -167,7 +163,7 @@ public class BuildCraftCore {
|
|||
@Instance("BuildCraft|Core")
|
||||
public static BuildCraftCore instance;
|
||||
|
||||
@PreInit
|
||||
@EventHandler
|
||||
public void loadConfiguration(FMLPreInitializationEvent evt) {
|
||||
|
||||
Version.check();
|
||||
|
@ -264,8 +260,8 @@ public class BuildCraftCore {
|
|||
}
|
||||
}
|
||||
|
||||
@Init
|
||||
public void initialize(FMLInitializationEvent evt) {
|
||||
@EventHandler
|
||||
public void initialize(FMLInitializationEvent evt) {
|
||||
// MinecraftForge.registerConnectionHandler(new ConnectionHandler());
|
||||
ActionManager.registerTriggerProvider(new DefaultTriggerProvider());
|
||||
ActionManager.registerActionProvider(new DefaultActionProvider());
|
||||
|
@ -294,7 +290,7 @@ public class BuildCraftCore {
|
|||
|
||||
}
|
||||
|
||||
@PostInit
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
for (Block block : Block.blocksList) {
|
||||
if (block instanceof BlockFluid || block instanceof IPlantable) {
|
||||
|
@ -309,19 +305,19 @@ public class BuildCraftCore {
|
|||
|
||||
}
|
||||
|
||||
@ServerStarting
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
@EventHandler
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
event.registerServerCommand(new CommandBuildCraft());
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void textureHook(TextureStitchEvent.Pre event){
|
||||
if (event.map == Minecraft.getMinecraft().renderEngine.textureMapItems) {
|
||||
if (event.map.textureType == 1) {
|
||||
iconProvider = new CoreIconProvider();
|
||||
iconProvider.registerIcons(event.map);
|
||||
actionTriggerIconProvider.registerIcons(event.map);
|
||||
} else if (event.map == Minecraft.getMinecraft().renderEngine.textureMapBlocks) {
|
||||
} else if (event.map.textureType == 0) {
|
||||
BuildCraftCore.redLaserTexture = event.map.registerIcon("buildcraft:blockRedLaser");
|
||||
BuildCraftCore.blueLaserTexture = event.map.registerIcon("buildcraft:blockBlueLaser");
|
||||
BuildCraftCore.stripesLaserTexture = event.map.registerIcon("buildcraft:blockStripesLaser");
|
||||
|
|
|
@ -7,56 +7,33 @@
|
|||
*/
|
||||
package buildcraft;
|
||||
|
||||
import java.util.TreeMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import buildcraft.api.fuels.IronEngineCoolant;
|
||||
import buildcraft.api.fuels.IronEngineFuel;
|
||||
import buildcraft.api.recipes.RefineryRecipe;
|
||||
import buildcraft.core.BlockIndex;
|
||||
import buildcraft.core.BlockSpring;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
import buildcraft.core.Version;
|
||||
import buildcraft.core.network.PacketHandler;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.triggers.BCTrigger;
|
||||
import buildcraft.energy.BlockBuildcraftFluid;
|
||||
import buildcraft.energy.BlockEngine;
|
||||
import buildcraft.energy.BlockOilFlowing;
|
||||
import buildcraft.energy.BlockOilStill;
|
||||
import buildcraft.energy.BptBlockEngine;
|
||||
import buildcraft.energy.EnergyProxy;
|
||||
import buildcraft.energy.GuiHandler;
|
||||
import buildcraft.energy.ItemBucketOil;
|
||||
import buildcraft.energy.ItemBucketBuildcraft;
|
||||
import buildcraft.energy.ItemEngine;
|
||||
import buildcraft.energy.OilBucketHandler;
|
||||
import buildcraft.energy.BucketHandler;
|
||||
import buildcraft.energy.TileEngine.EnergyStage;
|
||||
import buildcraft.energy.worldgen.BiomeGenOilDesert;
|
||||
import buildcraft.energy.worldgen.OilPopulate;
|
||||
import buildcraft.energy.TriggerEngineHeat;
|
||||
import buildcraft.energy.worldgen.BiomeGenOilDesert;
|
||||
import buildcraft.energy.worldgen.BiomeGenOilOcean;
|
||||
import buildcraft.energy.worldgen.BiomeInitializer;
|
||||
import buildcraft.energy.worldgen.OilPopulate;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
|
@ -66,6 +43,22 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.TreeMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
@Mod(name = "BuildCraft Energy", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Energy", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandler.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
@ -77,13 +70,15 @@ public class BuildCraftEnergy {
|
|||
public static BiomeGenOilDesert biomeOilDesert;
|
||||
public static BiomeGenOilOcean biomeOilOcean;
|
||||
public static BlockEngine engineBlock;
|
||||
public static Block oilMoving;
|
||||
public static Block oilStill;
|
||||
private static Fluid buildcraftFluidOil;
|
||||
private static Fluid buildcraftFluidFuel;
|
||||
public static Fluid fluidOil;
|
||||
public static Fluid fluidFuel;
|
||||
public static Block blockOil;
|
||||
public static Block blockFuel;
|
||||
public static Item bucketOil;
|
||||
public static Item bucketFuel;
|
||||
public static Item fuel;
|
||||
public static LiquidStack oilLiquid;
|
||||
public static LiquidStack fuelLiquid;
|
||||
public static boolean canOilBurn;
|
||||
public static TreeMap<BlockIndex, Integer> saturationStored = new TreeMap<BlockIndex, Integer>();
|
||||
public static BCTrigger triggerBlueEngineHeat = new TriggerEngineHeat(DefaultProps.TRIGGER_BLUE_ENGINE_HEAT, EnergyStage.BLUE);
|
||||
|
@ -93,16 +88,23 @@ public class BuildCraftEnergy {
|
|||
@Instance("BuildCraft|Energy")
|
||||
public static BuildCraftEnergy instance;
|
||||
|
||||
@PreInit
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent evt) {
|
||||
Property engineId = BuildCraftCore.mainConfiguration.getBlock("engine.id", DefaultProps.ENGINE_ID);
|
||||
Property oilStillId = BuildCraftCore.mainConfiguration.getBlock("oilStill.id", DefaultProps.OIL_STILL_ID);
|
||||
Property oilMovingId = BuildCraftCore.mainConfiguration.getBlock("oilMoving.id", DefaultProps.OIL_MOVING_ID);
|
||||
Property bucketOilId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "bucketOil.id", DefaultProps.BUCKET_OIL_ID);
|
||||
Property bucketFuelId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "bucketFuel.id", DefaultProps.BUCKET_FUEL_ID);
|
||||
Property itemFuelId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "fuel.id", DefaultProps.FUEL_ID);
|
||||
Property oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilDesert", 160);
|
||||
Property oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilOcean", 161);
|
||||
|
||||
// Update oil tag
|
||||
int defaultOilId = DefaultProps.OIL_ID;
|
||||
if (BuildCraftCore.mainConfiguration.hasKey(Configuration.CATEGORY_BLOCK, "oilStill.id")) {
|
||||
defaultOilId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "oilStill.id", defaultOilId).getInt(defaultOilId);
|
||||
BuildCraftCore.mainConfiguration.getCategory(Configuration.CATEGORY_BLOCK).remove("oilStill.id");
|
||||
}
|
||||
int blockOilId = BuildCraftCore.mainConfiguration.getBlock("oil.id", defaultOilId).getInt(defaultOilId);
|
||||
|
||||
int blockFuelId = BuildCraftCore.mainConfiguration.getBlock("fuel.id", DefaultProps.FUEL_ID).getInt(DefaultProps.FUEL_ID);
|
||||
int bucketOilId = BuildCraftCore.mainConfiguration.getItem("bucketOil.id", DefaultProps.BUCKET_OIL_ID).getInt(DefaultProps.BUCKET_OIL_ID);
|
||||
int bucketFuelId = BuildCraftCore.mainConfiguration.getItem("bucketFuel.id", DefaultProps.BUCKET_FUEL_ID).getInt(DefaultProps.BUCKET_FUEL_ID);
|
||||
int oilDesertBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilDesert", DefaultProps.BIOME_OIL_DESERT).getInt(DefaultProps.BIOME_OIL_DESERT);
|
||||
int oilOceanBiomeId = BuildCraftCore.mainConfiguration.get("biomes", "oilOcean", DefaultProps.BIOME_OIL_OCEAN).getInt(DefaultProps.BIOME_OIL_OCEAN);
|
||||
canOilBurn = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "burnOil", true, "Can oil burn?").getBoolean(true);
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
|
@ -113,20 +115,18 @@ public class BuildCraftEnergy {
|
|||
}
|
||||
}
|
||||
|
||||
int oilDesertId = oilDesertBiomeId.getInt();
|
||||
if (oilDesertId > 0) {
|
||||
if (BiomeGenBase.biomeList[oilDesertId] != null) {
|
||||
throw new BiomeIdException("oilDesert", oilDesertId);
|
||||
if (oilDesertBiomeId > 0) {
|
||||
if (BiomeGenBase.biomeList[oilDesertBiomeId] != null) {
|
||||
throw new BiomeIdException("oilDesert", oilDesertBiomeId);
|
||||
}
|
||||
biomeOilDesert = BiomeGenOilDesert.makeBiome(oilDesertId);
|
||||
biomeOilDesert = BiomeGenOilDesert.makeBiome(oilDesertBiomeId);
|
||||
}
|
||||
|
||||
int oilOceanId = oilOceanBiomeId.getInt();
|
||||
if (oilOceanId > 0) {
|
||||
if (BiomeGenBase.biomeList[oilOceanId] != null) {
|
||||
throw new BiomeIdException("oilOcean", oilOceanId);
|
||||
if (oilOceanBiomeId > 0) {
|
||||
if (BiomeGenBase.biomeList[oilOceanBiomeId] != null) {
|
||||
throw new BiomeIdException("oilOcean", oilOceanBiomeId);
|
||||
}
|
||||
biomeOilOcean = BiomeGenOilOcean.makeBiome(oilOceanId);
|
||||
biomeOilOcean = BiomeGenOilOcean.makeBiome(oilOceanBiomeId);
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,58 +137,79 @@ public class BuildCraftEnergy {
|
|||
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 1), "Steam Engine");
|
||||
LanguageRegistry.addName(new ItemStack(engineBlock, 1, 2), "Combustion Engine");
|
||||
|
||||
oilStill = (new BlockOilStill(oilStillId.getInt(DefaultProps.OIL_STILL_ID), Material.water)).setUnlocalizedName("oil");
|
||||
CoreProxy.proxy.addName(oilStill.setUnlocalizedName("oilStill"), "Oil");
|
||||
CoreProxy.proxy.registerBlock(oilStill);
|
||||
Property oilSpringsProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "oilSprings", true);
|
||||
spawnOilSprings = oilSpringsProp.getBoolean(true);
|
||||
BlockSpring.EnumSpring.OIL.canGen = spawnOilSprings;
|
||||
BlockSpring.EnumSpring.OIL.liquidBlock = oilStill;
|
||||
|
||||
oilMoving = (new BlockOilFlowing(oilMovingId.getInt(DefaultProps.OIL_MOVING_ID), Material.water)).setUnlocalizedName("oil");
|
||||
CoreProxy.proxy.addName(oilMoving.setUnlocalizedName("oilMoving"), "Oil");
|
||||
CoreProxy.proxy.registerBlock(oilMoving);
|
||||
|
||||
// Oil and fuel
|
||||
if (oilMoving.blockID + 1 != oilStill.blockID) {
|
||||
throw new RuntimeException("Oil Still id must be Oil Moving id + 1");
|
||||
buildcraftFluidOil = new Fluid("oil");
|
||||
FluidRegistry.registerFluid(buildcraftFluidOil);
|
||||
fluidOil = FluidRegistry.getFluid("oil");
|
||||
|
||||
buildcraftFluidFuel = new Fluid("fuel");
|
||||
FluidRegistry.registerFluid(buildcraftFluidFuel);
|
||||
fluidFuel = FluidRegistry.getFluid("fuel");
|
||||
|
||||
if (fluidOil.getBlockID() == -1) {
|
||||
if (blockOilId > 0) {
|
||||
blockOil = new BlockBuildcraftFluid(blockOilId, fluidOil, Material.water);
|
||||
blockOil.setUnlocalizedName("blockOil");
|
||||
CoreProxy.proxy.addName(blockOil, "Oil");
|
||||
CoreProxy.proxy.registerBlock(blockOil);
|
||||
fluidOil.setBlockID(blockOil);
|
||||
}
|
||||
} else {
|
||||
blockOil = Block.blocksList[fluidOil.getBlockID()];
|
||||
}
|
||||
|
||||
fuel = new ItemBuildCraft(itemFuelId.getInt(DefaultProps.FUEL_ID)).setUnlocalizedName("fuel");
|
||||
LanguageRegistry.addName(fuel, "Fuel");
|
||||
if (blockOil != null) {
|
||||
Property oilSpringsProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "oilSprings", true);
|
||||
spawnOilSprings = oilSpringsProp.getBoolean(true);
|
||||
BlockSpring.EnumSpring.OIL.canGen = spawnOilSprings;
|
||||
BlockSpring.EnumSpring.OIL.liquidBlock = blockOil;
|
||||
}
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new OilBucketHandler());
|
||||
if (fluidFuel.getBlockID() == -1) {
|
||||
if (blockFuelId > 0) {
|
||||
blockFuel = new BlockBuildcraftFluid(blockFuelId, fluidFuel, Material.water);
|
||||
blockFuel.setUnlocalizedName("blockFuel");
|
||||
CoreProxy.proxy.addName(blockFuel, "Fuel");
|
||||
CoreProxy.proxy.registerBlock(blockFuel);
|
||||
fluidFuel.setBlockID(blockFuel);
|
||||
}
|
||||
} else {
|
||||
blockFuel = Block.blocksList[fluidOil.getBlockID()];
|
||||
}
|
||||
|
||||
bucketOil = (new ItemBucketOil(bucketOilId.getInt(DefaultProps.BUCKET_OIL_ID))).setUnlocalizedName("bucketOil").setContainerItem(Item.bucketEmpty);
|
||||
LanguageRegistry.addName(bucketOil, "Oil Bucket");
|
||||
// Buckets
|
||||
MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
|
||||
|
||||
bucketFuel = new ItemBuildCraft(bucketFuelId.getInt()).setUnlocalizedName("bucketFuel").setContainerItem(Item.bucketEmpty);
|
||||
bucketFuel.setMaxStackSize(1);
|
||||
LanguageRegistry.addName(bucketFuel, "Fuel Bucket");
|
||||
if (blockOil != null && bucketOilId > 0) {
|
||||
bucketOil = new ItemBucketBuildcraft(bucketOilId, blockOil.blockID);
|
||||
bucketOil.setUnlocalizedName("bucketOil").setContainerItem(Item.bucketEmpty);
|
||||
LanguageRegistry.addName(bucketOil, "Oil Bucket");
|
||||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty));
|
||||
}
|
||||
|
||||
oilLiquid = LiquidDictionary.getOrCreateLiquid("Oil", new LiquidStack(oilStill, 1));
|
||||
fuelLiquid = LiquidDictionary.getOrCreateLiquid("Fuel", new LiquidStack(fuel, 1));
|
||||
if (blockFuel != null && bucketFuelId > 0) {
|
||||
bucketFuel = new ItemBucketBuildcraft(bucketFuelId, blockFuel.blockID);
|
||||
bucketFuel.setUnlocalizedName("bucketFuel").setContainerItem(Item.bucketEmpty);
|
||||
LanguageRegistry.addName(bucketFuel, "Fuel Bucket");
|
||||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty));
|
||||
}
|
||||
|
||||
RefineryRecipe.registerRefineryRecipe(new RefineryRecipe(LiquidDictionary.getLiquid("Oil", 1), null, LiquidDictionary.getLiquid("Fuel", 1), 12, 1));
|
||||
RefineryRecipe.registerRefineryRecipe(new RefineryRecipe(FluidRegistry.getFluid("oil"), null, FluidRegistry.getFluid("fuel"), 12, 1));
|
||||
|
||||
// Iron Engine Fuels
|
||||
IronEngineFuel.fuels.add(new IronEngineFuel(Block.lavaStill.blockID, 1, 20000));
|
||||
IronEngineFuel.fuels.add(new IronEngineFuel(LiquidDictionary.getLiquid("Oil", LiquidContainerRegistry.BUCKET_VOLUME), 3, 20000));
|
||||
IronEngineFuel.fuels.add(new IronEngineFuel(LiquidDictionary.getLiquid("Fuel", LiquidContainerRegistry.BUCKET_VOLUME), 6, 100000));
|
||||
IronEngineFuel.addFuel(FluidRegistry.getFluid("lava"), 1, 20000);
|
||||
IronEngineFuel.addFuel(FluidRegistry.getFluid("oil"), 3, 20000);
|
||||
IronEngineFuel.addFuel(FluidRegistry.getFluid("fuel"), 6, 100000);
|
||||
|
||||
// Iron Engine Coolants
|
||||
IronEngineCoolant.addCoolant(new LiquidStack(Block.waterStill, LiquidContainerRegistry.BUCKET_VOLUME), 0.0023F);
|
||||
IronEngineCoolant.addCoolant(Block.ice.blockID, 0, new LiquidStack(Block.waterStill, LiquidContainerRegistry.BUCKET_VOLUME * 2));
|
||||
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Oil", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(
|
||||
bucketOil), new ItemStack(Item.bucketEmpty)));
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Fuel", LiquidContainerRegistry.BUCKET_VOLUME),
|
||||
new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty)));
|
||||
IronEngineCoolant.addCoolant(FluidRegistry.getFluid("water"), 0.0023F);
|
||||
IronEngineCoolant.addCoolant(Block.ice.blockID, 0, FluidRegistry.getFluidStack("water", FluidContainerRegistry.BUCKET_VOLUME * 2));
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Init
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent evt) {
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
|
||||
|
||||
|
@ -201,7 +222,7 @@ public class BuildCraftEnergy {
|
|||
EnergyProxy.proxy.registerTileEntities();
|
||||
}
|
||||
|
||||
@PostInit
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent evt) {
|
||||
if (BuildCraftCore.modifyWorld) {
|
||||
MinecraftForge.EVENT_BUS.register(OilPopulate.INSTANCE);
|
||||
|
@ -212,10 +233,9 @@ public class BuildCraftEnergy {
|
|||
@ForgeSubscribe
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void textureHook(TextureStitchEvent.Post event) {
|
||||
if (event.map == Minecraft.getMinecraft().renderEngine.textureMapItems) {
|
||||
LiquidDictionary.getCanonicalLiquid("Fuel").setRenderingIcon(fuel.getIconFromDamage(0)).setTextureSheet("/gui/items.png");
|
||||
} else {
|
||||
LiquidDictionary.getCanonicalLiquid("Oil").setRenderingIcon(oilStill.getBlockTextureFromSide(1)).setTextureSheet("/terrain.png");
|
||||
if (event.map.textureType == 0) {
|
||||
buildcraftFluidOil.setIcons(blockOil.getBlockTextureFromSide(1));
|
||||
buildcraftFluidFuel.setIcons(blockFuel.getBlockTextureFromSide(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,21 +8,6 @@
|
|||
|
||||
package buildcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.Version;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
|
@ -51,14 +36,10 @@ import buildcraft.factory.TileQuarry;
|
|||
import buildcraft.factory.TileRefinery;
|
||||
import buildcraft.factory.TileTank;
|
||||
import buildcraft.factory.network.PacketHandlerFactory;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -66,6 +47,19 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
@Mod(name = "BuildCraft Factory", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Factory", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
@NetworkMod(channels = { DefaultProps.NET_CHANNEL_NAME }, packetHandler = PacketHandlerFactory.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
@ -83,13 +77,13 @@ public class BuildCraftFactory {
|
|||
public static boolean hopperDisabled;
|
||||
|
||||
public static boolean allowMining = true;
|
||||
|
||||
|
||||
public static PumpDimensionList pumpDimensionList;
|
||||
|
||||
@Instance("BuildCraft|Factory")
|
||||
public static BuildCraftFactory instance;
|
||||
|
||||
@PostInit
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent evt) {
|
||||
FactoryProxy.proxy.initializeNEIIntegration();
|
||||
ForgeChunkManager.setForcedChunkLoadingCallback(instance, new QuarryChunkloadCallback());
|
||||
|
@ -126,7 +120,7 @@ public class BuildCraftFactory {
|
|||
|
||||
}
|
||||
|
||||
@Init
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent evt) {
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
|
||||
|
||||
|
@ -155,10 +149,10 @@ public class BuildCraftFactory {
|
|||
}
|
||||
}
|
||||
|
||||
@PreInit
|
||||
@EventHandler
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
allowMining = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "mining.enabled", true).getBoolean(true);
|
||||
|
||||
|
||||
pumpDimensionList = new PumpDimensionList(BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pumping.controlList", DefaultProps.PUMP_DIMENSION_LIST).getString());
|
||||
|
||||
Property miningWellId = BuildCraftCore.mainConfiguration.getBlock("miningWell.id", DefaultProps.MINING_WELL_ID);
|
||||
|
@ -246,7 +240,7 @@ public class BuildCraftFactory {
|
|||
Character.valueOf('i'), Item.ingotIron,
|
||||
Character.valueOf('T'), tankBlock,
|
||||
Character.valueOf('g'), BuildCraftCore.ironGearItem,
|
||||
Character.valueOf('p'), BuildCraftTransport.pipeLiquidsGold });
|
||||
Character.valueOf('p'), BuildCraftTransport.pipeFluidsGold });
|
||||
}
|
||||
|
||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(autoWorkbenchBlock), new Object[] { " g ", "gwg", " g ", Character.valueOf('w'), Block.workbench,
|
||||
|
@ -271,7 +265,7 @@ public class BuildCraftFactory {
|
|||
@ForgeSubscribe
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre evt) {
|
||||
if (evt.map == Minecraft.getMinecraft().renderEngine.textureMapBlocks) {
|
||||
if (evt.map.textureType == 0) {
|
||||
TextureMap terrainTextures = evt.map;
|
||||
FactoryProxyClient.pumpTexture = terrainTextures.registerIcon("buildcraft:pump_tube");
|
||||
FactoryProxyClient.drillTexture = terrainTextures.registerIcon("buildcraft:blockDrillTexture");
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
package buildcraft;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Property;
|
||||
import buildcraft.api.bptblocks.BptBlockInventory;
|
||||
import buildcraft.api.bptblocks.BptBlockRotateMeta;
|
||||
import buildcraft.api.recipes.AssemblyRecipe;
|
||||
|
@ -19,8 +15,8 @@ import buildcraft.core.DefaultProps;
|
|||
import buildcraft.core.ItemRedstoneChipset;
|
||||
import buildcraft.core.Version;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.silicon.BlockLaserTable;
|
||||
import buildcraft.silicon.BlockLaser;
|
||||
import buildcraft.silicon.BlockLaserTable;
|
||||
import buildcraft.silicon.GuiHandler;
|
||||
import buildcraft.silicon.ItemLaserTable;
|
||||
import buildcraft.silicon.SiliconProxy;
|
||||
|
@ -36,8 +32,11 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
@Mod(name = "BuildCraft Silicon", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Silicon", dependencies = DefaultProps.DEPENDENCY_TRANSPORT)
|
||||
@NetworkMod(channels = { DefaultProps.NET_CHANNEL_NAME }, packetHandler = PacketHandlerSilicon.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
|
|
@ -7,16 +7,6 @@
|
|||
*/
|
||||
package buildcraft;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.api.gates.ActionManager;
|
||||
import buildcraft.api.recipes.AssemblyRecipe;
|
||||
|
@ -49,6 +39,14 @@ import buildcraft.transport.blueprints.BptItemPipeEmerald;
|
|||
import buildcraft.transport.blueprints.BptItemPipeIron;
|
||||
import buildcraft.transport.blueprints.BptItemPipeWooden;
|
||||
import buildcraft.transport.network.PacketHandlerTransport;
|
||||
import buildcraft.transport.pipes.PipeFluidsCobblestone;
|
||||
import buildcraft.transport.pipes.PipeFluidsEmerald;
|
||||
import buildcraft.transport.pipes.PipeFluidsGold;
|
||||
import buildcraft.transport.pipes.PipeFluidsIron;
|
||||
import buildcraft.transport.pipes.PipeFluidsSandstone;
|
||||
import buildcraft.transport.pipes.PipeFluidsStone;
|
||||
import buildcraft.transport.pipes.PipeFluidsVoid;
|
||||
import buildcraft.transport.pipes.PipeFluidsWood;
|
||||
import buildcraft.transport.pipes.PipeItemsCobblestone;
|
||||
import buildcraft.transport.pipes.PipeItemsDiamond;
|
||||
import buildcraft.transport.pipes.PipeItemsEmerald;
|
||||
|
@ -60,14 +58,6 @@ import buildcraft.transport.pipes.PipeItemsSandstone;
|
|||
import buildcraft.transport.pipes.PipeItemsStone;
|
||||
import buildcraft.transport.pipes.PipeItemsVoid;
|
||||
import buildcraft.transport.pipes.PipeItemsWood;
|
||||
import buildcraft.transport.pipes.PipeLiquidsCobblestone;
|
||||
import buildcraft.transport.pipes.PipeLiquidsEmerald;
|
||||
import buildcraft.transport.pipes.PipeLiquidsGold;
|
||||
import buildcraft.transport.pipes.PipeLiquidsIron;
|
||||
import buildcraft.transport.pipes.PipeLiquidsSandstone;
|
||||
import buildcraft.transport.pipes.PipeLiquidsStone;
|
||||
import buildcraft.transport.pipes.PipeLiquidsVoid;
|
||||
import buildcraft.transport.pipes.PipeLiquidsWood;
|
||||
import buildcraft.transport.pipes.PipePowerCobblestone;
|
||||
import buildcraft.transport.pipes.PipePowerDiamond;
|
||||
import buildcraft.transport.pipes.PipePowerGold;
|
||||
|
@ -82,11 +72,9 @@ import buildcraft.transport.triggers.TriggerFilteredBufferInventoryLevel;
|
|||
import buildcraft.transport.triggers.TriggerPipeContents;
|
||||
import buildcraft.transport.triggers.TriggerPipeContents.Kind;
|
||||
import buildcraft.transport.triggers.TriggerPipeSignal;
|
||||
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.IMCCallback;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
|
@ -102,13 +90,21 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import java.util.LinkedList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
@Mod(version = Version.VERSION, modid = "BuildCraft|Transport", name = "Buildcraft Transport", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandlerTransport.class)
|
||||
public class BuildCraftTransport {
|
||||
|
||||
public static BlockGenericPipe genericPipeBlock;
|
||||
public static int maxItemsInPipes;
|
||||
public static float pipeDurability;
|
||||
public static Item pipeWaterproof;
|
||||
public static Item pipeGate;
|
||||
|
@ -128,21 +124,21 @@ public class BuildCraftTransport {
|
|||
public static Item pipeItemsObsidian;
|
||||
public static Item pipeItemsVoid;
|
||||
public static Item pipeItemsSandstone;
|
||||
public static Item pipeLiquidsWood;
|
||||
public static Item pipeLiquidsCobblestone;
|
||||
public static Item pipeLiquidsStone;
|
||||
public static Item pipeLiquidsIron;
|
||||
public static Item pipeLiquidsGold;
|
||||
public static Item pipeLiquidsVoid;
|
||||
public static Item pipeLiquidsSandstone;
|
||||
public static Item pipeLiquidsEmerald;
|
||||
public static Item pipeFluidsWood;
|
||||
public static Item pipeFluidsCobblestone;
|
||||
public static Item pipeFluidsStone;
|
||||
public static Item pipeFluidsIron;
|
||||
public static Item pipeFluidsGold;
|
||||
public static Item pipeFluidsVoid;
|
||||
public static Item pipeFluidsSandstone;
|
||||
public static Item pipeFluidsEmerald;
|
||||
public static Item pipePowerWood;
|
||||
public static Item pipePowerCobblestone;
|
||||
public static Item pipePowerStone;
|
||||
public static Item pipePowerQuartz;
|
||||
public static Item pipePowerGold;
|
||||
public static Item pipePowerDiamond;
|
||||
public static Item facadeItem;
|
||||
public static ItemFacade facadeItem;
|
||||
public static Item plugItem;
|
||||
public static BlockFilteredBuffer filteredBufferBlock;
|
||||
// public static Item pipeItemsStipes;
|
||||
|
@ -150,7 +146,7 @@ public class BuildCraftTransport {
|
|||
public static int groupItemsTrigger;
|
||||
public static BCTrigger triggerPipeEmpty = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_EMPTY, Kind.Empty);
|
||||
public static BCTrigger triggerPipeItems = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_ITEMS, Kind.ContainsItems);
|
||||
public static BCTrigger triggerPipeLiquids = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_LIQUIDS, Kind.ContainsLiquids);
|
||||
public static BCTrigger triggerPipeFluids = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_LIQUIDS, Kind.ContainsFluids);
|
||||
public static BCTrigger triggerPipeContainsEnergy = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_CONTAINS_ENERGY, Kind.ContainsEnergy);
|
||||
public static BCTrigger triggerPipeRequestsEnergy = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_REQUESTS_ENERGY, Kind.RequestsEnergy);
|
||||
public static BCTrigger triggerPipeTooMuchEnergy = new TriggerPipeContents(DefaultProps.TRIGGER_PIPE_TOO_MUCH_ENERGY, Kind.TooMuchEnergy);
|
||||
|
@ -200,7 +196,7 @@ public class BuildCraftTransport {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractLiquids(Object extractor, World world, int i, int j, int k) {
|
||||
public boolean canExtractFluids(Object extractor, World world, int i, int j, int k) {
|
||||
return testStrings(liquids, world, i, j, k);
|
||||
}
|
||||
|
||||
|
@ -242,26 +238,20 @@ public class BuildCraftTransport {
|
|||
} else
|
||||
excludedItemBlocks = new String[0];
|
||||
|
||||
Property exclusionLiquidList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "woodenPipe.liquid.exclusion", new String[0]);
|
||||
Property exclusionFluidList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK, "woodenPipe.liquid.exclusion", new String[0]);
|
||||
|
||||
String[] excludedLiquidBlocks = exclusionLiquidList.getStringList();
|
||||
if (excludedLiquidBlocks != null) {
|
||||
for (int j = 0; j < excludedLiquidBlocks.length; ++j) {
|
||||
excludedLiquidBlocks[j] = excludedLiquidBlocks[j].trim();
|
||||
String[] excludedFluidBlocks = exclusionFluidList.getStringList();
|
||||
if (excludedFluidBlocks != null) {
|
||||
for (int j = 0; j < excludedFluidBlocks.length; ++j) {
|
||||
excludedFluidBlocks[j] = excludedFluidBlocks[j].trim();
|
||||
}
|
||||
} else
|
||||
excludedLiquidBlocks = new String[0];
|
||||
excludedFluidBlocks = new String[0];
|
||||
|
||||
PipeManager.registerExtractionHandler(new ExtractionHandler(excludedItemBlocks, excludedLiquidBlocks));
|
||||
|
||||
Property maxItemInPipesProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pipes.maxItems", 100);
|
||||
maxItemInPipesProp.comment = "pipes containing more than this amount of items will explode, not dropping any item";
|
||||
|
||||
maxItemsInPipes = maxItemInPipesProp.getInt();
|
||||
PipeManager.registerExtractionHandler(new ExtractionHandler(excludedItemBlocks, excludedFluidBlocks));
|
||||
|
||||
Property groupItemsTriggerProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pipes.groupItemsTrigger", 32);
|
||||
groupItemsTriggerProp.comment = "when reaching this amount of objects in a pipes, items will be automatically grouped";
|
||||
|
||||
groupItemsTrigger = groupItemsTriggerProp.getInt();
|
||||
|
||||
|
||||
|
@ -289,14 +279,14 @@ public class BuildCraftTransport {
|
|||
pipeItemsSandstone = buildPipe(DefaultProps.PIPE_ITEMS_SANDSTONE_ID, PipeItemsSandstone.class, "Sandstone Transport Pipe", Block.sandStone, Block.glass, Block.sandStone);
|
||||
pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", "dyeBlack", Block.glass, Item.redstone);
|
||||
|
||||
pipeLiquidsWood = buildPipe(DefaultProps.PIPE_LIQUIDS_WOOD_ID, PipeLiquidsWood.class, "Wooden Waterproof Pipe", pipeWaterproof, pipeItemsWood);
|
||||
pipeLiquidsCobblestone = buildPipe(DefaultProps.PIPE_LIQUIDS_COBBLESTONE_ID, PipeLiquidsCobblestone.class, "Cobblestone Waterproof Pipe", pipeWaterproof, pipeItemsCobblestone);
|
||||
pipeLiquidsStone = buildPipe(DefaultProps.PIPE_LIQUIDS_STONE_ID, PipeLiquidsStone.class, "Stone Waterproof Pipe", pipeWaterproof, pipeItemsStone);
|
||||
pipeLiquidsIron = buildPipe(DefaultProps.PIPE_LIQUIDS_IRON_ID, PipeLiquidsIron.class, "Iron Waterproof Pipe", pipeWaterproof, pipeItemsIron);
|
||||
pipeLiquidsGold = buildPipe(DefaultProps.PIPE_LIQUIDS_GOLD_ID, PipeLiquidsGold.class, "Golden Waterproof Pipe", pipeWaterproof, pipeItemsGold);
|
||||
pipeLiquidsEmerald = buildPipe(DefaultProps.PIPE_LIQUIDS_EMERALD_ID, PipeLiquidsEmerald.class, "Emerald Waterproof Pipe", pipeWaterproof, pipeItemsEmerald);
|
||||
pipeLiquidsSandstone = buildPipe(DefaultProps.PIPE_LIQUIDS_SANDSTONE_ID, PipeLiquidsSandstone.class, "Sandstone Waterproof Pipe", pipeWaterproof, pipeItemsSandstone);
|
||||
pipeLiquidsVoid = buildPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeLiquidsVoid.class, "Void Waterproof Pipe", pipeWaterproof, pipeItemsVoid);
|
||||
pipeFluidsWood = buildPipe(DefaultProps.PIPE_LIQUIDS_WOOD_ID, PipeFluidsWood.class, "Wooden Waterproof Pipe", pipeWaterproof, pipeItemsWood);
|
||||
pipeFluidsCobblestone = buildPipe(DefaultProps.PIPE_LIQUIDS_COBBLESTONE_ID, PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", pipeWaterproof, pipeItemsCobblestone);
|
||||
pipeFluidsStone = buildPipe(DefaultProps.PIPE_LIQUIDS_STONE_ID, PipeFluidsStone.class, "Stone Waterproof Pipe", pipeWaterproof, pipeItemsStone);
|
||||
pipeFluidsIron = buildPipe(DefaultProps.PIPE_LIQUIDS_IRON_ID, PipeFluidsIron.class, "Iron Waterproof Pipe", pipeWaterproof, pipeItemsIron);
|
||||
pipeFluidsGold = buildPipe(DefaultProps.PIPE_LIQUIDS_GOLD_ID, PipeFluidsGold.class, "Golden Waterproof Pipe", pipeWaterproof, pipeItemsGold);
|
||||
pipeFluidsEmerald = buildPipe(DefaultProps.PIPE_LIQUIDS_EMERALD_ID, PipeFluidsEmerald.class, "Emerald Waterproof Pipe", pipeWaterproof, pipeItemsEmerald);
|
||||
pipeFluidsSandstone = buildPipe(DefaultProps.PIPE_LIQUIDS_SANDSTONE_ID, PipeFluidsSandstone.class, "Sandstone Waterproof Pipe", pipeWaterproof, pipeItemsSandstone);
|
||||
pipeFluidsVoid = buildPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeFluidsVoid.class, "Void Waterproof Pipe", pipeWaterproof, pipeItemsVoid);
|
||||
|
||||
pipePowerWood = buildPipe(DefaultProps.PIPE_POWER_WOOD_ID, PipePowerWood.class, "Wooden Conductive Pipe", Item.redstone, pipeItemsWood);
|
||||
pipePowerCobblestone = buildPipe(DefaultProps.PIPE_POWER_COBBLESTONE_ID, PipePowerCobblestone.class, "Cobblestone Conductive Pipe", Item.redstone, pipeItemsCobblestone);
|
||||
|
@ -355,7 +345,7 @@ public class BuildCraftTransport {
|
|||
Property pipePlugId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_ITEM, "pipePlug.id", DefaultProps.PIPE_PLUG_ID);
|
||||
plugItem = new ItemPlug(pipePlugId.getInt());
|
||||
plugItem.setUnlocalizedName("pipePlug");
|
||||
|
||||
|
||||
Property filteredBufferId = BuildCraftCore.mainConfiguration.getBlock("filteredBuffer.id", DefaultProps.FILTERED_BUFFER);
|
||||
filteredBufferBlock = new BlockFilteredBuffer(filteredBufferId.getInt());
|
||||
CoreProxy.proxy.registerBlock(filteredBufferBlock.setUnlocalizedName("filteredBufferBlock"));
|
||||
|
@ -390,9 +380,9 @@ public class BuildCraftTransport {
|
|||
new BptBlockPipe(genericPipeBlock.blockID);
|
||||
|
||||
BuildCraftCore.itemBptProps[pipeItemsWood.itemID] = new BptItemPipeWooden();
|
||||
BuildCraftCore.itemBptProps[pipeLiquidsWood.itemID] = new BptItemPipeWooden();
|
||||
BuildCraftCore.itemBptProps[pipeFluidsWood.itemID] = new BptItemPipeWooden();
|
||||
BuildCraftCore.itemBptProps[pipeItemsIron.itemID] = new BptItemPipeIron();
|
||||
BuildCraftCore.itemBptProps[pipeLiquidsIron.itemID] = new BptItemPipeIron();
|
||||
BuildCraftCore.itemBptProps[pipeFluidsIron.itemID] = new BptItemPipeIron();
|
||||
BuildCraftCore.itemBptProps[pipeItemsDiamond.itemID] = new BptItemPipeDiamond();
|
||||
BuildCraftCore.itemBptProps[pipeItemsEmerald.itemID] = new BptItemPipeEmerald();
|
||||
|
||||
|
@ -429,6 +419,9 @@ public class BuildCraftTransport {
|
|||
new Object[] { "wdw", "wcw", "wpw", Character.valueOf('w'), "plankWood", Character.valueOf('d'),
|
||||
BuildCraftTransport.pipeItemsDiamond, Character.valueOf('c'), Block.chest, Character.valueOf('p'),
|
||||
Block.pistonBase });
|
||||
|
||||
//Facade turning helper
|
||||
GameRegistry.addRecipe(facadeItem.new FacadeRecipe());
|
||||
}
|
||||
|
||||
@IMCCallback
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package buildcraft.api.blueprints;
|
||||
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
|
||||
@Deprecated
|
||||
public class BlueprintManager {
|
||||
|
|
|
@ -9,15 +9,14 @@
|
|||
|
||||
package buildcraft.api.blueprints;
|
||||
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
|
||||
/**
|
||||
* This class allow to specify specific behavior for blocks stored in blueprints:
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
package buildcraft.api.blueprints;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
package buildcraft.api.blueprints;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
package buildcraft.api.blueprints;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.core.IBox;
|
||||
import buildcraft.api.core.Position;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* This interface provide contextual information when building or initializing blueprint slots.
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockBed extends BptBlock {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockCustomStack extends BptBlock {
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BlueprintManager;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockDelegate extends BptBlock {
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockDirt extends BptBlock {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockDoor extends BptBlock {
|
||||
|
|
|
@ -9,19 +9,18 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockLiquid extends BptBlock {
|
||||
public class BptBlockFluid extends BptBlock {
|
||||
|
||||
private final ItemStack bucketStack;
|
||||
|
||||
public BptBlockLiquid(int blockId, ItemStack bucketStack) {
|
||||
public BptBlockFluid(int blockId, ItemStack bucketStack) {
|
||||
super(blockId);
|
||||
|
||||
this.bucketStack = bucketStack;
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockIgnore extends BptBlock {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockIgnoreMeta extends BptBlock {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package buildcraft.api.bptblocks;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockInventory extends BptBlock {
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockLever extends BptBlockWallSide {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockPumpkin extends BptBlock {
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockRedstoneRepeater extends BptBlock {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package buildcraft.api.bptblocks;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockRotateInventory extends BptBlockRotateMeta {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockRotateMeta extends BptBlock {
|
||||
|
|
|
@ -9,15 +9,14 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BlockSignature;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockSign extends BptBlock {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockStairs extends BptBlock {
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
|
||||
package buildcraft.api.bptblocks;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptSlotInfo;
|
||||
import buildcraft.api.blueprints.IBptContext;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockWallSide extends BptBlock {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public interface IIconProvider {
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package buildcraft.api.filler;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public interface IFillerPattern {
|
||||
|
||||
|
|
|
@ -1,38 +1,29 @@
|
|||
package buildcraft.api.fuels;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public final class IronEngineCoolant {
|
||||
|
||||
public static Map<String, Coolant> liquidCoolants = new HashMap<String, Coolant>();
|
||||
public static Map<ItemData, LiquidStack> solidCoolants = new HashMap<ItemData, LiquidStack>();
|
||||
public static BiMap<String, Coolant> liquidCoolants = HashBiMap.create();
|
||||
public static Map<ItemData, FluidStack> solidCoolants = new HashMap<ItemData, FluidStack>();
|
||||
|
||||
public static LiquidStack getLiquidCoolant(ItemStack stack) {
|
||||
public static FluidStack getFluidCoolant(ItemStack stack) {
|
||||
return solidCoolants.get(new ItemData(stack.itemID, stack.getItemDamage()));
|
||||
}
|
||||
|
||||
public static Coolant getCoolant(ItemStack stack) {
|
||||
return getCoolant(getLiquidCoolant(stack));
|
||||
return getCoolant(getFluidCoolant(stack));
|
||||
}
|
||||
|
||||
public static Coolant getCoolant(LiquidStack liquid) {
|
||||
if (liquid == null)
|
||||
return null;
|
||||
if (liquid.itemID <= 0)
|
||||
return null;
|
||||
|
||||
String fluidId = LiquidDictionary.findLiquidName(liquid);
|
||||
if (fluidId != null) {
|
||||
return liquidCoolants.get(fluidId);
|
||||
}
|
||||
|
||||
return null;
|
||||
public static Coolant getCoolant(FluidStack liquid) {
|
||||
return liquid != null ? liquidCoolants.get(liquid.getFluid().getName()) : null;
|
||||
}
|
||||
|
||||
private IronEngineCoolant() {
|
||||
|
@ -43,10 +34,9 @@ public final class IronEngineCoolant {
|
|||
float getDegreesCoolingPerMB(float currentHeat);
|
||||
}
|
||||
|
||||
public static void addCoolant(final LiquidStack liquid, final float degreesCoolingPerMB) {
|
||||
String fluidId = LiquidDictionary.findLiquidName(liquid);
|
||||
if (fluidId != null) {
|
||||
liquidCoolants.put(fluidId, new Coolant() {
|
||||
public static void addCoolant(final Fluid liquid, final float degreesCoolingPerMB) {
|
||||
if (liquid != null) {
|
||||
liquidCoolants.put(liquid.getName(), new Coolant() {
|
||||
@Override
|
||||
public float getDegreesCoolingPerMB(float currentHeat) {
|
||||
return degreesCoolingPerMB;
|
||||
|
@ -55,8 +45,8 @@ public final class IronEngineCoolant {
|
|||
}
|
||||
}
|
||||
|
||||
public static void addCoolant(final int itemId, final int metadata, final LiquidStack coolant) {
|
||||
if (Item.itemsList[itemId] != null && coolant != null && coolant.amount > 0) {
|
||||
public static void addCoolant(final int itemId, final int metadata, final FluidStack coolant) {
|
||||
if (Item.itemsList[itemId] != null && coolant != null) {
|
||||
solidCoolants.put(new ItemData(itemId, metadata), coolant);
|
||||
}
|
||||
}
|
||||
|
@ -92,4 +82,9 @@ public final class IronEngineCoolant {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isCoolant(Fluid fluid)
|
||||
{
|
||||
return liquidCoolants.inverse().containsKey(fluid);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,47 +1,43 @@
|
|||
/**
|
||||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
*
|
||||
* 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.api.fuels;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import com.google.common.collect.Maps;
|
||||
import java.util.Map;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
public class IronEngineFuel {
|
||||
|
||||
public static LinkedList<IronEngineFuel> fuels = new LinkedList<IronEngineFuel>();
|
||||
public static Map<String, IronEngineFuel> fuels = Maps.newHashMap();
|
||||
|
||||
public static IronEngineFuel getFuelForLiquid(LiquidStack liquid) {
|
||||
if (liquid == null)
|
||||
return null;
|
||||
if (liquid.itemID <= 0)
|
||||
return null;
|
||||
|
||||
for (IronEngineFuel fuel : fuels)
|
||||
if (fuel.liquid.isLiquidEqual(liquid))
|
||||
return fuel;
|
||||
|
||||
return null;
|
||||
public static IronEngineFuel getFuelForFluid(Fluid liquid) {
|
||||
return liquid == null ? null : fuels.get(liquid.getName());
|
||||
}
|
||||
|
||||
public final LiquidStack liquid;
|
||||
public final Fluid liquid;
|
||||
public final float powerPerCycle;
|
||||
public final int totalBurningTime;
|
||||
|
||||
public IronEngineFuel(int liquidId, float powerPerCycle, int totalBurningTime) {
|
||||
this(new LiquidStack(liquidId, LiquidContainerRegistry.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime);
|
||||
public IronEngineFuel(String fluidName, float powerPerCycle, int totalBurningTime) {
|
||||
this(FluidRegistry.getFluid(fluidName), powerPerCycle, totalBurningTime);
|
||||
}
|
||||
|
||||
public IronEngineFuel(LiquidStack liquid, float powerPerCycle, int totalBurningTime) {
|
||||
public IronEngineFuel(Fluid liquid, float powerPerCycle, int totalBurningTime) {
|
||||
this.liquid = liquid;
|
||||
this.powerPerCycle = powerPerCycle;
|
||||
this.totalBurningTime = totalBurningTime;
|
||||
fuels.put(liquid.getName(), this);
|
||||
}
|
||||
|
||||
public static void addFuel(Fluid fluid, float powerPerCycle, int totalBurningTime) {
|
||||
new IronEngineFuel(fluid, powerPerCycle, totalBurningTime);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package buildcraft.api.gates;
|
||||
|
||||
import buildcraft.api.transport.IPipe;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import buildcraft.api.transport.IPipe;
|
||||
|
||||
public class ActionManager {
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
package buildcraft.api.gates;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package buildcraft.api.gates;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public interface ITrigger {
|
||||
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
|
||||
package buildcraft.api.gates;
|
||||
|
||||
import buildcraft.api.transport.IPipe;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import buildcraft.api.transport.IPipe;
|
||||
|
||||
public interface ITriggerProvider {
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
*/
|
||||
package buildcraft.api.power;
|
||||
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
|
||||
public final class PowerHandler {
|
||||
|
||||
|
@ -22,8 +22,9 @@ public final class PowerHandler {
|
|||
case MACHINE:
|
||||
case STORAGE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean eatsEngineExcess() {
|
||||
|
@ -31,8 +32,9 @@ public final class PowerHandler {
|
|||
case MACHINE:
|
||||
case STORAGE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package buildcraft.api.recipes;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AssemblyRecipe {
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
/**
|
||||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
*
|
||||
* 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.api.recipes;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ComparisonChain;
|
||||
import java.util.Collections;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class RefineryRecipe implements Comparable<RefineryRecipe> {
|
||||
|
||||
|
@ -29,7 +30,7 @@ public class RefineryRecipe implements Comparable<RefineryRecipe> {
|
|||
return Collections.unmodifiableSortedSet(recipes);
|
||||
}
|
||||
|
||||
public static RefineryRecipe findRefineryRecipe(LiquidStack liquid1, LiquidStack liquid2) {
|
||||
public static RefineryRecipe findRefineryRecipe(Fluid liquid1, Fluid liquid2) {
|
||||
for (RefineryRecipe recipe : recipes)
|
||||
if (recipe.matches(liquid1, liquid2))
|
||||
return recipe;
|
||||
|
@ -37,43 +38,22 @@ public class RefineryRecipe implements Comparable<RefineryRecipe> {
|
|||
return null;
|
||||
}
|
||||
|
||||
public final LiquidStack ingredient1;
|
||||
public final LiquidStack ingredient2;
|
||||
public final LiquidStack result;
|
||||
public final Fluid ingredient1;
|
||||
public final Fluid ingredient2;
|
||||
public final Fluid result;
|
||||
|
||||
public final int energy;
|
||||
public final int delay;
|
||||
|
||||
public RefineryRecipe(int ingredientId1, int ingredientQty1, int ingredientId2, int ingredientQty2, int resultId, int resultQty, int energy, int delay) {
|
||||
this(new LiquidStack(ingredientId1, ingredientQty1, 0), new LiquidStack(ingredientId2, ingredientQty2, 0), new LiquidStack(resultId, resultQty, 0),
|
||||
energy, delay);
|
||||
}
|
||||
|
||||
public RefineryRecipe(LiquidStack ingredient1, LiquidStack ingredient2, LiquidStack result, int energy, int delay) {
|
||||
|
||||
// Sort starting materials.
|
||||
if (ingredient1 != null && ingredient2 != null) {
|
||||
if ((ingredient1.itemID > ingredient2.itemID) || (ingredient1.itemID == ingredient2.itemID && ingredient1.itemMeta > ingredient2.itemMeta)) {
|
||||
this.ingredient1 = ingredient2;
|
||||
this.ingredient2 = ingredient1;
|
||||
} else {
|
||||
this.ingredient1 = ingredient1;
|
||||
this.ingredient2 = ingredient2;
|
||||
}
|
||||
} else if (ingredient2 != null) {
|
||||
this.ingredient1 = ingredient2;
|
||||
this.ingredient2 = ingredient1;
|
||||
} else {
|
||||
this.ingredient1 = ingredient1;
|
||||
this.ingredient2 = ingredient2;
|
||||
}
|
||||
|
||||
public RefineryRecipe(Fluid ingredient1, Fluid ingredient2, Fluid result, int energy, int delay) {
|
||||
this.ingredient1 = ingredient1;
|
||||
this.ingredient2 = ingredient2;
|
||||
this.result = result;
|
||||
this.energy = energy;
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
public boolean matches(LiquidStack liquid1, LiquidStack liquid2) {
|
||||
public boolean matches(Fluid liquid1, Fluid liquid2) {
|
||||
|
||||
// No inputs, return.
|
||||
if (liquid1 == null && liquid2 == null)
|
||||
|
@ -84,15 +64,14 @@ public class RefineryRecipe implements Comparable<RefineryRecipe> {
|
|||
return false;
|
||||
|
||||
if (ingredient1 != null) {
|
||||
|
||||
if (ingredient2 == null)
|
||||
return ingredient1.isLiquidEqual(liquid1) || ingredient1.isLiquidEqual(liquid2);
|
||||
return ingredient1.getName().equals(liquid1) || ingredient1.getName().equals(liquid2);
|
||||
else
|
||||
return (ingredient1.isLiquidEqual(liquid1) && ingredient2.isLiquidEqual(liquid2))
|
||||
|| (ingredient2.isLiquidEqual(liquid1) && ingredient1.isLiquidEqual(liquid2));
|
||||
return (ingredient1.getName().equals(liquid1) && ingredient2.getName().equals(liquid2))
|
||||
|| (ingredient2.getName().equals(liquid1) && ingredient1.getName().equals(liquid2));
|
||||
|
||||
} else if (ingredient2 != null)
|
||||
return ingredient2.isLiquidEqual(liquid1) || ingredient2.isLiquidEqual(liquid2);
|
||||
return ingredient2.getName().equals(liquid1) || ingredient2.getName().equals(liquid2);
|
||||
else
|
||||
return false;
|
||||
|
||||
|
@ -103,51 +82,23 @@ public class RefineryRecipe implements Comparable<RefineryRecipe> {
|
|||
// the failure of matching two-ingredient recipes which include that liquid.
|
||||
@Override
|
||||
public int compareTo(RefineryRecipe other) {
|
||||
|
||||
if (other == null)
|
||||
return -1;
|
||||
else if (ingredient1 == null) {
|
||||
if (other.ingredient1 == null)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
} else if (other.ingredient1 == null)
|
||||
return -1;
|
||||
else if (ingredient1.itemID != other.ingredient1.itemID)
|
||||
return ingredient1.itemID - other.ingredient1.itemID;
|
||||
else if (ingredient1.itemMeta != other.ingredient1.itemMeta)
|
||||
return ingredient1.itemMeta - other.ingredient1.itemMeta;
|
||||
else if (ingredient2 == null) {
|
||||
if (other.ingredient2 == null)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
} else if (other.ingredient2 == null)
|
||||
return -1;
|
||||
else if (ingredient2.itemID != other.ingredient2.itemID)
|
||||
return ingredient2.itemID - other.ingredient2.itemID;
|
||||
else if (ingredient2.itemMeta != other.ingredient2.itemMeta)
|
||||
return ingredient2.itemMeta - other.ingredient2.itemMeta;
|
||||
|
||||
return 0;
|
||||
return ComparisonChain.start()
|
||||
.compare(ingredient1.getName(), other.ingredient1.getName())
|
||||
.compare(ingredient2.getName(), other.ingredient2.getName())
|
||||
.result();
|
||||
}
|
||||
|
||||
// equals() should be consistent with compareTo().
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && obj instanceof RefineryRecipe)
|
||||
return this.compareTo((RefineryRecipe) obj) == 0;
|
||||
return false;
|
||||
return obj instanceof RefineryRecipe &&
|
||||
Objects.equal(ingredient1, ((RefineryRecipe)obj).ingredient1) &&
|
||||
Objects.equal(ingredient1, ((RefineryRecipe)obj).ingredient2);
|
||||
}
|
||||
|
||||
// hashCode() should be overridden because equals() was overridden.
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (ingredient1 == null)
|
||||
return 0;
|
||||
else if (ingredient2 == null)
|
||||
return ingredient1.itemID ^ ingredient1.itemMeta;
|
||||
|
||||
return ingredient1.itemID ^ ingredient1.itemMeta ^ ingredient2.itemID ^ ingredient2.itemMeta;
|
||||
return Objects.hashCode(ingredient1, ingredient2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package buildcraft.api.tools;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public interface IToolPipette {
|
||||
|
||||
|
@ -20,21 +20,21 @@ public interface IToolPipette {
|
|||
|
||||
/**
|
||||
* Fills the pipette with the given liquid stack.
|
||||
*
|
||||
*
|
||||
* @param pipette
|
||||
* @param liquid
|
||||
* @param doFill
|
||||
* @return Amount of liquid used in filling the pipette.
|
||||
*/
|
||||
int fill(ItemStack pipette, LiquidStack liquid, boolean doFill);
|
||||
int fill(ItemStack pipette, FluidStack liquid, boolean doFill);
|
||||
|
||||
/**
|
||||
* Drains liquid from the pipette
|
||||
*
|
||||
*
|
||||
* @param pipette
|
||||
* @param maxDrain
|
||||
* @param doDrain
|
||||
* @return Liquid stack representing the liquid and amount drained from the pipette.
|
||||
* @return Fluid stack representing the liquid and amount drained from the pipette.
|
||||
*/
|
||||
LiquidStack drain(ItemStack pipette, int maxDrain, boolean doDrain);
|
||||
FluidStack drain(ItemStack pipette, int maxDrain, boolean doDrain);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package buildcraft.api.transport;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,5 +17,5 @@ public interface IExtractionHandler {
|
|||
* Can this pipe extract liquids from the block located at these coordinates?
|
||||
* param extractor can be null
|
||||
*/
|
||||
boolean canExtractLiquids(Object extractor, World world, int i, int j, int k);
|
||||
boolean canExtractFluids(Object extractor, World world, int i, int j, int k);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package buildcraft.api.transport;
|
||||
|
||||
import buildcraft.api.core.Position;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.api.core.Position;
|
||||
|
||||
public interface IPipedItem {
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package buildcraft.api.transport;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class PipeManager {
|
||||
|
@ -27,9 +26,9 @@ public abstract class PipeManager {
|
|||
/**
|
||||
* param extractor can be null
|
||||
*/
|
||||
public static boolean canExtractLiquids(Object extractor, World world, int i, int j, int k) {
|
||||
public static boolean canExtractFluids(Object extractor, World world, int i, int j, int k) {
|
||||
for (IExtractionHandler handler : extractionHandlers)
|
||||
if (!handler.canExtractLiquids(extractor, world, i, j, k))
|
||||
if (!handler.canExtractFluids(extractor, world, i, j, k))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -9,20 +9,6 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
@ -31,6 +17,19 @@ import buildcraft.core.proxy.CoreProxy;
|
|||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class BlockArchitect extends BlockContainer {
|
||||
|
||||
|
@ -100,7 +99,7 @@ public class BlockArchitect extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, i, j, k, entityliving, stack);
|
||||
|
||||
ForgeDirection orientation = Utils.get2dOrientation(new Position(entityliving.posX, entityliving.posY, entityliving.posZ), new Position(i, j, k));
|
||||
|
|
|
@ -9,22 +9,21 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.core.GuiIds;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBlueprintLibrary extends BlockContainer {
|
||||
|
||||
|
@ -72,7 +71,7 @@ public class BlockBlueprintLibrary extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
if (CoreProxy.proxy.isSimulating(world) && entityliving instanceof EntityPlayer) {
|
||||
TileBlueprintLibrary tile = (TileBlueprintLibrary) world.getBlockTileEntity(i, j, k);
|
||||
tile.owner = ((EntityPlayer) entityliving).username;
|
||||
|
|
|
@ -9,19 +9,6 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
@ -31,6 +18,18 @@ import buildcraft.core.proxy.CoreProxy;
|
|||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class BlockBuilder extends BlockContainer {
|
||||
|
||||
|
@ -107,7 +106,7 @@ public class BlockBuilder extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving, ItemStack stack) {
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, i, j, k, entityliving, stack);
|
||||
ForgeDirection orientation = Utils.get2dOrientation(new Position(entityliving.posX, entityliving.posY, entityliving.posZ), new Position(i, j, k));
|
||||
|
||||
|
|
|
@ -9,8 +9,15 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.filler.IFillerPattern;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.GuiIds;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -20,14 +27,6 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.filler.IFillerPattern;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.GuiIds;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockFiller extends BlockContainer {
|
||||
|
||||
|
|
|
@ -7,8 +7,13 @@
|
|||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -18,14 +23,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import static net.minecraftforge.common.ForgeDirection.*;
|
||||
|
||||
public class BlockMarker extends BlockContainer {
|
||||
|
||||
|
|
|
@ -9,17 +9,16 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPathMarker extends BlockMarker {
|
||||
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
import buildcraft.api.blueprints.BptBlockUtils;
|
||||
|
@ -21,6 +17,9 @@ import buildcraft.api.blueprints.IBptContext;
|
|||
import buildcraft.api.core.LaserKind;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.core.Box;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@Deprecated
|
||||
public class BptBlockFiller extends BptBlock {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class BuilderProxyClient extends BuilderProxy {
|
||||
public static Icon fillerFillAllTexture;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.core.blueprints.BptPlayerIndex;
|
||||
import buildcraft.core.blueprints.BptRootIndex;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import java.io.IOException;
|
||||
|
||||
public class ClientBuilderHook implements IBuilderHook {
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
|
||||
public class EventHandlerBuilders {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerFillAll extends FillerPattern {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerFillPyramid extends FillerPattern {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerFillStairs extends FillerPattern {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerFillWalls extends FillerPattern {
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerFlattener extends FillerPattern {
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerHorizon extends FillerPattern {
|
||||
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.core.IBox;
|
||||
import buildcraft.api.filler.IFillerPattern;
|
||||
|
@ -18,6 +14,10 @@ import buildcraft.core.proxy.CoreProxy;
|
|||
import buildcraft.core.utils.BlockUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class FillerPattern implements IFillerPattern {
|
||||
|
||||
|
|
|
@ -9,15 +9,14 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import buildcraft.api.filler.IFillerPattern;
|
||||
import buildcraft.api.filler.IFillerRegistry;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.filler.IFillerPattern;
|
||||
import buildcraft.api.filler.IFillerRegistry;
|
||||
|
||||
public class FillerRegistry implements IFillerRegistry {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class FillerRemover extends FillerPattern {
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.builders.gui.ContainerBlueprintLibrary;
|
||||
import buildcraft.builders.gui.ContainerBuilder;
|
||||
import buildcraft.builders.gui.ContainerFiller;
|
||||
|
@ -13,6 +10,9 @@ import buildcraft.builders.gui.GuiFiller;
|
|||
import buildcraft.builders.gui.GuiTemplate;
|
||||
import buildcraft.core.GuiIds;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GuiHandler implements IGuiHandler {
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import buildcraft.core.blueprints.BptRootIndex;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface IBuilderHook {
|
||||
|
||||
|
|
|
@ -9,18 +9,17 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.core.CreativeTabBuildCraft;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
import buildcraft.core.blueprints.BptBase;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import java.util.List;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class ItemBptBase extends ItemBuildCraft {
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class ItemBptBluePrint extends ItemBptBase {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class ItemBptTemplate extends ItemBptBase {
|
||||
private Icon usedTemplate;
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
/**
|
||||
<<<<<<< HEAD
|
||||
* Copyright (c) SpaceToad, 2011 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
|
||||
=======
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* 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
|
||||
>>>>>>> mc16
|
||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import buildcraft.builders.blueprints.Blueprint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.core.IAreaProvider;
|
||||
import buildcraft.api.core.LaserKind;
|
||||
import buildcraft.builders.blueprints.Blueprint;
|
||||
import buildcraft.core.Box;
|
||||
import buildcraft.core.TileBuildCraft;
|
||||
import buildcraft.core.blueprints.BptBase;
|
||||
|
@ -27,6 +30,13 @@ import buildcraft.core.network.TileNetworkData;
|
|||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
|
||||
public class TileArchitect extends TileBuildCraft implements IInventory {
|
||||
|
||||
|
@ -240,7 +250,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.core.TileBuildCraft;
|
||||
import buildcraft.core.blueprints.BptBase;
|
||||
|
@ -14,6 +7,12 @@ import buildcraft.core.blueprints.BptPlayerIndex;
|
|||
import buildcraft.core.network.TileNetworkData;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
||||
public static final int COMMAND_NEXT = 1, COMMAND_PREV = 2, COMMAND_LOCK_UPDATE = 3, COMMAND_DELETE = 4;
|
||||
|
@ -227,9 +226,9 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7,17 +7,6 @@
|
|||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.core.LaserKind;
|
||||
import buildcraft.api.core.Position;
|
||||
|
@ -45,6 +34,16 @@ import buildcraft.core.network.PacketUpdate;
|
|||
import buildcraft.core.network.TileNetworkData;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IPowerReceptor, IMachine {
|
||||
|
||||
|
@ -221,7 +220,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
|
|||
EntityPowerLaser laser = new EntityPowerLaser(worldObj, new Position(previous.i + 0.5, previous.j + 0.5, previous.k + 0.5), new Position(
|
||||
b.i + 0.5, b.j + 0.5, b.k + 0.5));
|
||||
|
||||
laser.setTexture(DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_1.png");
|
||||
laser.setTexture(0);
|
||||
laser.show();
|
||||
worldObj.spawnEntityInWorld(laser);
|
||||
pathLasers.add(laser);
|
||||
|
@ -435,7 +434,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -585,7 +584,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean manageLiquids() {
|
||||
public boolean manageFluids() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
*/
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.api.core.IAreaProvider;
|
||||
import buildcraft.api.core.LaserKind;
|
||||
|
@ -32,7 +28,11 @@ import buildcraft.core.triggers.ActionMachineControl;
|
|||
import buildcraft.core.triggers.ActionMachineControl.Mode;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowerReceptor, IMachine, IActionReceptor {
|
||||
|
||||
|
@ -334,7 +334,7 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean manageLiquids() {
|
||||
public boolean manageFluids() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int slot, ItemStack stack) {
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if (slot < 9) {
|
||||
if (getStackInSlot(slot) != null)
|
||||
return false;
|
||||
|
@ -387,7 +387,7 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe
|
|||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack stack, int side) {
|
||||
return isStackValidForSlot(slot, stack);
|
||||
return isItemValidForSlot(slot, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.core.IAreaProvider;
|
||||
import buildcraft.api.core.LaserKind;
|
||||
|
@ -21,6 +19,8 @@ import buildcraft.core.network.PacketUpdate;
|
|||
import buildcraft.core.network.TileNetworkData;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileMarker extends TileBuildCraft implements IAreaProvider {
|
||||
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.core.BlockIndex;
|
||||
import buildcraft.core.DefaultProps;
|
||||
|
@ -15,6 +8,12 @@ import buildcraft.core.EntityPowerLaser;
|
|||
import buildcraft.core.network.PacketUpdate;
|
||||
import buildcraft.core.network.TileNetworkData;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.TreeSet;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TilePathMarker extends TileMarker {
|
||||
|
||||
|
@ -63,7 +62,7 @@ public class TilePathMarker extends TileMarker {
|
|||
pathMarker.yCoord + 0.5, pathMarker.zCoord + 0.5));
|
||||
laser.show();
|
||||
|
||||
laser.setTexture(DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_1.png");
|
||||
laser.setTexture(0);
|
||||
worldObj.spawnEntityInWorld(laser);
|
||||
|
||||
connect(pathMarker, laser);
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders.gui;
|
||||
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
|
||||
public class ContainerBlueprintLibrary extends BuildCraftContainer {
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
package buildcraft.builders.gui;
|
||||
|
||||
import buildcraft.builders.TileBuilder;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import buildcraft.builders.TileBuilder;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
|
||||
public class ContainerBuilder extends BuildCraftContainer {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders.gui;
|
||||
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import buildcraft.core.gui.slots.SlotLimited;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import buildcraft.core.gui.slots.SlotLimited;
|
||||
|
||||
public class ContainerFiller extends BuildCraftContainer {
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
package buildcraft.builders.gui;
|
||||
|
||||
import buildcraft.builders.TileArchitect;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import buildcraft.builders.TileArchitect;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
|
||||
public class ContainerTemplate extends BuildCraftContainer {
|
||||
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
* Copyright (c) SpaceToad, 2011 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
|
||||
* 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.builders.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.builders.network.PacketLibraryAction;
|
||||
|
@ -24,16 +17,18 @@ import buildcraft.core.network.PacketIds;
|
|||
import buildcraft.core.network.PacketPayload;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.StringUtils;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiBlueprintLibrary extends GuiBuildCraft {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/template_gui.png");
|
||||
EntityPlayer player;
|
||||
TileBlueprintLibrary library;
|
||||
|
||||
ContainerBlueprintLibrary container;
|
||||
|
||||
boolean computeInput;
|
||||
|
||||
BptPlayerIndex index;
|
||||
|
||||
public GuiBlueprintLibrary(EntityPlayer player, TileBlueprintLibrary library) {
|
||||
|
@ -47,7 +42,6 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
|
|||
|
||||
index = BuildCraftBuilders.getPlayerIndex(player.username);
|
||||
}
|
||||
|
||||
private GuiButton nextPageButton;
|
||||
private GuiButton prevPageButton;
|
||||
private GuiButton lockButton;
|
||||
|
@ -110,8 +104,8 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(DefaultProps.TEXTURE_PATH_GUI + "/library_rw.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_110577_a(TEXTURE);
|
||||
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
|
@ -164,7 +158,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
|
|||
if (ySlot >= 0 && ySlot <= 11) {
|
||||
if (ySlot < library.currentNames.length) {
|
||||
PacketPayload payload = new PacketPayload();
|
||||
payload.intPayload = new int[] { ySlot };
|
||||
payload.intPayload = new int[]{ySlot};
|
||||
PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_SELECT, library.xCoord, library.yCoord, library.zCoord);
|
||||
packet.actionId = ySlot;
|
||||
CoreProxy.proxy.sendToServer(packet.getPacket());
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
* Copyright (c) SpaceToad, 2011 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
|
||||
* 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.builders.gui;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import buildcraft.builders.TileBuilder;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.gui.GuiAdvancedInterface;
|
||||
import buildcraft.core.utils.StringUtils;
|
||||
import java.util.Collection;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiBuilder extends GuiAdvancedInterface {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/builder.png");
|
||||
private static final ResourceLocation BLUEPRINT_TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/builder_blueprint.png");
|
||||
IInventory playerInventory;
|
||||
TileBuilder builder;
|
||||
|
||||
|
@ -60,16 +58,16 @@ public class GuiBuilder extends GuiAdvancedInterface {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
int realXSize = 0;
|
||||
|
||||
if (builder.isBuildingBlueprint()) {
|
||||
mc.renderEngine.bindTexture(DefaultProps.TEXTURE_PATH_GUI + "/builder_blueprint.png");
|
||||
mc.renderEngine.func_110577_a(BLUEPRINT_TEXTURE);
|
||||
realXSize = 256;
|
||||
} else {
|
||||
mc.renderEngine.bindTexture(DefaultProps.TEXTURE_PATH_GUI + "/builder.png");
|
||||
mc.renderEngine.func_110577_a(TEXTURE);
|
||||
realXSize = 176;
|
||||
}
|
||||
|
||||
|
@ -96,6 +94,5 @@ public class GuiBuilder extends GuiAdvancedInterface {
|
|||
|
||||
drawBackgroundSlots();
|
||||
}
|
||||
|
||||
int inventoryRows = 6;
|
||||
}
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
* Copyright (c) SpaceToad, 2011 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
|
||||
* 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.builders.gui;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import buildcraft.builders.TileFiller;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.gui.GuiBuildCraft;
|
||||
import buildcraft.core.utils.StringUtils;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiFiller extends GuiBuildCraft {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/filler.png");
|
||||
private static final ResourceLocation BLOCK_TEXTURE = new ResourceLocation("/terrain.png");
|
||||
IInventory playerInventory;
|
||||
TileFiller filler;
|
||||
|
||||
|
@ -46,13 +45,13 @@ public class GuiFiller extends GuiBuildCraft {
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(DefaultProps.TEXTURE_PATH_GUI + "/filler.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_110577_a(TEXTURE);
|
||||
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
if (filler.currentPattern != null) {
|
||||
mc.renderEngine.bindTexture("/terrain.png");
|
||||
mc.renderEngine.func_110577_a(BLOCK_TEXTURE);
|
||||
drawTexturedModelRectFromIcon(guiLeft + patternSymbolX, guiTop + patternSymbolY, filler.currentPattern.getTexture(), 16, 16);
|
||||
}
|
||||
|
||||
|
@ -87,10 +86,8 @@ public class GuiFiller extends GuiBuildCraft {
|
|||
lastX = i;
|
||||
lastY = j;
|
||||
}
|
||||
|
||||
private int lastX = 0;
|
||||
private int lastY = 0;
|
||||
|
||||
public final int patternSymbolX = 125;
|
||||
public final int patternSymbolY = 34;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
* Copyright (c) SpaceToad, 2011 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
|
||||
* 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.builders.gui;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import buildcraft.builders.TileArchitect;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.gui.GuiBuildCraft;
|
||||
|
@ -23,12 +15,16 @@ import buildcraft.core.network.PacketPayload;
|
|||
import buildcraft.core.network.PacketUpdate;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.StringUtils;
|
||||
import java.util.Date;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiTemplate extends GuiBuildCraft {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/template_gui.png");
|
||||
IInventory playerInventory;
|
||||
TileArchitect template;
|
||||
|
||||
boolean editMode = false;
|
||||
|
||||
public GuiTemplate(IInventory playerInventory, TileArchitect template) {
|
||||
|
@ -54,8 +50,8 @@ public class GuiTemplate extends GuiBuildCraft {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(DefaultProps.TEXTURE_PATH_GUI + "/template_gui.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.func_110577_a(TEXTURE);
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
|
@ -88,7 +84,7 @@ public class GuiTemplate extends GuiBuildCraft {
|
|||
return;
|
||||
}
|
||||
PacketPayload payload = new PacketPayload();
|
||||
payload.intPayload = new int[] { c };
|
||||
payload.intPayload = new int[]{c};
|
||||
PacketUpdate packet = new PacketUpdate(PacketIds.ARCHITECT_NAME, template.xCoord, template.yCoord, template.zCoord, payload);
|
||||
CoreProxy.proxy.sendToServer(packet.getPacket());
|
||||
} else {
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
package buildcraft.builders.network;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import buildcraft.builders.TileArchitect;
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.core.network.PacketIds;
|
||||
import buildcraft.core.network.PacketUpdate;
|
||||
import cpw.mods.fml.common.network.IPacketHandler;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class PacketHandlerBuilders implements IPacketHandler {
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package buildcraft.builders.network;
|
||||
|
||||
import buildcraft.core.network.PacketCoordinates;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import buildcraft.core.network.PacketCoordinates;
|
||||
|
||||
public class PacketLibraryAction extends PacketCoordinates {
|
||||
|
||||
public int actionId;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import buildcraft.core.utils.Utils;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.core.utils.Utils;
|
||||
|
||||
public abstract class BlockBuildCraft extends BlockContainer {
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSpring extends Block {
|
||||
|
||||
|
|
|
@ -9,11 +9,6 @@
|
|||
|
||||
package buildcraft.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.core.IAreaProvider;
|
||||
import buildcraft.api.core.IBox;
|
||||
import buildcraft.api.core.LaserKind;
|
||||
|
@ -21,6 +16,10 @@ import buildcraft.api.core.Position;
|
|||
import buildcraft.core.network.TileNetworkData;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Box implements IBox {
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.WrongUsageException;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
|
||||
public class CommandBuildCraft extends CommandBase {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class CoreIconProvider implements IIconProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.BuildCraftCore;
|
||||
|
||||
public class CreativeTabBuildCraft extends CreativeTabs {
|
||||
|
||||
|
|
|
@ -25,11 +25,6 @@ public class DefaultProps {
|
|||
public static String TEXTURE_PATH_BLOCKS = "/gfx/buildcraft/blocks";
|
||||
public static String TEXTURE_PATH_ENTITIES = "/gfx/buildcraft/entities";
|
||||
|
||||
public static String TEXTURE_BLOCKS = TEXTURE_PATH_BLOCKS + "/blocks.png";
|
||||
public static String TEXTURE_ITEMS = "/gfx/buildcraft/items/items.png";
|
||||
public static String TEXTURE_ICONS = TEXTURE_PATH_GUI + "/icons.png";
|
||||
public static String TEXTURE_TRIGGERS = TEXTURE_PATH_GUI + "/triggers.png";
|
||||
|
||||
public static final String DEFAULT_LANGUAGE = "en_US";
|
||||
|
||||
public static String PUMP_DIMENSION_LIST = "+/*/*,+/-1/Lava";
|
||||
|
@ -42,7 +37,6 @@ public class DefaultProps {
|
|||
public static int TEMPLATE_ITEM_ID = 19105;
|
||||
public static int WRENCH_ID = 19106;
|
||||
public static int BUCKET_OIL_ID = 19107;
|
||||
public static int FUEL_ID = 19108;
|
||||
public static int PIPE_WATERPROOF_ID = 19109;
|
||||
public static int BUCKET_FUEL_ID = 19110;
|
||||
public static int GATE_ID = 19111;
|
||||
|
@ -113,15 +107,16 @@ public class DefaultProps {
|
|||
public static int ASSEMBLY_TABLE_ID = 1517;
|
||||
public static int PATH_MARKER_ID = 1518;
|
||||
public static int HOPPER_ID = 1519;
|
||||
public static int OIL_MOVING_ID = 1520;
|
||||
public static int OIL_STILL_ID = 1521;
|
||||
public static int SPRING_ID = 1522;
|
||||
public static int FILTERED_BUFFER = 1523;
|
||||
|
||||
public static int OIL_ID = 1530;
|
||||
public static int FUEL_ID = 1531;
|
||||
|
||||
public static boolean CURRENT_CONTINUOUS = false;
|
||||
public static double PIPES_DURABILITY = 0.25D;
|
||||
public static boolean FILLER_DESTROY = false;
|
||||
|
||||
|
||||
public static final int FILLER_LIFESPAN_TOUGH = 20;
|
||||
public static final int FILLER_LIFESPAN_NORMAL = 6000;
|
||||
|
||||
|
@ -170,4 +165,6 @@ public class DefaultProps {
|
|||
public static int ACTION_ENERGY_PULSER = 9;
|
||||
public static int ACTION_SINGLE_ENERGY_PULSE = 10;
|
||||
|
||||
public static int BIOME_OIL_OCEAN = 160;
|
||||
public static int BIOME_OIL_DESERT = 161;
|
||||
}
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntityBlock extends Entity {
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
* Copyright (c) SpaceToad, 2011 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
|
||||
* 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;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.core.Position;
|
||||
import static buildcraft.core.EntityLaser.LASER_TEXTURES;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityEnergyLaser extends EntityLaser {
|
||||
|
||||
public static final short POWER_AVERAGING = 100;
|
||||
public int displayStage = 0;
|
||||
|
||||
private final float power[] = new float[POWER_AVERAGING];
|
||||
private int powerIndex = 0;
|
||||
private float powerAverage = 0;
|
||||
|
@ -46,16 +45,15 @@ public class EntityEnergyLaser extends EntityLaser {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTexture() {
|
||||
|
||||
public ResourceLocation getTexture() {
|
||||
if (getPowerAverage() <= 1.0)
|
||||
return DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_1.png";
|
||||
return LASER_TEXTURES[0];
|
||||
else if (getPowerAverage() <= 2.0)
|
||||
return DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_2.png";
|
||||
return LASER_TEXTURES[1];
|
||||
else if (getPowerAverage() <= 3.0)
|
||||
return DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_3.png";
|
||||
return LASER_TEXTURES[2];
|
||||
else
|
||||
return DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_4.png";
|
||||
return LASER_TEXTURES[3];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,14 +7,20 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityLaser extends Entity {
|
||||
|
||||
public static final ResourceLocation[] LASER_TEXTURES = new ResourceLocation[]{
|
||||
new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_1.png"),
|
||||
new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_2.png"),
|
||||
new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_3.png"),
|
||||
new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_ENTITIES + "/laser_4.png")};
|
||||
protected Position head, tail;
|
||||
public double renderSize = 0;
|
||||
public double angleY = 0;
|
||||
|
@ -142,7 +148,7 @@ public abstract class EntityLaser extends Entity {
|
|||
return this.isVisible;
|
||||
}
|
||||
|
||||
public abstract String getTexture();
|
||||
public abstract ResourceLocation getTexture();
|
||||
|
||||
protected int encodeDouble(double d) {
|
||||
return (int) (d * 8192);
|
||||
|
|
|
@ -9,8 +9,12 @@
|
|||
|
||||
package buildcraft.core;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.transport.IPassiveItemContribution;
|
||||
import buildcraft.api.transport.IPipedItem;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -20,11 +24,6 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.transport.IPassiveItemContribution;
|
||||
import buildcraft.api.transport.IPipedItem;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
|
||||
public class EntityPassiveItem implements IPipedItem {
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.core.Position;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityPowerLaser extends EntityLaser {
|
||||
private String texture;
|
||||
|
||||
private byte texture;
|
||||
|
||||
public EntityPowerLaser(World world) {
|
||||
super(world);
|
||||
|
@ -17,23 +19,23 @@ public class EntityPowerLaser extends EntityLaser {
|
|||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
dataWatcher.addObject(15, "");
|
||||
dataWatcher.addObject(15, (byte) 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTexture() {
|
||||
return texture;
|
||||
public ResourceLocation getTexture() {
|
||||
return LASER_TEXTURES[texture];
|
||||
}
|
||||
|
||||
public void setTexture(String texture) {
|
||||
this.texture = texture;
|
||||
public void setTexture(int texture) {
|
||||
this.texture = (byte) texture;
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateDataClient() {
|
||||
super.updateDataClient();
|
||||
texture = dataWatcher.getWatchableObjectString(15);
|
||||
texture = dataWatcher.getWatchableObjectByte(15);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,23 +7,20 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.builders.blueprints.BlueprintBuilder.SchematicBuilder;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.core.utils.BlockUtil;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityRobot extends Entity implements IEntityAdditionalSpawnData {
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue