mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-21 04:22:29 +00:00
Added getTotalMeteorWeight function
Moved loop to calculate total weight to it's own function, used in NEI tab as well
This commit is contained in:
1 parent
5c930a479f
commit
00f9fa1add
1 file changed
+16
-10
+16
-10
@@ -36,6 +36,21 @@ public class MeteorParadigm
|
||||
componentList.add(mpc);
|
||||
}
|
||||
}
|
||||
|
||||
public int getTotalMeteorWeight()
|
||||
{
|
||||
int totalMeteorWeight = 0;
|
||||
for (MeteorParadigmComponent mpc : componentList)
|
||||
{
|
||||
if (mpc == null || !mpc.isValidBlockParadigm())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
totalMeteorWeight += mpc.getChance();
|
||||
}
|
||||
return totalMeteorWeight;
|
||||
}
|
||||
|
||||
public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags)
|
||||
{
|
||||
@@ -72,16 +87,7 @@ public class MeteorParadigm
|
||||
|
||||
float totalChance = iceChance + soulChance + obsidChance;
|
||||
|
||||
int totalMeteorWeight = 0;
|
||||
for (MeteorParadigmComponent mpc : componentList)
|
||||
{
|
||||
if (mpc == null || !mpc.isValidBlockParadigm())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
totalMeteorWeight += mpc.getChance();
|
||||
}
|
||||
int totalMeteorWeight = getTotalMeteorWeight();
|
||||
|
||||
for (int i = -newRadius; i <= newRadius; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user