Farming aggressive mobs is important on all worlds because of the resources they give upon being killed. On vanilla worlds, players will have a relatively easy time so long as they carry a stack of food to heal if things go wrong. However, on custom worlds set to hard, aggressive mobs become deadly, to the extreme if the world is one-hit kill.
Below, I have described with photos the steps one can take to avoid taking a single hit from aggressive mobs, so that one can farm them on hard, one-hit kill worlds without issue.
Dropbear: Ember Method
Your setup should look like this. Make sure the blocks surrounding the compost are two blocks above it. This is necessary because dropbears cannot climb two block high walls.
This is what your setup should look like after planting the tree.
Set the wood part of the tree on fire with the ember. It’s important to make sure your Blockhead can reach it without moving from its spot. If a dropbear drops into the fire block, it will die and turn into leather and fur.
Chop the block below the fire block. Like above, it’s important to make sure the Blockhead will not have to move to chop the block.
Dropbear: Without Embers Method
Unlike the above, this method does not require the usage of embers, and instead relies on the dropbear AI where it will not attack blockheads that hangs on the block below it.
Your structure should look like this. Make sure that your blockhead will hang off the side of the block instead of standing.
Chop the tree down. Some more experienced players will be able to run across the block to get the dropbear to drop down without having to chop the tree, but this is risky. Notice how the dropbear will not attack if your blockhead hangs off the block.
You can then hit the dropbear with your fist or another weapon. It will not be able to attack so long as you hang off the block.
Your structure should look like this. Notice how your Blockhead will not be attacked at that height.
This is the minimum height you will need, or else your Blockhead will be attacked.
Pour a bucket of water into the enclosure, or place the ice above the gap.
The scorpion will drown, allowing you to safely collect the poison.
Sharks are dangerous because they will actively seek out blockheads, even on vanilla worlds. The structure exploits this part of their AI; normally, the shark will not enter a 1 block gap of water because it will not be able to get out. However, if it senses a blockhead near it, it will jump into that gap, and become stuck. This allows you to hit it without fear of it swimming away or attacking.
Your structure should look like this. Make sure there are one block gaps of water at the top. I have placed the kilns because heat makes larger sharks; they are not necessary.
Stand on one of the blocks.
You can then hit the sharks at your leisure. The sharks will be unable to move away or attack.