fix #3503, fix #3496, work around #3500

This commit is contained in:
Adrian Siekierka 2017-03-09 11:44:22 +01:00
parent f88cdab008
commit e2c2361df8
3 changed files with 20 additions and 9 deletions

View file

@ -646,6 +646,9 @@ public class BuildCraftCore extends BuildCraftMod {
BuildingSlotMapIterator.MAX_PER_ITEM = builderMaxPerItemFactor;
if (miningMultiplier <= 0)
throw new RuntimeException("Please do not set the miningMultiplier to values <= 0.0!");
if (mainConfigManager.get("general.updateCheck").getBoolean(true)) {
Version.check();
}

View file

@ -167,7 +167,11 @@ public abstract class BlockBuildCraft extends BlockContainer {
@SideOnly(Side.CLIENT)
public IIcon getIconAbsolute(int side, int metadata) {
return icons[metadata] == null ? icons[0][side] : icons[metadata][side];
if (metadata < 0 || metadata >= icons.length || icons[metadata] == null) {
return icons[0][side];
} else {
return icons[metadata][side];
}
}
@Override

View file

@ -194,18 +194,22 @@ public class StackHelper {
if (a.getItem() != b.getItem()) {
return false;
}
if (matchDamage && a.getHasSubtypes()) {
if (!isWildcard(a) && !isWildcard(b)) {
if (a.getItemDamage() != b.getItemDamage()) {
return false;
}
}
if (isWildcard(a) || isWildcard(b)) {
return true;
}
if (matchNBT) {
if (a.stackTagCompound != null && !a.stackTagCompound.equals(b.stackTagCompound)) {
if (matchDamage && a.getHasSubtypes()) {
if (a.getItemDamage() != b.getItemDamage()) {
return false;
}
}
if (matchNBT) {
if (!ItemStack.areItemStackTagsEqual(a, b)) {
return false;
}
}
return true;
}