Moved transport related API into own subpackage.

This commit is contained in:
SirSengir 2012-07-25 12:00:15 +02:00
parent fbdefd5d5d
commit 4194aacfad
29 changed files with 70 additions and 58 deletions

View file

@ -13,9 +13,9 @@ import net.minecraft.src.Item;
import net.minecraft.src.ItemBlock;
import net.minecraft.src.ItemStack;
import net.minecraft.src.RenderBlocks;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.IPipe.WireColor;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.api.transport.IPipe.WireColor;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.Utils;
import net.minecraft.src.forge.MinecraftForgeClient;

View file

@ -14,11 +14,11 @@ import java.util.List;
import java.util.ListIterator;
import net.minecraft.src.buildcraft.api.BuildCraftAPI;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.gates.Action;
import net.minecraft.src.buildcraft.api.gates.ActionManager;
import net.minecraft.src.buildcraft.api.gates.Trigger;
import net.minecraft.src.buildcraft.api.recipes.AssemblyRecipe;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.core.CoreProxy;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.ItemBuildCraft;

View file

@ -4,7 +4,7 @@ import java.util.LinkedList;
import net.minecraft.src.Block;
import net.minecraft.src.TileEntity;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.transport.IPipe;
public class ActionManager {

View file

@ -13,7 +13,7 @@ import java.util.LinkedList;
import net.minecraft.src.Block;
import net.minecraft.src.TileEntity;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.transport.IPipe;
public interface ITriggerProvider {

View file

@ -7,7 +7,7 @@
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraft.src.buildcraft.api;
package net.minecraft.src.buildcraft.api.transport;
import net.minecraft.src.NBTTagCompound;

View file

@ -7,7 +7,7 @@
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraft.src.buildcraft.api;
package net.minecraft.src.buildcraft.api.transport;
import net.minecraft.src.TileEntity;

View file

@ -7,7 +7,9 @@
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraft.src.buildcraft.api;
package net.minecraft.src.buildcraft.api.transport;
import net.minecraft.src.buildcraft.api.Orientations;
public interface IPipeConnection {

View file

@ -7,9 +7,9 @@
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraft.src.buildcraft.api;
package net.minecraft.src.buildcraft.api.transport;
import net.minecraft.src.buildcraft.api.transport.IPipedItem;
import net.minecraft.src.buildcraft.api.Orientations;
/**
* Interface used to put objects into pipes, implemented by pipe tile entities.

View file

@ -1,17 +1,18 @@
/**
* 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
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraft.src.buildcraft.api;
public interface IPipeTile {
IPipe getPipe();
boolean isInitialized();
}
/**
* 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
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraft.src.buildcraft.api.transport;
public interface IPipeTile {
IPipe getPipe();
boolean isInitialized();
}

View file

@ -5,7 +5,6 @@ import net.minecraft.src.ItemStack;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.minecraft.src.buildcraft.api.IPassiveItemContribution;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.Position;
import net.minecraft.src.buildcraft.api.SafeTimeTracker;

View file

@ -0,0 +1,11 @@
package net.minecraft.src.buildcraft.api.transport;
import java.util.TreeMap;
import net.minecraft.src.buildcraft.core.EntityPassiveItem;
public class PipeManager {
public static TreeMap<Integer, EntityPassiveItem> allEntities = new TreeMap<Integer, EntityPassiveItem>();
}

View file

@ -11,7 +11,7 @@ import net.minecraft.src.buildcraft.api.gates.ITrigger;
import net.minecraft.src.buildcraft.api.gates.ITriggerProvider;
import net.minecraft.src.buildcraft.api.gates.Trigger;
import net.minecraft.src.buildcraft.api.liquids.ITankContainer;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.transport.IPipe;
public class DefaultTriggerProvider implements ITriggerProvider {

View file

@ -20,17 +20,16 @@ import net.minecraft.src.NBTTagList;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IPassiveItemContribution;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.Position;
import net.minecraft.src.buildcraft.api.SafeTimeTracker;
import net.minecraft.src.buildcraft.api.transport.IPassiveItemContribution;
import net.minecraft.src.buildcraft.api.transport.IPipedItem;
import net.minecraft.src.buildcraft.api.transport.PipeManager;
public class EntityPassiveItem implements IPipedItem {
private static TreeMap<String, IPassiveItemContribution> contributions = new TreeMap<String, IPassiveItemContribution>();
public static TreeMap<Integer, EntityPassiveItem> allEntities = new TreeMap<Integer, EntityPassiveItem>();
protected static int maxId = 0;
protected World worldObj;
@ -53,7 +52,7 @@ public class EntityPassiveItem implements IPipedItem {
public EntityPassiveItem(World world, int id) {
setEntityId(id);
allEntities.put(getEntityId(), this);
PipeManager.allEntities.put(getEntityId(), this);
worldObj = world;
}
@ -70,8 +69,8 @@ public class EntityPassiveItem implements IPipedItem {
/* CREATING & CACHING */
public static IPipedItem getOrCreate(World world, int id) {
if (allEntities.containsKey(id)) {
return allEntities.get(id);
if (PipeManager.allEntities.containsKey(id)) {
return PipeManager.allEntities.get(id);
} else {
return new EntityPassiveItem(world, id);
}
@ -82,8 +81,8 @@ public class EntityPassiveItem implements IPipedItem {
*/
@Override
public void remove() {
if (allEntities.containsKey(getEntityId())) {
allEntities.remove(getEntityId());
if (PipeManager.allEntities.containsKey(getEntityId())) {
PipeManager.allEntities.remove(getEntityId());
}
}

View file

@ -26,12 +26,12 @@ import net.minecraft.src.TileEntityChest;
import net.minecraft.src.World;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IAreaProvider;
import net.minecraft.src.buildcraft.api.IPipeConnection;
import net.minecraft.src.buildcraft.api.IPipeEntry;
import net.minecraft.src.buildcraft.api.LaserKind;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.Position;
import net.minecraft.src.buildcraft.api.liquids.ILiquid;
import net.minecraft.src.buildcraft.api.transport.IPipeConnection;
import net.minecraft.src.buildcraft.api.transport.IPipeEntry;
import net.minecraft.src.buildcraft.api.transport.IPipedItem;
import net.minecraft.src.buildcraft.core.network.ISynchronizedTile;
import net.minecraft.src.buildcraft.core.network.PacketUpdate;

View file

@ -20,7 +20,6 @@ import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.Packet;
import net.minecraft.src.TileEntity;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IPipeConnection;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.Position;
import net.minecraft.src.buildcraft.api.gates.IOverrideDefaultTriggers;
@ -34,6 +33,7 @@ import net.minecraft.src.buildcraft.api.power.IPowerProvider;
import net.minecraft.src.buildcraft.api.power.IPowerReceptor;
import net.minecraft.src.buildcraft.api.power.PowerFramework;
import net.minecraft.src.buildcraft.api.power.PowerProvider;
import net.minecraft.src.buildcraft.api.transport.IPipeConnection;
import net.minecraft.src.buildcraft.core.IBuilderInventory;
import net.minecraft.src.buildcraft.core.TileBuildCraft;
import net.minecraft.src.buildcraft.core.network.PacketUpdate;

View file

@ -12,9 +12,9 @@ import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList;
import net.minecraft.src.TileEntity;
import net.minecraft.src.mod_BuildCraftSilicon;
import net.minecraft.src.buildcraft.api.IPipeConnection;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.recipes.AssemblyRecipe;
import net.minecraft.src.buildcraft.api.transport.IPipeConnection;
import net.minecraft.src.buildcraft.core.CoreProxy;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.IMachine;

View file

@ -17,12 +17,12 @@ import net.minecraft.src.BuildCraftFactory;
import net.minecraft.src.EntityItem;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import net.minecraft.src.buildcraft.api.IPipeConnection;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.power.IPowerProvider;
import net.minecraft.src.buildcraft.api.power.IPowerReceptor;
import net.minecraft.src.buildcraft.api.power.PowerFramework;
import net.minecraft.src.buildcraft.api.power.PowerProvider;
import net.minecraft.src.buildcraft.api.transport.IPipeConnection;
import net.minecraft.src.buildcraft.core.IMachine;
import net.minecraft.src.buildcraft.core.StackUtil;
import net.minecraft.src.buildcraft.core.Utils;

View file

@ -23,13 +23,13 @@ import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.BuildCraftAPI;
import net.minecraft.src.buildcraft.api.IAreaProvider;
import net.minecraft.src.buildcraft.api.IPipeConnection;
import net.minecraft.src.buildcraft.api.LaserKind;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.power.IPowerProvider;
import net.minecraft.src.buildcraft.api.power.IPowerReceptor;
import net.minecraft.src.buildcraft.api.power.PowerFramework;
import net.minecraft.src.buildcraft.api.power.PowerProvider;
import net.minecraft.src.buildcraft.api.transport.IPipeConnection;
import net.minecraft.src.buildcraft.core.Box;
import net.minecraft.src.buildcraft.core.BptBlueprint;
import net.minecraft.src.buildcraft.core.BptBuilderBase;

View file

@ -9,8 +9,8 @@
package net.minecraft.src.buildcraft.transport;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.gates.Action;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.core.DefaultProps;
public class ActionSignalOutput extends Action {

View file

@ -27,8 +27,8 @@ import net.minecraft.src.TileEntity;
import net.minecraft.src.Vec3D;
import net.minecraft.src.World;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.tools.IToolWrench;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.core.BlockIndex;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.Utils;

View file

@ -10,12 +10,12 @@ import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.World;
import net.minecraft.src.mod_BuildCraftTransport;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.gates.Action;
import net.minecraft.src.buildcraft.api.gates.IAction;
import net.minecraft.src.buildcraft.api.gates.ITrigger;
import net.minecraft.src.buildcraft.api.gates.Trigger;
import net.minecraft.src.buildcraft.api.power.IPowerReceptor;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.GuiIds;
import net.minecraft.src.buildcraft.core.Utils;

View file

@ -24,7 +24,6 @@ import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.BuildCraftAPI;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.SafeTimeTracker;
import net.minecraft.src.buildcraft.api.gates.Action;
@ -35,6 +34,7 @@ import net.minecraft.src.buildcraft.api.gates.ITrigger;
import net.minecraft.src.buildcraft.api.gates.ITriggerParameter;
import net.minecraft.src.buildcraft.api.gates.Trigger;
import net.minecraft.src.buildcraft.api.gates.TriggerParameter;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.core.ActionRedstoneOutput;
import net.minecraft.src.buildcraft.core.IDropControlInventory;
import net.minecraft.src.buildcraft.core.Utils;

View file

@ -13,10 +13,10 @@ import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IInventory;
import net.minecraft.src.Item;
import net.minecraft.src.TileEntity;
import net.minecraft.src.buildcraft.api.IPipeEntry;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.liquids.ITankContainer;
import net.minecraft.src.buildcraft.api.tools.IToolWrench;
import net.minecraft.src.buildcraft.api.transport.IPipeEntry;
public class PipeLogicIron extends PipeLogic {

View file

@ -26,10 +26,10 @@ import net.minecraft.src.Packet;
import net.minecraft.src.TileEntity;
import net.minecraft.src.mod_BuildCraftTransport;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IPipeEntry;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.Position;
import net.minecraft.src.buildcraft.api.gates.ITrigger;
import net.minecraft.src.buildcraft.api.transport.IPipeEntry;
import net.minecraft.src.buildcraft.api.transport.IPipedItem;
import net.minecraft.src.buildcraft.core.CoreProxy;
import net.minecraft.src.buildcraft.core.DefaultProps;

View file

@ -15,7 +15,6 @@ import net.minecraft.src.TileEntity;
import net.minecraft.src.mod_BuildCraftCore;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.BuildCraftAPI;
import net.minecraft.src.buildcraft.api.IPipeEntry;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.SafeTimeTracker;
import net.minecraft.src.buildcraft.api.gates.ITrigger;
@ -23,6 +22,7 @@ import net.minecraft.src.buildcraft.api.liquids.ILiquidTank;
import net.minecraft.src.buildcraft.api.liquids.ITankContainer;
import net.minecraft.src.buildcraft.api.liquids.LiquidStack;
import net.minecraft.src.buildcraft.api.liquids.LiquidTank;
import net.minecraft.src.buildcraft.api.transport.IPipeEntry;
import net.minecraft.src.buildcraft.core.CoreProxy;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.IMachine;

View file

@ -5,11 +5,11 @@ import java.util.LinkedList;
import net.minecraft.src.Block;
import net.minecraft.src.BuildCraftTransport;
import net.minecraft.src.TileEntity;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.gates.IOverrideDefaultTriggers;
import net.minecraft.src.buildcraft.api.gates.ITrigger;
import net.minecraft.src.buildcraft.api.gates.ITriggerProvider;
import net.minecraft.src.buildcraft.api.gates.Trigger;
import net.minecraft.src.buildcraft.api.transport.IPipe;
public class PipeTriggerProvider implements ITriggerProvider {

View file

@ -20,11 +20,6 @@ import net.minecraft.src.Packet;
import net.minecraft.src.TileEntity;
import net.minecraft.src.mod_BuildCraftCore;
import net.minecraft.src.buildcraft.api.APIProxy;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.IPipe.WireColor;
import net.minecraft.src.buildcraft.api.IPipeConnection;
import net.minecraft.src.buildcraft.api.IPipeEntry;
import net.minecraft.src.buildcraft.api.IPipeTile;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.Position;
import net.minecraft.src.buildcraft.api.SafeTimeTracker;
@ -36,7 +31,12 @@ import net.minecraft.src.buildcraft.api.liquids.ITankContainer;
import net.minecraft.src.buildcraft.api.liquids.LiquidStack;
import net.minecraft.src.buildcraft.api.power.IPowerProvider;
import net.minecraft.src.buildcraft.api.power.IPowerReceptor;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.api.transport.IPipeConnection;
import net.minecraft.src.buildcraft.api.transport.IPipeEntry;
import net.minecraft.src.buildcraft.api.transport.IPipeTile;
import net.minecraft.src.buildcraft.api.transport.IPipedItem;
import net.minecraft.src.buildcraft.api.transport.IPipe.WireColor;
import net.minecraft.src.buildcraft.core.CoreProxy;
import net.minecraft.src.buildcraft.core.DefaultProps;
import net.minecraft.src.buildcraft.core.IDropControlInventory;

View file

@ -9,9 +9,9 @@
package net.minecraft.src.buildcraft.transport;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.gates.ITriggerParameter;
import net.minecraft.src.buildcraft.api.gates.Trigger;
import net.minecraft.src.buildcraft.api.transport.IPipe;
import net.minecraft.src.buildcraft.core.DefaultProps;
public class TriggerPipeSignal extends Trigger implements ITriggerPipe {

View file

@ -4,8 +4,8 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.src.buildcraft.api.IPipe;
import net.minecraft.src.buildcraft.api.Orientations;
import net.minecraft.src.buildcraft.api.transport.IPipe;
public class WireMatrix {