mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Allow vanilla block interaction with sneak if the block is set to be a mcMMO repair/salvage anvil
This commit is contained in:
parent
d9f98b1aa9
commit
3c9c8556dd
@ -1,4 +1,5 @@
|
|||||||
Version 2.1.164
|
Version 2.1.164
|
||||||
|
mcMMO will now let players use vanilla blocks that have interactions (such as the vanilla Anvil) which are assigned as either Repair or Salvage blocks if a player is sneaking (see notes)
|
||||||
The Rarity known as Records has been renamed to Mythic
|
The Rarity known as Records has been renamed to 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
|
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)
|
||||||
@ -10,6 +11,7 @@ Version 2.1.164
|
|||||||
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
|
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:
|
||||||
|
If you only ran mcMMO on your server you'd have no way to use Enchanted Books if you set the repair anvil to the vanilla anvil, so now you can sneak to open up its menu.
|
||||||
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.
|
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.
|
||||||
|
@ -616,8 +616,8 @@ public class PlayerListener implements Listener {
|
|||||||
if(clickedBlockType == Repair.anvilMaterial || clickedBlockType == Salvage.anvilMaterial) {
|
if(clickedBlockType == Repair.anvilMaterial || clickedBlockType == Salvage.anvilMaterial) {
|
||||||
event.setUseItemInHand(Event.Result.ALLOW);
|
event.setUseItemInHand(Event.Result.ALLOW);
|
||||||
|
|
||||||
if(mcMMO.getMaterialMapStore().isToolActivationBlackListed(clickedBlockType)) {
|
if(!event.getPlayer().isSneaking() && mcMMO.getMaterialMapStore().isToolActivationBlackListed(clickedBlockType)) {
|
||||||
event.setUseInteractedBlock(Event.Result.DENY);
|
event.setUseInteractedBlock(Event.Result.DENY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user