mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Fixed miner sometimes crashing when placed next to certain blocks
Closes #114
This commit is contained in:
parent
75d43d88b4
commit
12de298057
1 changed files with 15 additions and 12 deletions
|
@ -139,21 +139,24 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
int[] ids = OreDictionary.getOreIDs(new ItemStack(block, 1, meta));
|
ItemStack stack = new ItemStack(block, 1, meta);
|
||||||
for(int id : ids){
|
if(stack != null){
|
||||||
String name = OreDictionary.getOreName(id);
|
int[] ids = OreDictionary.getOreIDs(stack);
|
||||||
if(name.startsWith("ore") || name.startsWith("denseore")){
|
for(int id : ids){
|
||||||
return true;
|
String name = OreDictionary.getOreName(id);
|
||||||
}
|
if(name.startsWith("ore") || name.startsWith("denseore")){
|
||||||
}
|
|
||||||
|
|
||||||
String reg = block.getRegistryName().toString();
|
|
||||||
if(!reg.isEmpty()){
|
|
||||||
for(String string : ConfigStringListValues.MINER_EXTRA_WHITELIST.getValue()){
|
|
||||||
if(reg.equals(string)){
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String reg = block.getRegistryName().toString();
|
||||||
|
if(!reg.isEmpty()){
|
||||||
|
for(String string : ConfigStringListValues.MINER_EXTRA_WHITELIST.getValue()){
|
||||||
|
if(reg.equals(string)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue