mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Changed Flux Mining mechanics
Previously, Flux Mining would get unlocked at a specified level with a specified chance. Once unlocked, the player would have no control over this ability and some players complained they would like to be able to turn it on and off. By adding a new furnace recipe, to craft a special pickaxe - a Flux Pickaxe - this issue is solved. If a player doesn’t want to use Flux Mining, they simply shouldn’t mine using a Flux Pickaxe. Crafting a Flux Pickaxe is simple, just place one of the vanilla pickaxes in a furnace and cook it up. Every time the ability is successful, extra durability damage is dealt to the tool. Just like with other abilities. Adds #2320
This commit is contained in:
@ -694,4 +694,13 @@ public final class ItemUtils {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
return itemMeta.hasDisplayName() && itemMeta.getDisplayName().equals(ChatColor.GOLD + LocaleLoader.getString("Item.ChimaeraWing.Name"));
|
||||
}
|
||||
|
||||
public static boolean isFluxPickaxe(ItemStack item) {
|
||||
if (!isMcMMOItem(item)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
return itemMeta.hasDisplayName() && itemMeta.getDisplayName().equals(ChatColor.GOLD + LocaleLoader.getString("Item.FluxPickaxe.Name"));
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,14 @@ public final class ParticleEffectUtils {
|
||||
playSmokeEffect(player);
|
||||
}
|
||||
|
||||
public static void playFluxEffect(Location location) {
|
||||
if (!Config.getInstance().getFluxEffectEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
location.getWorld().playEffect(location, Effect.MOBSPAWNER_FLAMES, 1);
|
||||
}
|
||||
|
||||
public static void playSmokeEffect(LivingEntity livingEntity) {
|
||||
Location location = livingEntity.getEyeLocation();
|
||||
World world = livingEntity.getWorld();
|
||||
|
Reference in New Issue
Block a user