mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-23 02:35:25 +01:00
Multiple generator fixes.
This commit is contained in:
parent
504f0ff57f
commit
63441f1d6c
@ -47,7 +47,7 @@ public class GeneratorManager {
|
|||||||
Materials materials = Materials.fromString(materialList);
|
Materials materials = Materials.fromString(materialList);
|
||||||
|
|
||||||
if (materials != null) {
|
if (materials != null) {
|
||||||
generatorMaterials.add(new GeneratorMaterial(materials, configLoad.getInt(
|
generatorMaterials.add(new GeneratorMaterial(materials, configLoad.getDouble(
|
||||||
"Generators." + generatorList + ".Materials." + materialList + ".Chance")));
|
"Generators." + generatorList + ".Materials." + materialList + ".Chance")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ public class GeneratorMaterial {
|
|||||||
private Materials materials;
|
private Materials materials;
|
||||||
private double chance;
|
private double chance;
|
||||||
|
|
||||||
public GeneratorMaterial(Materials materials, int chance) {
|
public GeneratorMaterial(Materials materials, double chance) {
|
||||||
this.materials = materials;
|
this.materials = materials;
|
||||||
this.chance = chance;
|
this.chance = chance;
|
||||||
}
|
}
|
||||||
|
@ -312,6 +312,10 @@ public class Block implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Material material = event.getBlock().getType();
|
||||||
|
if (material != Material.WATER && material != Material.LAVA) return;
|
||||||
|
|
||||||
if (generatorManager != null && generatorManager.getGenerators().size() > 0) {
|
if (generatorManager != null && generatorManager.getGenerators().size() > 0) {
|
||||||
Island island = islandManager.getIslandAtLocation(event.getBlock().getLocation());
|
Island island = islandManager.getIslandAtLocation(event.getBlock().getLocation());
|
||||||
IslandWorld world = worldManager.getIslandWorld(event.getBlock().getWorld());
|
IslandWorld world = worldManager.getIslandWorld(event.getBlock().getWorld());
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user