Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows

This commit is contained in:
nossr50 2020-08-06 19:02:18 -07:00
commit ae5ee8957c
9 changed files with 31 additions and 16 deletions

View File

@ -48,6 +48,13 @@ Version 2.2.000
Notes:
These are the first new skills that I've written for mcMMO in about 9 years, I'll be listening closely to feedback and tweaking them often.
Version 2.1.139
Code used to fetch UUIDs was reworked to avoid a scenario where it failed (thanks t00thpick1)
Added 'Netherite_Gold_Ore' to Smelting XP tables (thanks Quavelen)
Added 'Gilded_Blackstone' and 'Nether_Gold_Ore' to code used to determine what can activate Super Breaker in certain situations (thanks Quavelen)
MMOinfo for Roll was corrected (thanks emanondev)
>>>>>>> 8df15a4e55b27af7ac0fc72d587acc2bdf5b966a
Version 2.1.138
Fixed a bug where Netherite weapons/tools/armor weren't applying correct values in some skill calculations

View File

@ -337,7 +337,7 @@ public class Roll extends AcrobaticsSubSkill {
//player.sendMessage(getDescription());
//Player stats
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Stats",
LocaleLoader.getString("Acrobatics.SubSkill.Roll.Stats", getStats(player)[0], getStats(player)[1])));
LocaleLoader.getString("Acrobatics.SubSkill.Roll.Stats", getStats(player))));
//Mechanics
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Mechanics"));
@ -357,6 +357,9 @@ public class Roll extends AcrobaticsSubSkill {
//1 = chance to roll with grace at half max level
//2 = level where maximum bonus is reached
//3 = additive chance to succeed per level
//4 = damage threshold when rolling
//5 = damage threshold when rolling with grace
//6 = half of level where maximum bonus is reached
/*
Roll:
# ChanceMax: Maximum chance of rolling when on <MaxBonusLevel> or higher
@ -370,7 +373,7 @@ public class Roll extends AcrobaticsSubSkill {
//Chance to roll at half max skill
RandomChanceSkill rollHalfMaxSkill = new RandomChanceSkill(null, subSkillType);
int halfMaxSkillValue = mcMMO.isRetroModeEnabled() ? 500 : 50;
int halfMaxSkillValue = AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL)/2;
rollHalfMaxSkill.setSkillLevel(halfMaxSkillValue);
//Chance to graceful roll at full skill
@ -390,7 +393,7 @@ public class Roll extends AcrobaticsSubSkill {
double maxLevel = AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL);
return LocaleLoader.getString("Acrobatics.SubSkill.Roll.Mechanics", rollChanceHalfMax, graceChanceHalfMax, maxLevel, chancePerLevel, damageThreshold, damageThreshold * 2);
return LocaleLoader.getString("Acrobatics.SubSkill.Roll.Mechanics", rollChanceHalfMax, graceChanceHalfMax, maxLevel, chancePerLevel, damageThreshold, damageThreshold * 2,halfMaxSkillValue);
}
/**
@ -425,4 +428,4 @@ public class Roll extends AcrobaticsSubSkill {
{
return player.getLocation().getBlock().getLocation();
}
}
}

View File

@ -17,6 +17,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.logging.Level;
public class UUIDUpdateAsyncTask implements Runnable {
@ -29,7 +30,7 @@ public class UUIDUpdateAsyncTask implements Runnable {
private static final int BATCH_SIZE = 100; // 100 at a time
private final Object awaiter = new Object();
private final CountDownLatch awaiter = new CountDownLatch(1);
private final mcMMO plugin;
private final ImmutableList<String> userNames;
private int position = 0;
@ -98,12 +99,10 @@ public class UUIDUpdateAsyncTask implements Runnable {
position += batch.size();
plugin.getLogger().info(String.format("Conversion progress: %d/%d users", position, userNames.size()));
if (position == userNames.size())
{
if (position == userNames.size()) {
mcMMO.getUpgradeManager().setUpgradeCompleted(UpgradeType.ADD_UUIDS);
awaiter.notify();
}
else
awaiter.countDown();
} else
this.runTaskLaterAsynchronously(plugin, Misc.TICK_CONVERSION_FACTOR * DELAY_PERIOD); // Schedule next batch
}
@ -122,7 +121,7 @@ public class UUIDUpdateAsyncTask implements Runnable {
public void waitUntilFinished() {
try {
awaiter.wait();
awaiter.await();
} catch (InterruptedException e) {
// I guess we don't care in this event
}

View File

@ -128,6 +128,9 @@ public class RepairManager extends SkillManager {
int baseRepairAmount = repairable.getBaseRepairDurability(item); // Did they send me daughters?
short newDurability = repairCalculate(startDurability, baseRepairAmount); // When I asked for sons?
// toRemove should be refreshed before the event call.
toRemove = inventory.getItem(inventory.first(repairMaterial)).clone();
// Call event
if (EventUtils.callRepairCheckEvent(player, (short) (startDurability - newDurability), toRemove, item).isCancelled()) {
return;
@ -139,7 +142,6 @@ public class RepairManager extends SkillManager {
}
// Remove the item
toRemove = inventory.getItem(inventory.first(repairMaterial)).clone();
toRemove.setAmount(1);
inventory.removeItem(toRemove);
@ -393,4 +395,4 @@ public class RepairManager extends SkillManager {
public void actualizeLastAnvilUse() {
lastClick = (int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR);
}
}
}

View File

@ -100,7 +100,6 @@ public class SalvageManager extends SkillManager {
potentialSalvageYield = Math.min(potentialSalvageYield, getSalvageLimit()); // Always get at least something back, if you're capable of salvaging it.
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
location.add(0.5, 1, 0.5);
Map<Enchantment, Integer> enchants = item.getEnchantments();
@ -140,6 +139,8 @@ public class SalvageManager extends SkillManager {
return;
}
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
Location anvilLoc = location.clone();
Location playerLoc = player.getLocation().clone();
double distance = anvilLoc.distance(playerLoc);

View File

@ -207,6 +207,8 @@ public class MaterialMapStore {
ores.add("redstone_ore");
ores.add("emerald_ore");
ores.add("ancient_debris");
ores.add("nether_gold_ore");
ores.add("gilded_blackstone");
}
private void fillArmors() {

View File

@ -476,6 +476,7 @@ Experience_Values:
Lapis_Ore: 40
Nether_Quartz_Ore: 25
Redstone_Ore: 15
Nether_Gold_Ore: 35
Taming:
Animal_Taming:
Llama: 1200

View File

@ -144,7 +144,7 @@ Acrobatics.SubSkill.Roll.Name=Roll
Acrobatics.SubSkill.Roll.Description=Land strategically to avoid damage.
Acrobatics.SubSkill.Roll.Chance=Roll Chance: [[YELLOW]]{0}
Acrobatics.SubSkill.Roll.GraceChance=Graceful Roll Chance: [[YELLOW]]{0}
Acrobatics.SubSkill.Roll.Mechanics=[[GRAY]]Rolling is an active Sub-Skill with a passive component.\nWhenever you take fall damage you have a chance to completely negate the damage based on your skill level, at level 50 you have a [[YELLOW]]{0}%[[GRAY]] chance to prevent damage, and [[YELLOW]]{1}%[[GRAY]] if you activate Graceful Roll.\nThe chance for success is scaled against your skill level in a linear curve until level [[YELLOW]]{2}[[GRAY]] where it maxes out, every level in Acrobatics gives you a [[YELLOW]]{3}%[[GRAY]] chance to succeed.\nBy holding the sneak button you can double your odds to avoid fall damage and avoid up to twice the fall damage! Holding sneak will transform a normal roll into a Graceful Roll.\nRolling will only prevent up to [[RED]]{4}[[GRAY]] damage. Graceful Rolls will prevent up to [[GREEN]]{5}[[GRAY]] damage.
Acrobatics.SubSkill.Roll.Mechanics=[[GRAY]]Rolling is an active Sub-Skill with a passive component.\nWhenever you take fall damage you have a chance to completely negate the damage based on your skill level, at level [[YELLOW]]{6}%[[GRAY]] you have a [[YELLOW]]{0}%[[GRAY]] chance to prevent damage, and [[YELLOW]]{1}%[[GRAY]] if you activate Graceful Roll.\nThe chance for success is scaled against your skill level in a linear curve until level [[YELLOW]]{2}[[GRAY]] where it maxes out, every level in Acrobatics gives you a [[YELLOW]]{3}%[[GRAY]] chance to succeed.\nBy holding the sneak button you can double your odds to avoid fall damage and avoid up to twice the fall damage! Holding sneak will transform a normal roll into a Graceful Roll.\nRolling will only prevent up to [[RED]]{4}[[GRAY]] damage. Graceful Rolls will prevent up to [[GREEN]]{5}[[GRAY]] damage.
Acrobatics.SubSkill.GracefulRoll.Name=Graceful Roll
Acrobatics.SubSkill.GracefulRoll.Description=Twice as effective as a normal Roll
Acrobatics.SubSkill.Dodge.Name=Dodge

View File

@ -142,7 +142,7 @@ Acrobatics.SubSkill.Roll.Name=Capriola
Acrobatics.SubSkill.Roll.Description=Atterra strategicamente per evitare danni.
Acrobatics.SubSkill.Roll.Chance=Possibilit\u00E0 di Capriola: [[YELLOW]]{0}
Acrobatics.SubSkill.Roll.GraceChance=Possibilit\u00E0 di Capriola Aggraziata: [[YELLOW]]{0}
Acrobatics.SubSkill.Roll.Mechanics=[[GRAY]]La Capriola \u00E8 una Sotto-Abilit\u00E0 attiva con una componente passiva.\nOgni volta che subisci un danno da caduta hai la possibilit\u00E0 di annullare completamente il danno in base al tuo livello di abilit\u00E0, al livello 50 hai il [[YELLOW]]{0}%[[GRAY]] di possibilit\u00E0 di prevenire il danno, e il [[YELLOW]]{1}%[[GRAY]] se attivi Capriola Aggraziata.\nLe possibilit\u00E0 di successo sono scalate rispetto al tuo livello di abilit\u00E0 con una curva lineare fino al livello [[YELLOW]]{2}[[GRAY]] dove diventa massima, ogni livello in Acrobatica ti d\u00E0 il [[YELLOW]]{3}%[[GRAY]] di possibilit\u00E0 di successo.\nTenendo premuto il pulsante di accovacciamento puoi raddoppiare le tue probabilit\u00E0 di evitare i danni da caduta ed evitare fino al doppio del danno da caduta! Stando accovacciato trasformer\u00E0 una capriola normale in una Capriola Aggraziata.\nLe Capriole impediscono solo fino a [[RED]]{4}[[GRAY]] danni. Le Capriole Aggraziate impediscono fino a [[GREEN]]{5}[[GRAY]] danni.
Acrobatics.SubSkill.Roll.Mechanics=[[GRAY]]La Capriola \u00E8 una Sotto-Abilit\u00E0 attiva con una componente passiva.\nOgni volta che subisci un danno da caduta hai la possibilit\u00E0 di annullare completamente il danno in base al tuo livello di abilit\u00E0, al livello [[YELLOW]]{6}%[[GRAY]] hai il [[YELLOW]]{0}%[[GRAY]] di possibilit\u00E0 di prevenire il danno, e il [[YELLOW]]{1}%[[GRAY]] se attivi Capriola Aggraziata.\nLe possibilit\u00E0 di successo sono scalate rispetto al tuo livello di abilit\u00E0 con una curva lineare fino al livello [[YELLOW]]{2}[[GRAY]] dove diventa massima, ogni livello in Acrobatica ti d\u00E0 il [[YELLOW]]{3}%[[GRAY]] di possibilit\u00E0 di successo.\nTenendo premuto il pulsante di accovacciamento puoi raddoppiare le tue probabilit\u00E0 di evitare i danni da caduta ed evitare fino al doppio del danno da caduta! Stando accovacciato trasformer\u00E0 una capriola normale in una Capriola Aggraziata.\nLe Capriole impediscono solo fino a [[RED]]{4}[[GRAY]] danni. Le Capriole Aggraziate impediscono fino a [[GREEN]]{5}[[GRAY]] danni.
Acrobatics.SubSkill.GracefulRoll.Name=Capriola Aggraziata
Acrobatics.SubSkill.GracefulRoll.Description=Due volte pi\u00F9 efficace di una normale Capriola
Acrobatics.SubSkill.Dodge.Name=Schivata