Merge pull request #927 from Chocohead/patch-1
Apply the fixes GT Shim does
This commit is contained in:
commit
f61c77c53c
1 changed files with 6 additions and 7 deletions
|
@ -169,7 +169,7 @@ public class GT_BaseCrop extends CropCard {
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getGain(ICropTile aCrop) {
|
public ItemStack getGain(ICropTile aCrop) {
|
||||||
int tDrop;
|
int tDrop;
|
||||||
if (mSpecialDrops != null && (tDrop = aCrop.getWorld().rand.nextInt((mSpecialDrops.length*2) + 2)) < mSpecialDrops.length && mSpecialDrops[tDrop] != null) {
|
if (mSpecialDrops != null && (tDrop = aCrop.getWorldObj().rand.nextInt((mSpecialDrops.length*2) + 2)) < mSpecialDrops.length && mSpecialDrops[tDrop] != null) {
|
||||||
return GT_Utility.copy(mSpecialDrops[tDrop]);
|
return GT_Utility.copy(mSpecialDrops[tDrop]);
|
||||||
}
|
}
|
||||||
return GT_Utility.copy(mDrop);
|
return GT_Utility.copy(mDrop);
|
||||||
|
@ -195,14 +195,13 @@ public class GT_BaseCrop extends CropCard {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (int i = 1; i < this.getRootsLength(aCrop); i++) {
|
for (int i = 1; i < this.getRootsLength(aCrop); i++) {
|
||||||
IBlockState downState = aCrop.getWorld().getBlockState(aCrop.getLocation().down());
|
IBlockState downState = aCrop.getWorldObj().getBlockState(aCrop.getPosition().down(i));
|
||||||
int tMetaID = downState.getBlock().getMetaFromState(downState);
|
int tMetaID = downState.getBlock().getMetaFromState(downState);
|
||||||
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(downState.getBlock(), 1, tMetaID));
|
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(downState.getBlock(), 1, tMetaID));
|
||||||
if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore")) && (tAssotiation.mMaterial.mMaterial == mBlock)) {
|
if (tAssotiation != null && tAssotiation.mMaterial.mMaterial == mBlock) {
|
||||||
|
if (tAssotiation.mPrefix.toString().startsWith("ore") || tAssotiation.mPrefix == OrePrefixes.block) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ((tAssotiation != null) && (tAssotiation.mPrefix == OrePrefixes.block) && (tAssotiation.mMaterial.mMaterial == mBlock)) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue