mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Hopefully fixed a Miner Bug
This commit is contained in:
parent
57c37cb900
commit
8be363ba08
1 changed files with 19 additions and 16 deletions
|
@ -126,29 +126,32 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMinable(Block block, int meta){
|
private boolean isMinable(Block block, int meta){
|
||||||
if(!this.isBlacklisted(block)){
|
if(block != null){
|
||||||
if(!this.onlyMineOres){
|
if(!this.isBlacklisted(block)){
|
||||||
return true;
|
if(!this.onlyMineOres){
|
||||||
}
|
return true;
|
||||||
else{
|
|
||||||
int[] ids = OreDictionary.getOreIDs(new ItemStack(block, 1, meta));
|
|
||||||
for(int id : ids){
|
|
||||||
String name = OreDictionary.getOreName(id);
|
|
||||||
if(name.startsWith("ore") || name.startsWith("denseore")){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
String reg = block.getRegistryName();
|
int[] ids = OreDictionary.getOreIDs(new ItemStack(block, 1, meta));
|
||||||
if(reg != null && !reg.isEmpty()){
|
for(int id : ids){
|
||||||
for(String string : ConfigValues.minerExtraWhitelist){
|
String name = OreDictionary.getOreName(id);
|
||||||
if(reg.equals(string)){
|
if(name.startsWith("ore") || name.startsWith("denseore")){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String reg = block.getRegistryName();
|
||||||
|
if(reg != null && !reg.isEmpty()){
|
||||||
|
for(String string : ConfigValues.minerExtraWhitelist){
|
||||||
|
if(reg.equals(string)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue