Merge branch '1.7-final' of github.com:Thaumic-Tinkerer/ThaumicTinkerer into 1.7-final

This commit is contained in:
Katrina Swales committed 2016-08-14 17:26:26 +01:00
commit 3a2df62fae
2 files changed
+10 -8

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ group = "thaumic.tinkerer" // http://maven.apache.org/guides/mini/guide-naming-c
archivesBaseName = "ThaumicTinkerer"
minecraft {
version = "1.7.10-10.13.4.1566-1.7.10"
version = "1.7.10-10.13.4.1614-1.7.10"
//minecraftVersion="1.7.2"
runDir = "eclipse"
replace '${version}', project.version
@@ -38,13 +38,15 @@ public class AspectCropLootManager {
for (Integer i : aspectHashmap.values()) {
sum += i;
}
Random rand = new Random();
int randInt = rand.nextInt(sum);
for (Map.Entry<ItemStack, Integer> pair : aspectHashmap.entrySet()) {
randInt -= pair.getValue();
if (randInt <= 0) {
return pair.getKey().copy();
if(sum>0)
{
Random rand = new Random();
int randInt = rand.nextInt(sum);
for (Map.Entry<ItemStack, Integer> pair : aspectHashmap.entrySet()) {
randInt -= pair.getValue();
if (randInt <= 0) {
return pair.getKey().copy();
}
}
}
return null;