fixed ore achievements not working with custom ores

This commit is contained in:
Blood-Asp 2015-12-10 21:02:37 +01:00
parent 6b2e08b2ca
commit 02e556598e
2 changed files with 5 additions and 5 deletions

View file

@ -560,7 +560,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
@Override
public int getItemStackLimit(ItemStack aStack) {
Long[] tStats = getElectricStats(aStack);
if (tStats != null && (tStats[3] == -1 || tStats[3] == -3) && getRealCharge(aStack) > 0) return 1;
if (tStats != null && (tStats[3] == -1 || tStats[3] == -2 || tStats[3] == -3) && getRealCharge(aStack) > 0) return 1;
tStats = getFluidContainerStats(aStack);
if (tStats != null) return (int) (long) tStats[1];
return 64;

View file

@ -46,10 +46,10 @@ public class GT_Worldgen_GT_Ore_Layer
this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
if (this.mEnabled) {
GT_Achievements.registerOre(aPrimary, aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(aSecondary, aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(aBetween, aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(aSporadic, aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
sWeight += this.mWeight;
}
}