Back to using a set version per mod
This commit is contained in:
parent
35f939fcef
commit
dcbec21d8b
2 changed files with 13 additions and 8 deletions
|
@ -38,7 +38,7 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
public final List<IFluidHandler> connectedTanks = new ArrayList<IFluidHandler>();
|
||||
|
||||
/** Collective storage of all fluid tiles */
|
||||
public FluidTank[] sharedTanks = new FluidTank[] { new FluidTank(FluidContainerRegistry.BUCKET_VOLUME) };
|
||||
protected FluidTank[] sharedTanks;
|
||||
/** Map of results of two different liquids merging */
|
||||
public static HashMap<Pair<Fluid, Fluid>, Object> mergeResult = new HashMap<Pair<Fluid, Fluid>, Object>();
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
/** Gets the collective tank of the network */
|
||||
public FluidTank combinedStorage()
|
||||
{
|
||||
if(this.sharedTanks == null)
|
||||
if (this.sharedTanks == null)
|
||||
{
|
||||
this.sharedTanks = new FluidTank[1];
|
||||
}
|
||||
|
@ -238,12 +238,12 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
}
|
||||
}
|
||||
}
|
||||
this.sharedTanks = new FluidTank[fluids.entrySet().size()];
|
||||
this.sharedTanks = new FluidTank[fluids.entrySet().size() > 0 ? fluids.entrySet().size() : 1];
|
||||
int i = 0;
|
||||
for (Entry<FluidStack, FluidStack> entry : fluids.entrySet())
|
||||
{
|
||||
|
||||
sharedTanks[i] = new FluidTank(tankSize.get(entry.getKey()));
|
||||
sharedTanks[i] = new FluidTank(tankSize.get(entry.getKey()) > 0 ? tankSize.get(entry.getKey()) : 1);
|
||||
sharedTanks[i].setFluid(entry.getValue());
|
||||
i++;
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
|
||||
this.readDataFromTiles();
|
||||
network.readDataFromTiles();
|
||||
Object result = this.canMergeFluids(this.combinedStorage().getFluid(), network.combinedStorage().getFluid());
|
||||
Object result = this.canMergeFluids(this.combinedStorage() == null ? null : this.combinedStorage().getFluid(), network.combinedStorage() == null ? null : network.combinedStorage().getFluid());
|
||||
if (mergePoint instanceof TileEntity)
|
||||
{
|
||||
World world = ((TileEntity) mergePoint).worldObj;
|
||||
|
@ -494,8 +494,8 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
protected void mergeDo(NetworkTileEntities network)
|
||||
{
|
||||
NetworkFluidTiles newNetwork = (NetworkFluidTiles) this.newInstance();
|
||||
FluidStack one = this.combinedStorage().getFluid();
|
||||
FluidStack two = ((NetworkFluidTiles) network).combinedStorage().getFluid();
|
||||
FluidStack one = this.combinedStorage() == null ? null : this.combinedStorage().getFluid();
|
||||
FluidStack two = ((NetworkFluidTiles) network).combinedStorage() == null ? null :((NetworkFluidTiles) network).combinedStorage().getFluid();
|
||||
|
||||
this.combinedStorage().setFluid(null);
|
||||
((NetworkFluidTiles) network).combinedStorage().setFluid(null);
|
||||
|
|
|
@ -56,11 +56,16 @@ import dark.mech.common.machines.BlockSteamPiston;
|
|||
import dark.mech.common.machines.TileEntitySteamPiston;
|
||||
|
||||
@ModstatInfo(prefix = "fluidmech")
|
||||
@Mod(modid = FluidMech.MOD_ID, name = FluidMech.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:DarkCore", useMetadata = true)
|
||||
@Mod(modid = FluidMech.MOD_ID, name = FluidMech.MOD_NAME, version = FluidMech.VERSION, dependencies = "after:DarkCore", useMetadata = true)
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class FluidMech extends ModPrefab
|
||||
{
|
||||
|
||||
public static final String MAJOR_VERSION = "@MAJOR@";
|
||||
public static final String MINOR_VERSION = "@MINOR@";
|
||||
public static final String REVIS_VERSION = "@REVIS@";
|
||||
public static final String BUILD_VERSION = "@BUILD@";
|
||||
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVIS_VERSION + "." + BUILD_VERSION;
|
||||
// @Mod
|
||||
public static final String MOD_ID = "FluidMech";
|
||||
public static final String MOD_NAME = "Fluid_Mechanics";
|
||||
|
|
Loading…
Reference in a new issue