diff --git a/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java b/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java index 0a28f0b3..cb0e2aa0 100644 --- a/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java +++ b/src/main/java/WayofTime/bloodmagic/meteor/Meteor.java @@ -25,13 +25,17 @@ public class Meteor @Setter public int version; - public Meteor(ItemStack catalystStack, List components, float explosionStrength, int radius, int maxWeight) + public Meteor(ItemStack catalystStack, List 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) diff --git a/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java b/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java index dbe77473..ab2bd130 100644 --- a/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java +++ b/src/main/java/WayofTime/bloodmagic/meteor/MeteorConfigHandler.java @@ -120,8 +120,9 @@ public class MeteorConfigHandler ironMeteorList.add(new MeteorComponent(30, "oreGold")); ironMeteorList.add(new MeteorComponent(60, "oreLapis")); ironMeteorList.add(new MeteorComponent(100, "oreRedstone")); - Meteor ironMeteor = new Meteor(new ItemStack(Blocks.IRON_BLOCK), ironMeteorList, 15, 5, 1000); + Meteor ironMeteor = new Meteor(new ItemStack(Blocks.IRON_BLOCK), ironMeteorList, 15, 5); ironMeteor.setVersion(2); + // Gold List goldMeteorList = Lists.newArrayList(); goldMeteorList.add(new MeteorComponent(200, "oreIron")); @@ -132,10 +133,10 @@ public class MeteorConfigHandler goldMeteorList.add(new MeteorComponent(30, "oreDiamond")); goldMeteorList.add(new MeteorComponent(20, "oreEmerald")); goldMeteorList.add(new MeteorComponent(20, "oreCoal")); - - Meteor goldMeteor = new Meteor(new ItemStack(Blocks.GOLD_BLOCK), goldMeteorList, 18, 6, 1000); + Meteor goldMeteor = new Meteor(new ItemStack(Blocks.GOLD_BLOCK), goldMeteorList, 18, 6); goldMeteor.setVersion(3); + // Diamond List diamondMeteorList = Lists.newArrayList(); diamondMeteorList.add(new MeteorComponent(50, "oreIron")); diamondMeteorList.add(new MeteorComponent(100, "oreGold")); @@ -143,9 +144,8 @@ public class MeteorConfigHandler diamondMeteorList.add(new MeteorComponent(250, "oreDiamond")); diamondMeteorList.add(new MeteorComponent(180, "oreEmerald")); diamondMeteorList.add(new MeteorComponent(50, "oreRedstone")); - diamondMeteorList.add(new MeteorComponent(400, "minecraft:diamond_block")); - - Meteor diamondMeteor = new Meteor(new ItemStack(Blocks.DIAMOND_BLOCK), diamondMeteorList, 10, 3, 1000); + diamondMeteorList.add(new MeteorComponent(400, "oreDiamond")); + Meteor diamondMeteor = new Meteor(new ItemStack(Blocks.DIAMOND_BLOCK), diamondMeteorList, 10, 3); diamondMeteor.setVersion(3); holders.add(Pair.of("IronMeteor", ironMeteor)); diff --git a/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java b/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java index f85cbcc4..9e7fd9aa 100644 --- a/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/meteor/MeteorRegistry.java @@ -23,9 +23,9 @@ public class MeteorRegistry } } - public static void registerMeteor(ItemStack stack, List componentList, float explosionStrength, int radius, int maxWeight) + public static void registerMeteor(ItemStack stack, List componentList, float explosionStrength, int radius) { - Meteor holder = new Meteor(stack, componentList, explosionStrength, radius, maxWeight); + Meteor holder = new Meteor(stack, componentList, explosionStrength, radius); registerMeteor(stack, holder); }