Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ewyboy/quick-harvest

Adds in right-click harvesting to crops and auto replants afterwards.
https://github.com/ewyboy/quick-harvest

auto-replants click-harvesting crops custom-harvester forge minecraft minecraft-forge mod modding

Last synced: 3 months ago
JSON representation

Adds in right-click harvesting to crops and auto replants afterwards.

Awesome Lists containing this project

README

        

# Quick-Harvest
Adds in right-click harvesting to crops and auto replants afterwards.

![image](https://user-images.githubusercontent.com/5883716/120504598-91ad6b80-c3c4-11eb-8afd-0c04a888b9f3.png)

# API guide

* [How to register a harvester](#how-to-register-a-harvester)
* [Creating a custom harvester](#creating-a-custom-harvester)

## How to register a harvester

To register a harvester you will need to use the `HarvestManager`. This is like a registry for harvesters. Specifically you will need to call `HarvestManager.regsiter()`. This method takes 2 parameters, the first is your harvester and the second is an array of blocks it is effective on.

> **Note**: A Harvester is anything which implements `IHarvester`.

## Creating a custom harvester

In a typical case, when creating a custom harvester you will need to extend the class `HarvesterImpl`. This class provides you will a bunch of methods which you can use when implementing your own harvesters. The only method you must implement yourself in this case is `harvest()`. To see some examples of harvesters, take a look [here](https://github.com/EwyBoy/Quick-Harvest/tree/master/src/main/java/com/ewyboy/quickharvest/harvester).