PowerMining
PowerMining
This plugin adds 2 new item types to the game: Hammer and Excavator
These were inspired by mDiyo's Tinker's Construct items of the same name
Source is included in the jar file and can also be found here.
Items
Both the Hammer and Excavator will dig in a 3x3 area around the target block
They take the block face in consideration to determine the breaking direction/pattern
You can sneak while breaking the block to make it work like a normal pickaxe/shovel
The Base Item determines what can be mined/dug and they won't break blocks if they are going to be destroyed and not drop anything
Hammer
- The Hammer is a mining tool much like the Pickaxe, and uses that as a base item for it's crafting
Excavator
- The Excavator is a digging tool much like the Shovel, and uses that as a base item for it's crafting
Crafting Recipes
Basic Shape:
M MIM M
Where:
M = Material
I = Base Item
Base Item | Material | Result |
---|---|---|
Wooden Pickaxe/Shovel | Wood Log | Wooden Hammer/Excavator |
Stone Pickaxe/Shovel | Smooth Stone | Stone Hammer/Excavator |
Iron Pickaxe/Shovel | Iron Ingot | Iron Hammer/Excavator |
Golden Pickaxe/Shovel | Gold Ingot | Golden Hammer/Excavator |
Diamond Pickaxe/Shovel | Diamond | Diamond Hammer/Excavator |
Commands
At this moment, there are no available commands for this plugin
Permissions
As of version 2.6.2, the permissions were rewritten to give a much deeper control over what can/can't be done.
- powermining.* : Grants all permissions (default: op)
- powermining.highdurability: Allows player's Hammers/Excavators to use only 1 durability per use (default: true)
- powermining.craft.* : Allows players to craft the Hammer and Excavator tools (default: op)
- powermining.craft.hammer.* : Allows players to craft all hammers (default: op)
- powermining.craft.hammer.wood: Allows players to craft the Wooden Hammer (default: false)
- powermining.craft.hammer.stone: Allows players to craft the Stone Hammer (default: false)
- powermining.craft.hammer.iron: Allows players to craft the Iron Hammer (default: false)
- powermining.craft.hammer.gold: Allows players to craft the Golden Hammer (default: false)
- powermining.craft.hammer.diamond: Allows players to craft the Diamond Hammer (default: false)
- powermining.craft.excavator.* : Allows players to craft all excavators (default: op)
- powermining.craft.excavator.wood: Allows players to craft the Wooden Excavator (default: false)
- powermining.craft.excavator.stone: Allows players to craft the Stone Excavator (default: false)
- powermining.craft.excavator.iron: Allows players to craft the Iron Excavator (default: false)
- powermining.craft.excavator.gold: Allows players to craft the Golden Excavator (default: false)
- powermining.craft.excavator.diamond: Allows players to craft the Diamond Excavator (default: false)
- powermining.craft.hammer.* : Allows players to craft all hammers (default: op)
- powermining.use.* : Allows players to use the Hammer and Excavator tools (default: op)
- powermining.use.hammer.* : Allows players to use all hammers (default: op)
- powermining.use.hammer.wood: Allows players to use the Wooden Hammer (default: false)
- powermining.use.hammer.stone: Allows players to use the Stone Hammer (default: false)
- powermining.use.hammer.iron: Allows players to use the Iron Hammer (default: false)
- powermining.use.hammer.gold: Allows players to use the Golden Hammer (default: false)
- powermining.use.hammer.diamond: Allows players to use the Diamond Hammer (default: false)
- powermining.use.excavator.* : Allows players to use all excavators (default: op)
- powermining.use.excavator.wood: Allows players to use the Wooden Excavator (default: false)
- powermining.use.excavator.stone: Allows players to use the Stone Excavator (default: false)
- powermining.use.excavator.iron: Allows players to use the Iron Excavator (default: false)
- powermining.use.excavator.gold: Allows players to use the Golden Excavator (default: false)
- powermining.use.excavator.diamond: Allows players to use the Diamond Excavator (default: false)
- powermining.use.hammer.* : Allows players to use all hammers (default: op)
- powermining.enchant.* : Allows players to enchant the Hammer and Excavator tools (default: op)
- powermining.enchant.hammer.* : Allows players to enchant all hammers (default: op)
- powermining.enchant.hammer.wood: Allows players to enchant the Wooden Hammer (default: false)
- powermining.enchant.hammer.stone: Allows players to enchant the Stone Hammer (default: false)
- powermining.enchant.hammer.iron: Allows players to enchant the Iron Hammer (default: false)
- powermining.enchant.hammer.gold: Allows players to enchant the Golden Hammer (default: false)
- powermining.enchant.hammer.diamond: Allows players to enchant the Diamond Hammer (default: false)
- powermining.enchant.excavator.* : Allows players to enchant all excavators (default: op)
- powermining.enchant.excavator.wood: Allows players to enchant the Wooden Excavator (default: false)
- powermining.enchant.excavator.stone: Allows players to enchant the Stone Excavator (default: false)
- powermining.enchant.excavator.iron: Allows players to enchant the Iron Excavator (default: false)
- powermining.enchant.excavator.gold: Allows players to enchant the Golden Excavator (default: false)
- powermining.enchant.excavator.diamond: Allows players to enchant the Diamond Excavator (default: false)
- powermining.enchant.hammer.* : Allows players to enchant all hammers (default: op)
The group nodes also have alternate names:
- powermining.craft.all
- powermining.craft.hammer.all
- powermining.craft.excavator.all
- powermining.use.all
- powermining.use.hammer.all
- powermining.use.excavator.all
- powermining.enchant.all
- powermining.enchant.hammer.all
- powermining.enchant.excavator.all
Please note that the enchant permission affects both enchantment tables and anvils (when applying books or trying to combine 2 power tools)
Installation
Simply put the jar file into your plugins folder
Configuration
Right now the config.yml file has the following values that can be changed:
- useDurabilityPerBlock
- Description: Determines if durability is reduced with each broken block
- Default: False
- Version: 2.2
- Minable
- Description: Define the blocks that can be mined by the hammer, and which quality of base pickaxe is needed (these are set according to the information on the minecraft wiki)
- Version: 2.7.5
- Type: Nested list
- Diggable
- Description: Define the blocks that can be dug by the excavator
- Version: 2.7.5
- Type: Simple list
To add something to the Diggable list, just add a new list row to the existing list:
Diggable: - NEW_BLOCK
To add something to the Minable list, you need to add the target block as a new list row, but you also need to specify a list of pickaxes that can mine it:
Minable: - IRON_BLOCK: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
In case you want all hammers to be able to mine the specific block, use [any]
It's important to note that even if you only want one pickaxe to be able to mine it, it needs to be inside the list (look at the obsidian definition)
Anti-Grief
This plugin accounts for terrains protected by:
- Version 2.4
- GriefPrevention (tested on v7.8-beta)
- WorldGuard (tested on v5.8)
- Version 2.6
- Towny (tested on v0.84.0.7)
- Towny (tested on v0.84.0.7)
Spotlights
Quick spotlight showing the basic crafting and usage of the tools by VariationVault
Well explained spotlight by FeerBreezy (Spanish)
Spotlight by AbsintoJ (Brazilian Portuguese)
Observations
I've contacted mDiyo on minecraftforum and he has no problem with this plugin being inspired by his tools.
This is my first plugin/mod as well as my first Java program, there might be bugs in the code. Let me know if you find any.
Also, can you add permission to use it? if player has no this permission, tool should work as normal shovel/pickaxe.
@MinecraftAdmin
I'm checking out their API right now, hopefully I can make that work for the next version :)
@bloodyshade Is Towny protection planned?
@Mellelmejor
Yes, I was thinking about that too, as a matter of fact I just finished implementing and testing it here, I will be pushing the new version to bitbucket and will upload the jar file here soon.
I think you can add permissions to craft the items
@bloodyshade
Sorry, I meant using lapiz as a material to make them without adding any effects, I was just suggesting something that was implemented in TC.
@todicus
I meant new recipes for the crafting of the items themselves.
I don't mean to turn this into a copy of TC, this is really just meant to add those items to facilitate mining.
That is why I don't feel like it's the right move to make materials add new abilities to them.
Another thing is, bukkit's Block.breakNaturally() doesn't account for enchantments on items, so I'd need to create special handlers for silk touch and fortune, only the target block has those applied to it.
I would rather create new BlockBreakEvent's and call them for all the surrounding blocks, but it seems like bukkit doesn't allow nesting events (creating and calling events inside other events).
@bloodyshade
As far as the alternative recipe idea goes, perhaps using lapiz, as in TC they add fortune i believe. This would give you a reason to mine lapiz other than for decorative/dying purposes.
hmm.. yep never did the math before, but put this way it sounds pretty reasonable ;)
still, already with that it goes way faster... thought about doing it with an editor, but it just aint the same... this way its just a little speedup rather than "plain cheating". still have to deal with all the usual mining problems, just can hollow faster trough blocks
thx, keep up the good work :)
@thief001
Glad you like it :)
About your suggestions, I thought about it, but decided against it for 2 reasons.
1) These tools aren't really meant to become mining bores.
2) I would need to make an expansive algorithm to find the blocks on the given radius, and this could become rather heavy on the server.
Imagine you have 50 players on your server, and a 5x5 width/height for the tools, they all decide to go mining, that's 25 blocks having to be checked and turned into entities (once they drop). And that is for each block they break, for each person.
So you have 50 * (5*5) = 1250 blocks being checked and turning into entities per broken block.
For those reasons I decided not to implement this kind of algorithm.
running the plugin, all fine.. makes hollowing out huge subplanetary railroads allot easier :)
any chance we see an option in the config to define the working radius? as my train tunnels are 5 blocks with and high ;)
@todicus
I had that code in place at one time, but that made the items break extremely fast, I will look into implementing a config option to allow that, thanks.
@AndaleTheGreat
Yes the recipes are a bit too easy for now, I'm trying to come up with a better design for them.
About the durability, while this is inspired by TC, it isn't really looking into becoming it, meaning I don't really want materials to increase the durability of the resulting item (like the rods do in TC)
Thanks for the support.
I disagree with recipe myself. I think you should include something extra in the corners. Maybe make a custom recipe instead that makes a hammer head (with in ingot as the icon) or 5 iron (helmet shape) on two sticks.
@todicus
If a vanilla iron pick is 251 then durability should become 2.3x (assuming per iron cost is the base of durability) times higher which gives you 577. This assumes his pick detects the number of blocks his pick is breaking. If not then I'd leave it as vanilla durability.
The problem is the shovel becomes 5x the durability if using this method. In this case maybe it would be better to increase each tools durability to a set amount.
Great plugin, especially for your first. My one suggestion would be to decrease the durability by the 9 per excavator/hammer use; as the tools seem to over powered. Alternatively a config to change this would be awesome.