Better message for items not found in current version of MC from Fishing Config

This commit is contained in:
nossr50 2020-12-28 16:58:57 -08:00
parent 31e0f1e4da
commit 8b62c0b693
2 changed files with 10 additions and 8 deletions

View File

@ -3,24 +3,25 @@ Version 2.1.164
Fishing treasures have been moved from treasures.yml -> fishing_treasures.yml, you'll have to copy over your changes and be aware that Records rarity is now Mythic Fishing treasures have been moved from treasures.yml -> fishing_treasures.yml, you'll have to copy over your changes and be aware that Records rarity is now Mythic
Mythic rarity (formerly known as Records) now allows for Enchantments to be applied to drops (See Notes) Mythic rarity (formerly known as Records) now allows for Enchantments to be applied to drops (See Notes)
Added all Netherite gear to the Mythic tier in fishing_treasures.yml Added all Netherite gear to the Mythic tier in fishing_treasures.yml
Added Enchanted Books to fishing loot tables Added Enchanted Books to fishing_treasures.yml as Mythic rarity (can drop with any legal enchantment - see notes)
New exploit fix setting 'PreventPluginNPCInteraction' which defaults to true, when disabled it will allow combat interactions with "NPC" entities from plugins like Citizens New exploit fix setting 'PreventPluginNPCInteraction' which defaults to true, when disabled it will allow combat interactions with "NPC" entities from plugins like Citizens
ExploitFix.PreventPluginNPCInteraction Added to experience.yml ExploitFix.PreventPluginNPCInteraction Added to experience.yml
Modified locale string 'Fishing.SubSkill.TreasureHunter.Stat.Extra' in existing locale files Modified locale string 'Fishing.SubSkill.TreasureHunter.Stat.Extra' in existing locale files
You can now define a whitelist of enchants or a blacklist of enchants for an Enchanted_Book entry in fishing_treasures.yml, see notes for an example You can now define a whitelist of enchants or a blacklist of enchants for an Enchanted_Book entries in fishing_treasures.yml, see notes for an example
NOTES: NOTES:
The rarity known as Records was odd to me, if you got the best possible drop it was always going to be a Records drop, and by default the Records tier had only music records. It was treated differently in the code as well, for example Records drops never had enchantments applied to them. So you could add say NETHERITE_ARMOR to them in your user config and it would never put enchantments on it, that seemed very odd to me. The rarity known as 'Records' was odd to me, if you got the best possible drop it was always going to be a Music Record drop (using the default mcMMO treasure list), and by default the Records tier had only music records. It was treated differently in the code as well, for example Records drops never had enchantments applied to them. So you could add say NETHERITE_ARMOR to them in your user config and it would never put enchantments on it, that seemed very odd to me.
As a response to this, I've renamed Records as Mythic, I've moved the records into varying tiers, you'll start getting them much earlier now. I've also added Netherite and Enchanted Books to the Mythic tier. As a response to this, I've renamed Records as Mythic, I've moved the records into varying tiers, you'll start getting them much earlier now. I've also added Netherite and Enchanted Books to the Mythic tier.
Enchanted Books have been added to Fishing loot, this is a basic hacky work around until the config update comes. Enchanted books can have any legal enchant. Enchanted Books have been added to Fishing loot, this is a basic hacky work around until the config update comes. Enchanted books can have any legal enchant.
When talking about NPCs in the below notes, I am referring to "Fake" Players used in plugins such as Citizens, not Villagers from Vanilla Minecraft or anything labeled NPC in another plugin which does not constitute a "Fake Player"
Historically mcMMO has checked an entity for being a Fake-Player-NPC and backed out of any interaction, this was originally done because of Fake-Player-NPCs that were meant to be invincible/etc and not give XP
However nowadays what a Fake-Player-NPC is used for is pretty loose, mcMMO only has definitions for some NPCs (such as from Citizens) it doesn't know about most Fake-Player-NPCs in most plugins unless they identify themselves in a similar way to the predefined parameters
Leave this new exploit fix setting on true unless you understand the implications
Here is an example of using the whitelist or blacklist for an Enchanted_Book entry in fishing_treasures.yml Here is an example of using the whitelist or blacklist for an Enchanted_Book entry in fishing_treasures.yml
https://gist.github.com/nossr50/4e15b8ba6915b5a5f516eccfba2d7169 https://gist.github.com/nossr50/4e15b8ba6915b5a5f516eccfba2d7169
If you can't load this image, at the address of your treasure for example, at Fishing.Enchanted_Book.Enchantments_Blacklist: you define a list (which must follow yaml spec, google yaml linter) of enchants to disallow, likewise at Fishing.Enchanted_Book.Enchantments_Whitelist you can setup a whitelist, if neither is defined then the book can spawn with all possible enchants, if both are defined the whitelist is used instead of the blacklist If you can't load this image, at the address of your treasure for example, at Fishing.Enchanted_Book.Enchantments_Blacklist: you define a list (which must follow yaml spec, google yaml linter) of enchants to disallow, likewise at Fishing.Enchanted_Book.Enchantments_Whitelist you can setup a whitelist, if neither is defined then the book can spawn with all possible enchants, if both are defined the whitelist is used instead of the blacklist
When talking about NPCs in the below notes, I am referring to "Fake" Players used in plugins such as Citizens, not Villagers from Vanilla Minecraft or anything labeled NPC in another plugin which does not constitute a "Fake Player"
Historically mcMMO has checked an entity for being a Fake-Player-NPC and backed out of any interaction, this was originally done because of Fake-Player-NPCs that were meant to be invincible/etc and not give XP
However nowadays what a Fake-Player-NPC is used for is pretty loose, mcMMO only has definitions for some NPCs (such as from Citizens) it doesn't know about most Fake-Player-NPCs in most plugins unless they identify themselves in a similar way to the predefined parameters
Leave this new exploit fix setting on true unless you understand the implications
Version 2.1.163 Version 2.1.163
Fixed the translate URL pointing to the wrong place (thanks chew) Fixed the translate URL pointing to the wrong place (thanks chew)

View File

@ -137,7 +137,8 @@ public class FishingTreasureConfig extends ConfigLoader {
short data = (treasureInfo.length == 2) ? Short.parseShort(treasureInfo[1]) : (short) config.getInt(type + "." + treasureName + ".Data"); short data = (treasureInfo.length == 2) ? Short.parseShort(treasureInfo[1]) : (short) config.getInt(type + "." + treasureName + ".Data");
if (material == null) { if (material == null) {
reason.add("Invalid material: " + materialName); reason.add("Cannot find matching item type in this version of MC, skipping - " + materialName);
continue;
} }
if (amount <= 0) { if (amount <= 0) {