From 441125dbd1abe9598510563b6d7aade9435fc125 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 27 Feb 2020 07:36:41 -0800 Subject: [PATCH 1/7] 2.1.117 --- Changelog.txt | 5 +++++ pom.xml | 2 +- .../java/com/gmail/nossr50/skills/mining/MiningManager.java | 2 +- .../com/gmail/nossr50/util/skills/ParticleEffectUtils.java | 6 ++++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 7c6d6aade..d0f26a381 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,8 @@ +Version 2.1.117 + Fixed a rare http error when polling Mojang for UUIDs + Fixed a bug that allowed duping + + Version 2.1.116 Fixed directional plants not maintaining their direction when replanted diff --git a/pom.xml b/pom.xml index 0c2f79be8..d41267bcb 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.117-SNAPSHOT + 2.1.117 mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 00853db63..4d4f9eb8e 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -147,7 +147,7 @@ public class MiningManager extends SkillManager { ores.add(blockState); } //Server bug that allows beacons to be duped when yield is set to 0 - else if(blockState.getType() != Material.BEACON) { + else if(blockState.getType() != Material.BEACON && blockState.getType() != Material.SHULKER_BOX) { debris.add(blockState); } } diff --git a/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java b/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java index 4ddf909af..9c9f19cf6 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java @@ -43,12 +43,18 @@ public final class ParticleEffectUtils { return; } + if(location.getWorld() == null) + return; + location.getWorld().playEffect(location, Effect.MOBSPAWNER_FLAMES, 1); } public static void playSmokeEffect(Location location) { World world = location.getWorld(); + if(world == null) + return; + // Have to do it this way, because not all block directions are valid for smoke world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH_EAST); world.playEffect(location, Effect.SMOKE, BlockFace.SOUTH); From 0a59b79ef914075df0fe20e0c08e7f5896034c7a Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 27 Feb 2020 10:50:56 -0800 Subject: [PATCH 2/7] Dev mode --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d41267bcb..fce0727f7 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.117 + 2.1.118-SNAPSHOT mcMMO https://github.com/mcMMO-Dev/mcMMO From 9f0fe267787a6576f3cce60c76ea495719ef8e8b Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 27 Feb 2020 12:45:35 -0800 Subject: [PATCH 3/7] Blast Mining Tweaks --- Changelog.txt | 4 ++ .../config/experience/ExperienceConfig.java | 38 ++++++++++++ .../nossr50/listeners/EntityListener.java | 4 +- .../nossr50/skills/mining/MiningManager.java | 61 +++++++++---------- 4 files changed, 73 insertions(+), 34 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index d0f26a381..119a70065 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,7 @@ +Version 2.1.118 + Fixed another dupe bug + Blast Mining no longer reduces debris from explosions due to some issues with the Bukkit API + Version 2.1.117 Fixed a rare http error when polling Mojang for UUIDs Fixed a bug that allowed duping diff --git a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java index 185c5c207..06c4ea9ce 100644 --- a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java +++ b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java @@ -7,6 +7,8 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage; import com.gmail.nossr50.util.StringUtils; import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; import org.bukkit.block.data.BlockData; import org.bukkit.boss.BarColor; import org.bukkit.boss.BarStyle; @@ -219,6 +221,42 @@ public class ExperienceConfig extends AutoUpdateConfigLoader { return 0; } + /* Materials */ + public int getXp(PrimarySkillType skill, BlockState blockState) + { + Material data = blockState.getType(); + + String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + "."; + String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data); + if (config.contains(explicitString)) + return config.getInt(explicitString); + String friendlyString = baseString + StringUtils.getFriendlyConfigMaterialString(data); + if (config.contains(friendlyString)) + return config.getInt(friendlyString); + String wildcardString = baseString + StringUtils.getWildcardConfigMaterialString(data); + if (config.contains(wildcardString)) + return config.getInt(wildcardString); + return 0; + } + + /* Materials */ + public int getXp(PrimarySkillType skill, Block block) + { + Material data = block.getType(); + + String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + "."; + String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data); + if (config.contains(explicitString)) + return config.getInt(explicitString); + String friendlyString = baseString + StringUtils.getFriendlyConfigMaterialString(data); + if (config.contains(friendlyString)) + return config.getInt(friendlyString); + String wildcardString = baseString + StringUtils.getWildcardConfigMaterialString(data); + if (config.contains(wildcardString)) + return config.getInt(wildcardString); + return 0; + } + /* Materials */ public int getXp(PrimarySkillType skill, BlockData data) { diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 2f191cc6e..ab6b1cbae 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -839,8 +839,8 @@ public class EntityListener implements Listener { MiningManager miningManager = UserManager.getPlayer(player).getMiningManager(); if (miningManager.canUseBlastMining()) { - miningManager.blastMiningDropProcessing(event.getYield(), event.blockList()); - event.setYield(0); + miningManager.blastMiningDropProcessing(event.getYield(), event); +// event.setYield(0); } } diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 4d4f9eb8e..84c5d4145 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -2,6 +2,7 @@ package com.gmail.nossr50.skills.mining; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; +import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.player.McMMOPlayer; @@ -12,6 +13,8 @@ import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.skills.AbilityCooldownTask; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.util.*; +import com.gmail.nossr50.util.blockmeta.HashChunkletManager; +import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager; import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; @@ -19,9 +22,11 @@ import com.gmail.nossr50.util.skills.SkillUtils; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockState; +import org.bukkit.block.Container; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.entity.TNTPrimed; +import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.inventory.ItemStack; import java.util.ArrayList; @@ -126,55 +131,47 @@ public class MiningManager extends SkillManager { * Handler for explosion drops and XP gain. * * @param yield The % of blocks to drop - * @param blockList The list of blocks to drop + * @param event The {@link EntityExplodeEvent} */ - public void blastMiningDropProcessing(float yield, List blockList) { + public void blastMiningDropProcessing(float yield, EntityExplodeEvent event) { + //Strip out only stuff that gives mining XP + List ores = new ArrayList(); - List debris = new ArrayList(); + + List newYieldList = new ArrayList<>(); + for (Block targetBlock : event.blockList()) { + //Containers usually have 0 XP unless someone edited their config in a very strange way + if (ExperienceConfig.getInstance().getXp(PrimarySkillType.MINING, targetBlock) == 0 || targetBlock instanceof Container || mcMMO.getPlaceStore().isTrue(targetBlock)) { + newYieldList.add(targetBlock); + } else { + ores.add(targetBlock.getState()); + } + } + int xp = 0; float oreBonus = (float) (getOreBonus() / 100); //TODO: Pretty sure something is fucked with debrisReduction stuff - float debrisReduction = (float) (getDebrisReduction() / 100); +// float debrisReduction = (float) (getDebrisReduction() / 100); int dropMultiplier = getDropMultiplier(); - float debrisYield = yield - debrisReduction; - - for (Block block : blockList) { - BlockState blockState = block.getState(); - - if (BlockUtils.isOre(blockState)) { - ores.add(blockState); - } - //Server bug that allows beacons to be duped when yield is set to 0 - else if(blockState.getType() != Material.BEACON && blockState.getType() != Material.SHULKER_BOX) { - debris.add(blockState); - } - } +// float debrisYield = yield - debrisReduction; for (BlockState blockState : ores) { - if (Misc.getRandom().nextFloat() < (yield + oreBonus)) { - if (!mcMMO.getPlaceStore().isTrue(blockState)) { - xp += Mining.getBlockXp(blockState); - } + if (Misc.getRandom().nextFloat() < (newYieldList.size() + oreBonus)) { + xp += Mining.getBlockXp(blockState); Misc.dropItem(Misc.getBlockCenter(blockState), new ItemStack(blockState.getType())); // Initial block that would have been dropped - if (!mcMMO.getPlaceStore().isTrue(blockState)) { - for (int i = 1; i < dropMultiplier; i++) { - Mining.handleSilkTouchDrops(blockState); // Bonus drops - should drop the block & not the items - } + for (int i = 1; i < dropMultiplier; i++) { + Mining.handleSilkTouchDrops(blockState); // Bonus drops - should drop the block & not the items } } } - if (debrisYield > 0) { - for (BlockState blockState : debris) { - if (Misc.getRandom().nextFloat() < debrisYield) { - Misc.dropItems(Misc.getBlockCenter(blockState), blockState.getBlock().getDrops()); - } - } - } + //Replace the event blocklist with the newYield list + event.blockList().clear(); + event.blockList().addAll(newYieldList); applyXpGain(xp, XPGainReason.PVE); } From 326ff1cd7042bd1cd83cca78e1fd8e56b6b7acc6 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 28 Feb 2020 15:27:57 -0800 Subject: [PATCH 4/7] Update blast mining info in /mining --- Changelog.txt | 1 + .../com/gmail/nossr50/commands/skills/MiningCommand.java | 6 +++--- .../java/com/gmail/nossr50/skills/mining/MiningManager.java | 2 -- src/main/resources/locale/locale_cs_CZ.properties | 2 +- src/main/resources/locale/locale_de.properties | 2 +- src/main/resources/locale/locale_en_US.properties | 2 +- src/main/resources/locale/locale_es.properties | 2 +- src/main/resources/locale/locale_fr.properties | 2 +- src/main/resources/locale/locale_hu_HU.properties | 2 +- src/main/resources/locale/locale_it.properties | 2 +- src/main/resources/locale/locale_ja_JP.properties | 2 +- src/main/resources/locale/locale_ko.properties | 2 +- src/main/resources/locale/locale_lt_LT.properties | 2 +- src/main/resources/locale/locale_pt_BR.properties | 2 +- src/main/resources/locale/locale_ru.properties | 2 +- src/main/resources/locale/locale_th_TH.properties | 2 +- src/main/resources/locale/locale_zh_CN.properties | 2 +- src/main/resources/locale/locale_zh_TW.properties | 2 +- 18 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 119a70065..c4268e7d8 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,7 @@ Version 2.1.118 Fixed another dupe bug Blast Mining no longer reduces debris from explosions due to some issues with the Bukkit API + Modified locale string 'Mining.Blast.Effect' to remove debris reduction mention Version 2.1.117 Fixed a rare http error when polling Mojang for UUIDs diff --git a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java index ee7710aa6..7e7c5d5c6 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java @@ -25,7 +25,7 @@ public class MiningCommand extends SkillCommand { private int bonusTNTDrops; private double blastRadiusIncrease; private String oreBonus; - private String debrisReduction; +// private String debrisReduction; private String blastDamageDecrease; private boolean canSuperBreaker; @@ -47,7 +47,7 @@ public class MiningCommand extends SkillCommand { blastMiningRank = miningManager.getBlastMiningTier(); bonusTNTDrops = miningManager.getDropMultiplier(); oreBonus = percent.format(miningManager.getOreBonus() / 30.0D); // Base received in TNT is 30% - debrisReduction = percent.format(miningManager.getDebrisReduction() / 30.0D); // Base received in TNT is 30% +// debrisReduction = percent.format(miningManager.getDebrisReduction() / 30.0D); // Base received in TNT is 30% blastDamageDecrease = percent.format(miningManager.getBlastDamageModifier() / 100.0D); blastRadiusIncrease = miningManager.getBlastRadiusModifier(); } @@ -86,7 +86,7 @@ public class MiningCommand extends SkillCommand { } if (canBlast) { - messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING)), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); + messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING)), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, bonusTNTDrops))); //messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); } diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 84c5d4145..fba28df36 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -13,8 +13,6 @@ import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.skills.AbilityCooldownTask; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.util.*; -import com.gmail.nossr50.util.blockmeta.HashChunkletManager; -import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager; import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; diff --git a/src/main/resources/locale/locale_cs_CZ.properties b/src/main/resources/locale/locale_cs_CZ.properties index 5136fdad2..bba15218e 100644 --- a/src/main/resources/locale/locale_cs_CZ.properties +++ b/src/main/resources/locale/locale_cs_CZ.properties @@ -159,7 +159,7 @@ Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]M Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Schopnost [[YELLOW]]Super Breaker [[GREEN]]obnovena! Mining.Skillup=Dovednost v dolovani byla navysena o {0}. Celkem ({1}) Mining.Blast.Boom=[[GRAY]]**VYBUCH** -Mining.Blast.Effect=+{0} v\u00fdnos rudy, -{1} v\u00fdnos trosek, {2}x ko\u0159ist +Mining.Blast.Effect=+{0} v\u00fdnos rudy, {1}x ko\u0159ist Mining.Blast.Radius.Increase=Navyseni radiusu vybuchu: [[YELLOW]]+{0} Mining.Blast.Rank=V\u00fdbu\u0161n\u00e9 t\u011b\u017een\u00ed [[YELLOW]] Rank {0}/8 [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] pou\u017eil [[RED]]V\u00fdbu\u0161n\u00e9 T\u011b\u017een\u00ed! diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index 0c11d2e20..4a1fb3f96 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -601,7 +601,7 @@ Mining.Ability.Locked.2 = GESPERRT bis Skill {0}+ (Exp Mining.Ability.Lower = &7**Du senkst deine SPITZHACKE** Mining.Ability.Ready = &a**Deine SPITZHACKE ist bereit** Mining.Blast.Boom = &7**BOOM** -Mining.Blast.Effect = +{0} Erze -{1} Schutt, {2}x Drops +Mining.Blast.Effect = +{0} Erze {1}x Drops Mining.Blast.Other.On = &a{0}&2 benutzte &cZ\u00FCndstoff! Mining.Blast.Refresh = &aDein &eZ\u00FCndstoff &aist wieder bereit! Mining.Listener = Bergbau: diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index e7457ee53..9d2b3ca7a 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -330,7 +330,7 @@ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Your [[YELLOW]]Super Breaker [[GREEN #Blast Mining Mining.Blast.Boom=[[GRAY]]**BOOM** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} ore yield, -{1} debris yield, {2}x drops +Mining.Blast.Effect=+{0} ore yield, {1}x drops Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining! Mining.Blast.Refresh=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed! #REPAIR diff --git a/src/main/resources/locale/locale_es.properties b/src/main/resources/locale/locale_es.properties index 38a2aae5f..ef38d8b78 100644 --- a/src/main/resources/locale/locale_es.properties +++ b/src/main/resources/locale/locale_es.properties @@ -161,7 +161,7 @@ Mining.Skills.SuperBreaker.Other.On=[[GREEN]]\u00a1{0}[[DARK_GREEN]] us\u00f3 [[ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]\u00a1Tu habilidad de [[YELLOW]]S\u00faper Destructor [[GREEN]]est\u00e1 refrescada! Mining.Skillup=Habilidad de Miner\u00eda incrementada en {0}. Total ({1}) Mining.Blast.Boom=[[GRAY]]**BOOM** -Mining.Blast.Effect=+ {0} mineral de rendimiento, - {1} rendimiento de los desechos, {2} x drops +Mining.Blast.Effect=+ {0} mineral de rendimiento, {1} x drops Mining.Blast.Radius.Increase=Incrementado Radio de Explosi\u00f3n: [[YELLOW]]+{0} Mining.Blast.Rank=Miner\u00eda Explosiva: [[YELLOW]] Rango {0}/8 [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]\u00a1{0}[[DARK_GREEN]] us\u00f3 [[RED]]Miner\u00eda Explosiva! diff --git a/src/main/resources/locale/locale_fr.properties b/src/main/resources/locale/locale_fr.properties index 886a7d0ed..8c6eb9a26 100644 --- a/src/main/resources/locale/locale_fr.properties +++ b/src/main/resources/locale/locale_fr.properties @@ -181,7 +181,7 @@ Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] a utilis\u00e9 [[ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Votre comp\u00e9tence [[YELLOW]]Broyeur [[GREEN]]est pr\u00eate ! Mining.Skillup=Le talent Minage augmente de {0}. Total ({1}) Mining.Blast.Boom=[[GRAY]]**BOUM** -Mining.Blast.Effect=+{0} de r\u00e9colte des minerais, -{1} de r\u00e9colte des d\u00e9bris, {2}x les r\u00e9compenses +Mining.Blast.Effect=+{0} de r\u00e9colte des minerais, {1}x les r\u00e9compenses Mining.Blast.Radius.Increase=Rayon d\'explosion : [[YELLOW]]+{0} Mining.Blast.Rank=Minage explosif : [[YELLOW]]Rang {0}/8 [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] a utilis\u00e9 [[RED]]Minage explosif ! diff --git a/src/main/resources/locale/locale_hu_HU.properties b/src/main/resources/locale/locale_hu_HU.properties index d922950b8..fc239ba87 100644 --- a/src/main/resources/locale/locale_hu_HU.properties +++ b/src/main/resources/locale/locale_hu_HU.properties @@ -330,7 +330,7 @@ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]A [[YELLOW]]Szuper T\u00F6r\u00E9s [ #Blast Mining Mining.Blast.Boom=[[GRAY]]**BUMM** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} \u00E9rc hozam, -{1} t\u00F6rmel\u00E9k hozam, {2}x t\u00E1rgy es\u00E9s +Mining.Blast.Effect=+{0} \u00E9rc hozam, {1}x t\u00E1rgy es\u00E9s Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] haszn\u00E1lta a [[RED]]Robbant\u00E1sb\u00E1ny\u00E1szat [[DARK_GREEN]]k\u00E9pess\u00E9get! Mining.Blast.Refresh=[[GREEN]]A [[YELLOW]]Robbant\u00E1sb\u00E1ny\u00E1szat [[GREEN]]k\u00E9pess\u00E9ged ism\u00E9t el\u00E9rhet\u0151! #REPAIR diff --git a/src/main/resources/locale/locale_it.properties b/src/main/resources/locale/locale_it.properties index ceb73350c..7fc89d026 100644 --- a/src/main/resources/locale/locale_it.properties +++ b/src/main/resources/locale/locale_it.properties @@ -338,7 +338,7 @@ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]La tua capacit\u00E0 [[YELLOW]]Super #Blast Mining Mining.Blast.Boom=[[GRAY]]**BOOM** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} minerale raccolto, -{1} macerie prodotte, drop {2}x +Mining.Blast.Effect=+{0} minerale raccolto, drop {1}x Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] ha usato [[RED]]Estrazione Esplosiva! Mining.Blast.Refresh=[[GREEN]]La tua capacit\u00E0 [[YELLOW]]Estrazione Esplosiva [[GREEN]]si \u00E8 rigenerata! diff --git a/src/main/resources/locale/locale_ja_JP.properties b/src/main/resources/locale/locale_ja_JP.properties index 043d0788d..87771d5d3 100644 --- a/src/main/resources/locale/locale_ja_JP.properties +++ b/src/main/resources/locale/locale_ja_JP.properties @@ -322,7 +322,7 @@ Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30 # Blast Mining Mining.Blast.Boom=[[GRAY]]**BOOM** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} ore yield, -{1} debris yield, {2}x \u30c9\u30ed\u30c3\u30d7 +Mining.Blast.Effect=+{0} ore yield, {1}x \u30c9\u30ed\u30c3\u30d7 Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u304c [[RED]]\u30d6\u30e9\u30b9\u30c8\u30de\u30a4\u30cb\u30f3\u30b0 [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01 Mining.Blast.Refresh=[[YELLOW]]\u30d6\u30e9\u30b9\u30c8\u30de\u30a4\u30cb\u30f3\u30b0[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01 diff --git a/src/main/resources/locale/locale_ko.properties b/src/main/resources/locale/locale_ko.properties index fc24f4701..a06114f3b 100644 --- a/src/main/resources/locale/locale_ko.properties +++ b/src/main/resources/locale/locale_ko.properties @@ -211,7 +211,7 @@ Mining.Skillup=\uCC44\uAD11 \uAE30\uC220\uC774 {0} \uC62C\uB77C \uCD1D {1} \uB80 #Blast Mining Mining.Blast.Boom=[[GRAY]]**\uD3ED\uBC1C** -Mining.Blast.Effect=+{0} \uAD11\uBB3C \uC774\uC775, -{1} \uD30C\uD3B8 \uC0B0\uCD9C, {2}x \uB4DC\uB86D +Mining.Blast.Effect=+{0} \uAD11\uBB3C \uC774\uC775, {1}x \uB4DC\uB86D Mining.Blast.Radius.Increase=\uD3ED\uBC1C \uBC18\uACBD \uC99D\uAC00: [[YELLOW]]+{0} Mining.Blast.Rank=\uD3ED\uBC1C \uCC44\uAD74: [[YELLOW]]{0}/8\uB7AD\uD06C [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\uB2D8\uC740 [[RED]]\uD3ED\uBC1C \uCC44\uAD74\uC744 \uC0AC\uC6A9\uD558\uC168\uC2B5\uB2C8\uB2E4! diff --git a/src/main/resources/locale/locale_lt_LT.properties b/src/main/resources/locale/locale_lt_LT.properties index b8593a1a5..03296ff8a 100644 --- a/src/main/resources/locale/locale_lt_LT.properties +++ b/src/main/resources/locale/locale_lt_LT.properties @@ -330,7 +330,7 @@ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Your [[YELLOW]]Super Breaker [[GREEN #Blast Mining Mining.Blast.Boom=[[GRAY]]**BOOM** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} ore yield, -{1} debris yield, {2}x drops +Mining.Blast.Effect=+{0} ore yield, {1}x drops Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining! Mining.Blast.Refresh=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed! #REPAIR diff --git a/src/main/resources/locale/locale_pt_BR.properties b/src/main/resources/locale/locale_pt_BR.properties index 1d9484e1e..95c800825 100644 --- a/src/main/resources/locale/locale_pt_BR.properties +++ b/src/main/resources/locale/locale_pt_BR.properties @@ -194,7 +194,7 @@ Mining.Skillup=[[YELLOW]]Habilidade de Mineracao foi aumentada para {0}. Total ( #Mineracao Explosiva Mining.Blast.Boom=[[GRAY]]**BOOM** -Mining.Blast.Effect=+{0} Rendimento de Minerios, -{1} Prejuizo de Detritos, {2}x drops +Mining.Blast.Effect=+{0} Rendimento de Minerios, {1}x drops Mining.Blast.Radius.Increase=[[RED]]Aumento no Raio de explosao: [[YELLOW]]+{0} Mining.Blast.Rank=[[RED]]Mineracao Explosiva: [[YELLOW]] Rank {0}/{1} [[GRAY]]({2}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] usou [[RED]]Mineracao Explosiva! diff --git a/src/main/resources/locale/locale_ru.properties b/src/main/resources/locale/locale_ru.properties index c80d5e8b4..2710d8151 100644 --- a/src/main/resources/locale/locale_ru.properties +++ b/src/main/resources/locale/locale_ru.properties @@ -290,7 +290,7 @@ Mining.Skillup=\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043d\u0430\u0432\u04 #Blast Mining Mining.Blast.Boom=[[GRAY]]**\u0411\u0423\u041c** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} \u0440\u0443\u0434\u044b, -{1} \u043c\u0443\u0441\u043e\u0440\u0430, {2}x \u0434\u0440\u043e\u043f +Mining.Blast.Effect=+{0} \u0440\u0443\u0434\u044b, {1}x \u0434\u0440\u043e\u043f Mining.Blast.Radius.Increase=\u0420\u0430\u0434\u0438\u0443\u0441 \u0412\u0437\u0440\u044b\u0432\u0430 \u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d: [[YELLOW]]+{0} Mining.Blast.Rank=\u041f\u043e\u0434\u0440\u044b\u0432\u043d\u0430\u044f \u0414\u043e\u0431\u044b\u0447\u0430: [[YELLOW]] \u0420\u0430\u043d\u0433 {0}/8 [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0443\u043c\u0435\u043d\u0438\u0435 [[RED]]\"\u041f\u043e\u0434\u0440\u044b\u0432\u043d\u0430\u044f \u0414\u043e\u0431\u044b\u0447\u0430\"! diff --git a/src/main/resources/locale/locale_th_TH.properties b/src/main/resources/locale/locale_th_TH.properties index 402daeb04..003fd5246 100644 --- a/src/main/resources/locale/locale_th_TH.properties +++ b/src/main/resources/locale/locale_th_TH.properties @@ -159,7 +159,7 @@ Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u0e44\u0e14\u0e4 Mining.Skills.SuperBreaker.Refresh=[[GREEN]]\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e23\u0e16\u0e17\u0e31\u0e01\u0e29\u0e30 [[YELLOW]]Super Breaker [[GREEN]]\u0e04\u0e39\u0e25\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27! Mining.Skillup=\u0e17\u0e31\u0e01\u0e29\u0e30 Mining \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e36\u0e49\u0e19 {0}. \u0e21\u0e35\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 ({1}) Mining.Blast.Boom=[[GRAY]]**BOOM** -Mining.Blast.Effect=+{0} \u0e1c\u0e25\u0e1c\u0e25\u0e34\u0e15\u0e41\u0e23\u0e48, -{1} \u0e1c\u0e25\u0e1c\u0e25\u0e34\u0e15\u0e40\u0e28\u0e29, {2}x \u0e14\u0e23\u0e2d\u0e1b +Mining.Blast.Effect=+{0} \u0e1c\u0e25\u0e1c\u0e25\u0e34\u0e15\u0e41\u0e23\u0e48, {1}x \u0e14\u0e23\u0e2d\u0e1b Mining.Blast.Radius.Increase=\u0e23\u0e31\u0e28\u0e21\u0e35\u0e02\u0e2d\u0e07\u0e23\u0e30\u0e40\u0e1a\u0e34\u0e14\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e36\u0e49\u0e19: [[YELLOW]]+{0} Mining.Blast.Rank=\u0e17\u0e31\u0e01\u0e29\u0e30 Blast Mining: [[YELLOW]] \u0e23\u0e30\u0e14\u0e31\u0e1a {0}/8 [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u0e44\u0e14\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e31\u0e01\u0e29\u0e30 [[RED]]Blast Mining! diff --git a/src/main/resources/locale/locale_zh_CN.properties b/src/main/resources/locale/locale_zh_CN.properties index f3414e3b1..f1473c859 100644 --- a/src/main/resources/locale/locale_zh_CN.properties +++ b/src/main/resources/locale/locale_zh_CN.properties @@ -330,7 +330,7 @@ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]\u4f60\u7684 [[YELLOW]]\u8d85\u7ea7\ #Blast Mining Mining.Blast.Boom=[[GRAY]]**\u5623** Mining.Blast.Cooldown= -Mining.Blast.Effect=+{0} \u77ff\u7269\u91cf, -{1} \u788e\u7247\u91cf, {2}x \u6389\u843d +Mining.Blast.Effect=+{0} \u77ff\u7269\u91cf, {1}x \u6389\u843d Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u4f7f\u7528\u4e86 [[RED]]\u7206\u7834\u5f00\u91c7! Mining.Blast.Refresh=[[GREEN]]\u4f60\u7684 [[YELLOW]]\u7206\u7834\u5f00\u91c7 [[GREEN]]\u6280\u80fd\u53ef\u4ee5\u4f7f\u7528\u4e86! #REPAIR diff --git a/src/main/resources/locale/locale_zh_TW.properties b/src/main/resources/locale/locale_zh_TW.properties index e6f7a9b8d..85b97acea 100644 --- a/src/main/resources/locale/locale_zh_TW.properties +++ b/src/main/resources/locale/locale_zh_TW.properties @@ -165,7 +165,7 @@ Mining.Skills.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u4f7f\u7528\u4e8 Mining.Skills.SuperBreaker.Refresh=[[GREEN]]\u4f60\u7684[[YELLOW]] \u8d85\u7d1a\u788e\u77f3\u6a5f [[GREEN]]\u80fd\u529b\u5df2\u53ef\u518d\u6b21\u4f7f\u7528\uff01 Mining.Skillup=\u6316\u7926\u6280\u80fd\u4e0a\u5347\u4e86 {0}! \u7e3d\u7b49\u7d1a ({1})! Mining.Blast.Boom=[[GRAY]]**\u78b0!** -Mining.Blast.Effect=+{0} \u7926\u7269\u7522\u91cf, -{1}\u5783\u573e\u7522\u91cf, {2}x \u6389\u843d\u91cf +Mining.Blast.Effect=+{0} \u7926\u7269\u7522\u91cf, {1}x \u6389\u843d\u91cf Mining.Blast.Radius.Increase=\u7206\u70b8\u534a\u5f91\u63d0\u5347: [[YELLOW]]+{0} Mining.Blast.Rank=\u6316\u7926\u7206\u767c: [[YELLOW]] \u6392\u540d {0}/8 [[GRAY]]({1}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u4f7f\u7528\u4e86 [[RED]]\u6316\u7926\u7206\u767c! From 12abd68adde9b0529fa695806c12806544aff702 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 28 Feb 2020 15:43:32 -0800 Subject: [PATCH 5/7] Rupture fires a FakeEntityDamageByEntityEvent fixes #4122 --- Changelog.txt | 2 +- .../com/gmail/nossr50/runnables/skills/BleedTimerTask.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index c4268e7d8..276222851 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -2,12 +2,12 @@ Version 2.1.118 Fixed another dupe bug Blast Mining no longer reduces debris from explosions due to some issues with the Bukkit API Modified locale string 'Mining.Blast.Effect' to remove debris reduction mention + Rupture now fires a FakeEntityDamageByEntityEvent before damaging its victims (cancelling it will be ignored) Version 2.1.117 Fixed a rare http error when polling Mojang for UUIDs Fixed a bug that allowed duping - Version 2.1.116 Fixed directional plants not maintaining their direction when replanted diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java index 3fa01dd57..e8b283bff 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java @@ -2,6 +2,7 @@ package com.gmail.nossr50.runnables.skills; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; +import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.MobHealthbarUtils; import com.gmail.nossr50.util.player.NotificationManager; @@ -12,6 +13,7 @@ import com.gmail.nossr50.util.sounds.SoundType; import org.bukkit.Bukkit; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; +import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.scheduler.BukkitRunnable; @@ -115,6 +117,10 @@ public class BleedTimerTask extends BukkitRunnable { // debugMessage+="TargetHealthBeforeDMG=["+String.valueOf(target.getHealth())+"], "; + //Fire a fake event + FakeEntityDamageByEntityEvent fakeEntityDamageByEntityEvent = (FakeEntityDamageByEntityEvent) CombatUtils.sendEntityDamageEvent(containerEntry.getValue().damageSource, target, EntityDamageEvent.DamageCause.CUSTOM, damage); + Bukkit.getPluginManager().callEvent(fakeEntityDamageByEntityEvent); + CombatUtils.dealNoInvulnerabilityTickDamageRupture(target, damage, containerEntry.getValue().damageSource, toolTier); double victimHealthAftermath = target.getHealth(); From c2bbe33fe80973b19fa4243bef90bf77dc6d20ba Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 28 Feb 2020 15:44:22 -0800 Subject: [PATCH 6/7] 2.1.118 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fce0727f7..546a2c345 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.118-SNAPSHOT + 2.1.118 mcMMO https://github.com/mcMMO-Dev/mcMMO From 31a98791f3f044f9eb5f409ee8199d6328d0639d Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 28 Feb 2020 15:48:48 -0800 Subject: [PATCH 7/7] dev mode --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 546a2c345..6ab9046ff 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.118 + 2.1.119-SNAPSHOT mcMMO https://github.com/mcMMO-Dev/mcMMO