Merge branch 'master' into development
This commit is contained in:
commit
65ea389118
8 changed files with 25 additions and 9 deletions
src/main/java/mekanism
|
@ -22,7 +22,7 @@ public class ItemInfo
|
|||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return obj instanceof BlockInfo &&
|
||||
return obj instanceof ItemInfo &&
|
||||
((ItemInfo)obj).item == item &&
|
||||
((ItemInfo)obj).meta == meta;
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ public class ItemInfo
|
|||
public int hashCode()
|
||||
{
|
||||
int code = 1;
|
||||
code = 31 * code + item.getUnlocalizedName().hashCode();
|
||||
code = 31 * code + meta;
|
||||
code = 31 * code + System.identityHashCode(item);
|
||||
code = 7 * code + meta;
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ public class GasTank
|
|||
stored = GasStack.readFromNBT(nbtTags.getCompoundTag("stored"));
|
||||
}
|
||||
|
||||
if(nbtTags.hasKey("maxGas"))
|
||||
if(nbtTags.hasKey("maxGas") && nbtTags.getInteger("maxGas") != 0)
|
||||
{
|
||||
maxGas = nbtTags.getInteger("maxGas");
|
||||
}
|
||||
|
|
|
@ -234,6 +234,10 @@ public class CommonProxy
|
|||
Mekanism.TO_TE = Mekanism.TO_BC*10;
|
||||
Mekanism.FROM_TE = Mekanism.FROM_BC/10;
|
||||
|
||||
Mekanism.blacklistBC = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistBuildCraftPower", false).getBoolean();
|
||||
Mekanism.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean();
|
||||
Mekanism.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean();
|
||||
|
||||
if(Mekanism.cardboardSpawners)
|
||||
{
|
||||
MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0);
|
||||
|
|
|
@ -333,6 +333,10 @@ public class Mekanism
|
|||
public static double FROM_TE;
|
||||
public static double FROM_UE = 1/TO_UE;
|
||||
|
||||
public static boolean blacklistBC;
|
||||
public static boolean blacklistIC2;
|
||||
public static boolean blacklistRF;
|
||||
|
||||
//Usage Configuration
|
||||
public static double enrichmentChamberUsage;
|
||||
public static double osmiumCompressorUsage;
|
||||
|
|
|
@ -24,10 +24,11 @@ public final class OreDictCache
|
|||
}
|
||||
|
||||
ItemInfo info = ItemInfo.get(check);
|
||||
List<String> cached = cachedKeys.get(info);
|
||||
|
||||
if(cachedKeys.get(info) != null)
|
||||
if(cached != null)
|
||||
{
|
||||
return cachedKeys.get(info);
|
||||
return cached;
|
||||
}
|
||||
|
||||
int[] idsFound = OreDictionary.getOreIDs(check);
|
||||
|
|
|
@ -20,6 +20,7 @@ public class ItemElectricBow extends ItemEnergized
|
|||
public ItemElectricBow()
|
||||
{
|
||||
super(120000);
|
||||
this.setFull3D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1198,7 +1198,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static boolean useBuildCraft()
|
||||
{
|
||||
return Mekanism.hooks.BuildCraftPowerLoaded;
|
||||
return Mekanism.hooks.BuildCraftPowerLoaded && !Mekanism.blacklistBC;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1208,7 +1208,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static boolean useIC2()
|
||||
{
|
||||
return Mekanism.hooks.IC2Loaded;
|
||||
return Mekanism.hooks.IC2Loaded && !Mekanism.blacklistIC2;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1218,7 +1218,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static boolean useRF()
|
||||
{
|
||||
return Mekanism.hooks.RedstoneFluxLoaded;
|
||||
return Mekanism.hooks.RedstoneFluxLoaded && !Mekanism.blacklistRF;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@ import mekanism.api.transmitters.IGridTransmitter;
|
|||
import mekanism.api.transmitters.TransmissionType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
|
@ -74,6 +75,11 @@ public final class PipeUtils
|
|||
connectable[side] = true;
|
||||
}
|
||||
}
|
||||
else if(container.canDrain(ForgeDirection.getOrientation(side).getOpposite(), FluidRegistry.WATER)
|
||||
|| container.canFill(ForgeDirection.getOrientation(side).getOpposite(), FluidRegistry.WATER)) //I hesitate to pass null to these.
|
||||
{
|
||||
connectable[side] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue