Pig Tractors: Difference between revisions

Update to 1.16 version features
(Update to 1.16 version features)
Line 4: Line 4:


== Features ==
== Features ==
Any saddled pig can be used as a Pig Tractor. The player must have a hoe somewhere in their inventory while riding the pig to activate the features.


The module has the following features (runs in this order):
=== How to use ===
* Breaks carrots, wheat, beetroot, netherwart and potatoes that are driven through and puts them in the player's inventory
Any saddled pig is considered a Pig Tractor. To steer the Pig Tractor a Carrot on a Stick may be used. Holding a hoe of any kind in the main- or offhand enabled the "Tilling" feature.  
* Tills dirt that is driven over
* Plants wheat seeds, nether wart, carrots, beetroot seeds, and potatoes if the player drives over tilled soil (or soul sand for nether wart) with nothing growing in it yet.


Crops are only planted automatically if the player has seeds, carrots, beetroot seeds, netherwart, or potatoes in their inventory. Every crop planted will remove one of that crop from the player's inventory. If the player breaks a crop with a Pig Tractor, the same crop will be planted at that location.
==== Tilling ====
A Pig Tractor can till grass blocks, dirt or coarse dirt. To enable this feature, the player on the Pig Tractor '''must hold a hoe''' in their main- or offhand. Tilling soil has a chance to drop loot depending on the block tilled and produces a fully moisturized block of farmland.


When running over empty farmland, Pig Tractors will prioritize planting the item the player is holding first, then the item in the offhand, before checking the rest of the inventory.
==== Harvesting ====
Pig Tractors will automatically harvest crops when driven through. Upon harvesting, the Pig Tractor will try to replant the crop - provided the player has seeds for the crop in their inventory. If the player does not have seeds for the harvested crop type in their inventory the Pig Tractor will fall back to the default planting rules (see below).
 
==== Planting ====
When a Pig Tractor is driven over '''empty''' farmland it will try to plant crops from the player's inventory. Pig Tractor will prioritize seed-like items that are in the players mainhand over seed-like items that are in the offhand. If the player is not holding any seed-like item in their hands, the Pig Tractor will use seed-like items from the player's inventory instead.  


=== Technical Details ===
=== Technical Details ===
{| class="mw-collapsible mw-collapsed"
{| class="mw-collapsible mw-collapsed"
|+ class="nowrap" style="text-align:left; " | If a player is not holding a crop type in their main or off hand and has multiple crop types in their<br>inventory while planting crops on empty farmland, then crops will take priority in the following order:
|+ class="nowrap" style="text-align:left; " | If a player is not holding a crop type in their main or off hand and has multiple crop types in their<br>inventory while planting crops on empty farmland, then crops will take priority in alphabetical order based on their item id:
|{{Stack|Carrot}} Carrots
|{{Stack|Carrot}}Beetroot Seeds
|-
|-
|{{Stack|Potato}} Potatoes
|{{Stack|Potato}} Carrots
|-
|-
|{{Stack|Beetroot Seeds}} Beetroot Seeds
|{{Stack|Beetroot Seeds}} Potatoes
|-
|-
|{{Stack|Wheat Seeds}} Wheat Seeds
|{{Stack|Wheat Seeds}} Wheat Seeds
Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator
196

edits