Merge branch '6.0.x' into 6.1.x
Conflicts: common/buildcraft/transport/render/FacadeItemRenderer.java
This commit is contained in:
commit
4eb19a49b5
3 changed files with 26 additions and 12 deletions
|
@ -166,19 +166,27 @@ public class BlueprintDatabase {
|
|||
for (File blueprintFile : directory.listFiles(filter)) {
|
||||
String fileName = blueprintFile.getName();
|
||||
|
||||
int cutIndex = fileName.lastIndexOf(BuildCraftBuilders.BPT_SEP_CHARACTER);
|
||||
|
||||
String prefix = fileName.substring(0, cutIndex);
|
||||
String suffix = fileName.substring(cutIndex + 1);
|
||||
|
||||
BlueprintId id = new BlueprintId();
|
||||
id.name = prefix;
|
||||
|
||||
if (suffix.contains(BPT_EXTENSION)) {
|
||||
id.uniqueId = BlueprintId.toBytes(suffix.replaceAll(BPT_EXTENSION, ""));
|
||||
int sepIndex = fileName.lastIndexOf(BuildCraftBuilders.BPT_SEP_CHARACTER);
|
||||
int dotIndex = fileName.lastIndexOf('.');
|
||||
|
||||
String extension = fileName.substring(dotIndex);
|
||||
|
||||
if (sepIndex > 0) {
|
||||
String prefix = fileName.substring(0, sepIndex);
|
||||
String suffix = fileName.substring(sepIndex + 1);
|
||||
|
||||
id.name = prefix;
|
||||
id.uniqueId = BlueprintId.toBytes(suffix.substring(0, suffix.length() - 4));
|
||||
} else {
|
||||
id.name = fileName.substring(0, dotIndex);
|
||||
id.uniqueId = new byte[0];
|
||||
}
|
||||
|
||||
if (extension.equals(BPT_EXTENSION)) {
|
||||
id.kind = Kind.Blueprint;
|
||||
} else {
|
||||
id.uniqueId = BlueprintId.toBytes(suffix.replaceAll(TPL_EXTENSION, ""));
|
||||
id.kind = Kind.Template;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,8 +78,12 @@ public final class BlueprintId implements Comparable<BlueprintId> {
|
|||
|
||||
public String getCompleteId () {
|
||||
if (completeId == null) {
|
||||
completeId = name + BuildCraftBuilders.BPT_SEP_CHARACTER
|
||||
if (uniqueId.length > 0) {
|
||||
completeId = name + BuildCraftBuilders.BPT_SEP_CHARACTER
|
||||
+ toString(uniqueId);
|
||||
} else {
|
||||
completeId = name;
|
||||
}
|
||||
}
|
||||
|
||||
return completeId;
|
||||
|
|
|
@ -248,12 +248,14 @@ public class TileTank extends TileBuildCraft implements IFluidHandler {
|
|||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
return true;
|
||||
Fluid tankFluid = getBottomTank().tank.getFluidType();
|
||||
return tankFluid == null || tankFluid == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
return false;
|
||||
Fluid tankFluid = getBottomTank().tank.getFluidType();
|
||||
return tankFluid != null && tankFluid == fluid;
|
||||
}
|
||||
|
||||
public int getFluidLightLevel() {
|
||||
|
|
Loading…
Reference in a new issue