Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/ewyboy/quick-harvest
- Owner: EwyBoy
- License: mit
- Created: 2019-12-18T00:42:43.000Z (about 5 years ago)
- Default Branch: 1.18
- Last Pushed: 2022-03-26T09:58:27.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T12:54:50.112Z (4 months ago)
- Topics: auto-replants, click-harvesting, crops, custom-harvester, forge, minecraft, minecraft-forge, mod, modding
- Language: Java
- Homepage: https://www.curseforge.com/minecraft/mc-mods/quick-harvest
- Size: 266 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
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).