Fix diamond meteor giving blocks + dynamically calculate weight (#1126)

This commit is contained in:
Nicholas Ignoffo 2017-05-21 12:25:35 -07:00
parent 66e3066dc9
commit a2ceee3218
3 changed files with 14 additions and 10 deletions

View file

@ -25,13 +25,17 @@ public class Meteor
@Setter
public int version;
public Meteor(ItemStack catalystStack, List<MeteorComponent> components, float explosionStrength, int radius, int maxWeight)
public Meteor(ItemStack catalystStack, List<MeteorComponent> components, float explosionStrength, int radius)
{
this.catalystStack = catalystStack;
this.components = components;
this.explosionStrength = explosionStrength;
this.radius = radius;
this.maxWeight = maxWeight;
int weight = 0;
for (MeteorComponent component : components)
weight += component.getWeight();
this.maxWeight = weight;
}
public void generateMeteor(World world, BlockPos pos, IBlockState fillerBlock, double radiusModifier, double explosionModifier, double fillerChance)