Resource Hogs
This mod introduces special resource-gathering pigs that help players obtain various resources. The mod is primarily intended for modpack creators, providing them with the ability to configure which specific resources can be obtained through these creatures, as well as modify their characteristics.
How to Use the Mod
Resource hogs are modified pigs associated with a specific resource. There are two main ways to obtain resources from these creatures:
-
Killing the pig - this drops bacon that can be converted into the corresponding resource. By default, one to three pieces of bacon drop, each equivalent to one input resource.
-
Finding truffles - if the pig is in a suitable dimension and standing on a block it can dig, it will start digging up truffles. These truffles can be turned into resources without killing the animal. Typically, four truffles equal one input resource.
To get a resource hog, you need a regular pig and a bucket of mud. By default, a bucket of mud is crafted from a water bucket, a piece of dirt, and one of the input resources. Applying the bucket of mud to the pig starts the transformation process. You can also use a spawn egg, but this option may not be available in your modpack.
Useful Tips
-
Speed potions - applying speed potions to a resource hog makes it dig faster and find more truffles. Higher speed levels further accelerate the process: speed 1 doubles digging speed, and speed 2 triples it.
-
Digging conditions - truffles can only be dug up if the space above the digging spot is empty. The pig must be in the correct dimension and standing on a suitable digging block.
-
Automation - truffles automatically break if the block beneath them is removed. This allows using pistons and other mechanisms to automate the collection process.
Mod Configuration
Available resource hog types are loaded from JSON files that the modpack creator must create. These files are placed in the config/resourcehogs/types folder.
Here's a brief description of available configuration parameters:
- id - resource identifier. Must be lowercase and unique for each resource type. Must match the file name.
- inputs - array of various items that can be used to create a resource hog. You can use
ore:oreDictNameto specify items from the ore dictionary ormod:item:metafor specific items. - output - item that this resource produces. Should be specified in
mod:item:metaformat. - diggableBlocks - defines which blocks the pig can dig in. Array of blocks in
mod:id:metaformat. - renderBlock - block that will be displayed on the pig. Format
mod:id:meta. - validDimensions - array of dimension IDs where the pig can dig.
- maxHealth - amount of health the pig has.
- movementSpeed - normal movement speed.
- armorAmount - amount of armor protection.
- digTickDelay - time in ticks required to dig up one truffle.
Compatibility with Tinkers Construct
The mod automatically supports Tinkers Construct. If a resource type is created and the output item has a smelting recipe, the player can smelt bacon and truffles under the same conditions. For example, if you create a resource type with an iron ingot as output, in Tinkers Construct you can smelt truffles and bacon into molten iron. By default, 1 bacon smelts into the same amount of fluid as the output item, and truffles produce 1/4 of that amount.