Compare commits
No commits in common. "BOP-1.16.4-13.x.x" and "BOP-1.7.10+2-2.0.x" have entirely different histories.
BOP-1.16.4
...
BOP-1.7.10
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
name: 1.16.3 Standalone Bug
|
||||
about: For bugs that occur with Biomes O' Plenty for 1.16.3. We do not support older versions!
|
||||
title: ''
|
||||
labels: bug-minor
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Bug Report
|
||||
|
||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
||||
|
||||
### What's the issue you encountered?
|
||||
|
||||
[ Describe the issue in detail and what you were doing beforehand. ]</br>
|
||||
|
||||
### How can the issue be reproduced?
|
||||
|
||||
[ Include a detailed step by step process for recreating your issue with only Biomes O' Plenty installed. ]</br>
|
||||
|
||||
### Logs
|
||||
|
||||
[ Please include any relevant logs here. This can be done by dragging and dropping your log files into the issue. ]</br>
|
||||
|
||||
### Mod Version
|
||||
[ Please put the version of the mod you were using here. ]</br>
|
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
name: 1.16.3 Standalone Crash
|
||||
about: For crashes that occur with Biomes O' Plenty for 1.16.3. We do not support older versions!
|
||||
title: ''
|
||||
labels: crash
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Bug Report
|
||||
|
||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
||||
|
||||
### How can the crash be reproduced?
|
||||
|
||||
[ Include a detailed step by step process for recreating your crash with only Biomes O' Plenty installed. ]</br>
|
||||
|
||||
### Crash Report and Logs
|
||||
|
||||
[ Please include your crash report and logs here. This can be done by dragging and dropping your log files and crash report files into the issue. ]</br>
|
||||
|
||||
### Mod Version
|
||||
[ Please put the version of the mod you were using here. ]</br>
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: 1.16.3 Feature Request
|
||||
about: Feature requests for Biomes O' Plenty for 1.16.3. We do not support older versions!
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Feature Request
|
||||
|
||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
||||
|
||||
### What feature are you suggesting?
|
||||
|
||||
[ Provide an overview of the feature being suggested. ]</br>
|
||||
|
||||
### Why should it be added?
|
||||
|
||||
[ Describe the benefits of implementing this feature. ]</br>
|
|
@ -1,5 +0,0 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Glitchfiend Discord
|
||||
url: https://discord.gg/GyyzU6T
|
||||
about: Please ask general questions here instead of opening issues for them.
|
|
@ -1,28 +1,39 @@
|
|||
/build/
|
||||
/bin/
|
||||
/out/
|
||||
/Mixin/
|
||||
/repo/
|
||||
/run/
|
||||
/logs/
|
||||
.idea/*
|
||||
/.gradle/
|
||||
/.settings/
|
||||
/.classpath
|
||||
/.project
|
||||
*.bat
|
||||
*.sh
|
||||
|
||||
# OS generated files
|
||||
*.DS_Store
|
||||
LICENSE.txt
|
||||
|
||||
# IntelliJ project files
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
temp/*
|
||||
runtime/*
|
||||
reobf/*
|
||||
logs/*
|
||||
lib/*
|
||||
jars/*
|
||||
forge/*
|
||||
eclipse/*
|
||||
docs/*
|
||||
conf/*
|
||||
bin/*
|
||||
|
||||
*.launch
|
||||
mappings/.gradle/
|
||||
#mappings/mcp/
|
||||
mappings/build/
|
||||
mappings/*.csv
|
||||
mappings/.project
|
||||
mappings/last_updated.json
|
||||
src/minecraft/cpw/*
|
||||
src/minecraft/net/minecraft/*
|
||||
src/minecraft/net/minecraftforge/classloading/*
|
||||
src/minecraft/net/minecraftforge/common/*
|
||||
src/minecraft/net/minecraftforge/client/*
|
||||
src/minecraft/net/minecraftforge/event/*
|
||||
src/minecraft/net/minecraftforge/liquids/*
|
||||
src/minecraft/net/minecraftforge/oredict/*
|
||||
src/minecraft/net/minecraftforge/transformers/*
|
||||
src/minecraft/paulscode/*
|
||||
src/minecraft/ibxm/*
|
||||
|
||||
src/minecraft/Start.java
|
||||
|
||||
src/minecraft/mcpmod.info
|
||||
src/minecraft/mcp.png
|
||||
src/minecraft/forge_logo.png
|
||||
src/minecraft/forge_at.cfg
|
||||
src/minecraft/fmlversion.properties
|
||||
src/minecraft/fml_marker.cfg
|
||||
src/minecraft/fml_at.cfg
|
||||
build_number.properties
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
@Library('forge-shared-library')_
|
||||
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'gradle:jdk8'
|
||||
args '-v forgegc:/home/gradle/.gradle/'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
GRADLE_ARGS = '--no-daemon --console=plain' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
||||
JENKINS_HEAD = 'https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('fetch') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('setup') {
|
||||
steps {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies'
|
||||
}
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :properties -q | grep "^version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('changelog') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, "build/BiomesOPlenty-${env.MYVERSION}-changelog.txt")
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
environment {
|
||||
CURSE_API_KEY = credentials('curse-api-key')
|
||||
}
|
||||
steps {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} :uploadArchives curseforge -PcurseApiKey=${CURSE_API_KEY}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
325
LICENSE.txt
325
LICENSE.txt
|
@ -1,325 +0,0 @@
|
|||
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
|
||||
International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-NonCommercial-NoDerivatives 4.0 International Public
|
||||
License ("Public License"). To the extent this Public License may be
|
||||
interpreted as a contract, You are granted the Licensed Rights in
|
||||
consideration of Your acceptance of these terms and conditions, and the
|
||||
Licensor grants You such rights in consideration of benefits the
|
||||
Licensor receives from making the Licensed Material available under
|
||||
these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
c. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
d. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
e. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
f. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
g. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
h. NonCommercial means not primarily intended for or directed towards
|
||||
commercial advantage or monetary compensation. For purposes of
|
||||
this Public License, the exchange of the Licensed Material for
|
||||
other material subject to Copyright and Similar Rights by digital
|
||||
file-sharing or similar means is NonCommercial provided there is
|
||||
no payment of monetary compensation in connection with the
|
||||
exchange.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part, for NonCommercial purposes only; and
|
||||
|
||||
b. produce and reproduce, but not Share, Adapted Material
|
||||
for NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties, including when
|
||||
the Licensed Material is used other than for NonCommercial
|
||||
purposes.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material, You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
For the avoidance of doubt, You do not have permission under
|
||||
this Public License to Share Adapted Material.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database for NonCommercial purposes
|
||||
only and provided You do not Share Adapted Material;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
480
README.md
480
README.md
|
@ -1,17 +1,479 @@
|
|||
<p align="center"><img src="https://i.imgur.com/HQ2opH6.png"></p>
|
||||
[<img src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png">](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US)
|
||||
|
||||
<p align="center"><img src="https://i.imgur.com/CYxKg5M.png"></p>
|
||||
Biomes O' Plenty is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US).
|
||||
|
||||
<p align="center">https://discord.gg/GyyzU6T</p>
|
||||
## Authors
|
||||
|
||||
**Biomes O' Plenty** is a **Minecraft mod** that adds **over 50 new biomes** to the Overworld, Nether, and End. From Lavender Fields to Redwood Forests and many more, all of our biomes are decorated with a variety of **new trees, flowers, and plants!**
|
||||
- **Adubbz** - "Madman" - General, Technical, Mod Compatibility
|
||||
|
||||
-----------------
|
||||
- **Amnet** - "Foreign Affairs" - General, Technical, Mod Compatibility
|
||||
|
||||
**Note:** To use the mod on a **server**, you must set the **level-type** setting in your server's config file to **biomesoplenty**
|
||||
- **Forstride** - "World Painter" - Founder, Art, Biome Design, General
|
||||
|
||||
-----------------
|
||||
- **ted80** - "Biome Fanatic" - Biome Execution, General
|
||||
|
||||
[<img src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png">](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US)
|
||||
## Credits ##
|
||||
|
||||
- **gamax92** - Initial Forge Conversion
|
||||
|
||||
- **enchilado** - Mud Tool and Armour Textures
|
||||
|
||||
- **Tim Rurkowski** - Music author
|
||||
|
||||
Biomes O' Plenty is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US).
|
||||
- **Soaryn** - Help making the Altar Frames
|
||||
|
||||
- **MineModder2000** - 256 high worlds
|
||||
|
||||
|
||||
## Changelog
|
||||
(Future changelogs can be found in the releases section)
|
||||
|
||||
Version 1.1.0 '24-09-13'
|
||||
- Made steam particles animated
|
||||
- Added the Phantom
|
||||
- Removed the crafting recipe for ghastly souls (*I wonder where they went*)
|
||||
- Changed the biomes in which billages can generate in by default
|
||||
- Added Wither Wart
|
||||
- Tweaked the liquid poison textures
|
||||
- Updated several localizations (Props to VeryBigBro and Vexatos)
|
||||
- Fixed the Mountain biome's height
|
||||
- Added gravestone gen to the nether
|
||||
- Changed how willow trees generate
|
||||
- Added persimmons and persimmon trees
|
||||
- Changed the hunger/saturation values for food
|
||||
- Added smooth sky colour transitions (this was a Forge addition, but it's worth mentioning)
|
||||
- Nerfed jungle spiders
|
||||
- Changed the mod logo
|
||||
- Added various coloured coral
|
||||
- Tweaked kelp
|
||||
- Added a few ocean biomes
|
||||
- Oceanic Abyss
|
||||
- Coral Reef
|
||||
- Kelp Forest
|
||||
- Added Forge Multipart microblocks integration
|
||||
- Fixed rainfall values for snowy biomes
|
||||
- Added the Ochre Acres biome
|
||||
- Fixed bucket container items
|
||||
- Increaed growth time for apple trees
|
||||
- Added wading boots
|
||||
- Added flippers
|
||||
- Tweaked the Oasis biome
|
||||
- Added custom village materials for various biomes
|
||||
- Fixed block picking on stairs (Our OCD friend Leenhaart :P)
|
||||
- Added Tropics Mountain Subbiome
|
||||
- Added Hibiscus
|
||||
- Added Lily of the Valley
|
||||
- Added Burning Blossom
|
||||
- Tweaked various plant/flower textures
|
||||
- Renamed Aloe to Bromeliad
|
||||
- Added Lavender
|
||||
- Added the Lavender Fields biome
|
||||
- Added a way to grow tiny cacti and cattails with bonemeal
|
||||
- Deathblooms and thorns now hurt if shears aren't used
|
||||
- Added Goldenrods
|
||||
- Added Bluebells
|
||||
- Switched to using isGenMineableReplaceable (which in turn fixed Underground Biomes compatibility with gems)
|
||||
- Added Shrubs
|
||||
- Added Wheat Grass
|
||||
- Added Damp Grass
|
||||
- Tweaked Moss generation
|
||||
- Tweaked Moss texture
|
||||
- Disabled rain in the Badlands
|
||||
- Made moss no longer spread
|
||||
- Updated to 1.6.4
|
||||
- Added Miner's Delight
|
||||
- Tweaked the way Berry Bushes render
|
||||
- Updated the MFR API
|
||||
- Updated the Forestry API
|
||||
- Added config options for the ocean biomes, wither wart and burning blossom
|
||||
- Added Icy Iris
|
||||
- Added Flat Mushroom
|
||||
- Added cocoa trees to the Tropical Rainforest
|
||||
- Added jungle wood to trees in the Brushland and Scrubland
|
||||
- Tweaked marsh generation
|
||||
- Added mud to Marshes
|
||||
- Renamed reeds to River Cane
|
||||
- Added proper reeds (You'll know them when you see them)
|
||||
|
||||
Version 0.6.2 '20-08-13'
|
||||
- Fixed bigtrees compatibility
|
||||
- Fixed another bug with altars
|
||||
|
||||
Version 0.6.1 '16-08-13'
|
||||
- Fixed food for the fifty-billionth time
|
||||
- Added fr_CA localisation
|
||||
- Added fr_FR localisation
|
||||
- Added pl_PL localisation
|
||||
- Added a config option for the Spring Water Regeneration Effect
|
||||
- Tweaked some achievements
|
||||
- Made puddles dry up faster
|
||||
- Changed the height of the Grassland
|
||||
- Promised Land Tweaks
|
||||
- Fixed Spring Water Regeneration Effect
|
||||
- Fixed stair hardness
|
||||
- Added the Silkglades biome
|
||||
- Added a config option to generate pumpkins without faces
|
||||
- Added a config option to disable lethal decoration
|
||||
- Tweaked Biome Dictionary definitions
|
||||
- Tweaked Origin Valley sky colour
|
||||
- Added sub biomes for the enhanced vanilla biomes
|
||||
- Tweaked the barley texture
|
||||
- Fixed quicksand deepness
|
||||
- Added the Overgrown Greens biome
|
||||
- Prevented the Nether from being overriden in default worlds unless Add to Default is set to true
|
||||
- Fixed a crash with saplings
|
||||
- Added a config option to disable vanilla's exposed stone feature
|
||||
- Tweaked the Shrubland height
|
||||
- Tweaked the Tundra height
|
||||
- Fixed terrain generator "stripes"
|
||||
- Fixed a crash with disabling structures
|
||||
- Fixed some bugs with sacrificing
|
||||
- Fixed some bugs with pine tree growth requirements and slabs
|
||||
|
||||
Version 0.6.0 '03-08-13'
|
||||
- Ripped out old integration for BC pumps
|
||||
- Fixed a server crash bug with sacrifical altars
|
||||
- Fixed a bug with the German localisation
|
||||
- Added config options for certain recipes
|
||||
- Tweaked the Bayou and Lush Swamp heights
|
||||
- Overhauled the Field biome
|
||||
- Added spires to the wasteland
|
||||
- Added a Savanna Plateau sub-biome
|
||||
- Made mountainous biomes less ugly
|
||||
- Fixed noms again
|
||||
- Fixed a crash between RC and GT
|
||||
- Added a zh_CN localisation
|
||||
- Split the config file into sub files
|
||||
|
||||
Version 0.5.9.2 '30-07-13'
|
||||
- Added the Chromaflora
|
||||
- Changed willow trees in the Promised Land to swampy ivy trees
|
||||
- Re-added clouds to the Promised Land
|
||||
- Fixed the eating bug in multiplayer, now zip your traps about it!
|
||||
- Russian translation tweaks (by VeryBigBro)
|
||||
- Updated Forestry Integration and API
|
||||
- Corrected loftwood recipes
|
||||
- Updated ore dictionary registration for logs
|
||||
- Tweaked fir log/plank textures
|
||||
|
||||
Version 0.5.9 '23-07-13'
|
||||
- Fixed eating food
|
||||
- Fixed some biome heights, decreased the amount of trees in the Snowy Confierous Forest
|
||||
- Tweaked some flower textures, changed some achievement icons
|
||||
- Fixed height for mangroves
|
||||
- Added support for falling leaves from Better Grass & Leaves
|
||||
- Fixed a crash bug with non-living entities entering poison ivy
|
||||
- Updated the better leaf textures
|
||||
- Fixed a crash with saplings
|
||||
- Added Long Grass
|
||||
- Added config option for disabling oceans
|
||||
- Fixed an issue with the shroom powder texture
|
||||
- Tweaked the Garden biome
|
||||
- Tweaked the Shield biome
|
||||
|
||||
Version 0.5.8 '21-07-13'
|
||||
- Removed the crappy Amethyst Tinkers Construct tools
|
||||
- Redid the grave
|
||||
- Berries now have a new texture
|
||||
- Changed localized name of Berries to Berry
|
||||
- Adjusted how common Scythes are damaged
|
||||
- Added wild carrots
|
||||
- Added salads
|
||||
- Changed the texture for fast willow leaves
|
||||
- Tweaked the Garden biome
|
||||
- Added beach variation config options
|
||||
- Added Russian translations (courtesy of Sodiet)
|
||||
- Fixed the sky colours config option
|
||||
- Plants no longer generate in invalid positions (causing them to them pop off)
|
||||
- Reeds are now cut down properly
|
||||
- Fixed poison dart particles
|
||||
- Tweaked the creative tab icon
|
||||
- Puddles now dry up faster
|
||||
- Added support for full 256 terrain generation
|
||||
- Tweaked sub-biomes
|
||||
- Improved some sapling textures
|
||||
- Tweaked the Alps sub biome
|
||||
- Fixed the mod logo
|
||||
- Fixed fluid localizations
|
||||
- Fixed bucket container items
|
||||
- Poison ivy no longer poisons players wearing leather pants and boots
|
||||
- Tweaked some biomes to allow them to generate above 128
|
||||
|
||||
Version 0.5.7 '09-07-13'
|
||||
- Full update to 1.6.2
|
||||
- Adjusted the crafting recipes for Scythes
|
||||
- Added sub-biomes
|
||||
- Canyon Ravine
|
||||
- Meadow Forest
|
||||
- Thick Ominous Woods
|
||||
- Pasture Meadow
|
||||
- Pasture Thin
|
||||
- Shrubland Forest
|
||||
- Timber Thin
|
||||
- Added amethyst buckets specifically for picking up Spring Water
|
||||
- Removed the Overgrown Beach
|
||||
- Tweaked the Badlands
|
||||
|
||||
Version 0.5.6 '05-07-13'
|
||||
- Added Treecapacitator compatibility
|
||||
- Made the Ancient Staff and Dart Blower render in 3D like other tools
|
||||
- Addeed the Altar Frame
|
||||
- Added the Sacrificial Focus
|
||||
- Added the Celestial Lens
|
||||
- Added the Soul Manipulator
|
||||
- Added Scythes
|
||||
- Fixed alignment on mud/amethyst tool textures
|
||||
- Added Globs to the API
|
||||
- Fixed Glob spawning
|
||||
- Fixed decoration on the Overgrown Beach
|
||||
- Coniferous Forest colour changes
|
||||
- Fixed a few logs being unable to be burned into charcoal
|
||||
- Added option to disable the Nether changes
|
||||
- Tweaked picking up apples from apple trees.
|
||||
- Tweaked placing saplings.
|
||||
- Added new stairs as a valid fuel
|
||||
- Switched to a new localizations system (Not that anyone will use it)
|
||||
- Fixed Thaumcraft Golem working on Apple Trees
|
||||
- Added Minefactory Reloaded compatibility
|
||||
- Changed the default Moss ID
|
||||
- Added a warning when using the default world type without the config option enabled
|
||||
- New version checking system
|
||||
- Added Biome Finder achievements
|
||||
- Added Tinkers construct integration for Amethyst tools
|
||||
- Fixed an exploit with shears and berry bushes
|
||||
- Added support for Better Grass and Leaves
|
||||
- Tweaked the Fungi Forest trees
|
||||
- Tweaked pyramid generation
|
||||
- Made the BOP world type able to have biomes from other mods
|
||||
- Added puddles that generate in the rain
|
||||
- Fixed grass not dropping seeds
|
||||
- Added graves
|
||||
- Made horses spawn in several biomes
|
||||
- Removed the Nourishment effect
|
||||
- Removed BWG4 integration (Ted wanted to move it into BWG4 itself)
|
||||
- You can no longer spawn in the hot springs or orchard
|
||||
- Tweaked hot springs generation
|
||||
- Tweaked apple tree generation
|
||||
- Spring water can no longer be picked up by hand
|
||||
- Algae is now biome coloured
|
||||
- Tweaked the Badlands
|
||||
- Tweaked the Mystic Grove
|
||||
|
||||
Version 0.5.5 '04-06-13'
|
||||
- Fixed warnings on startup about Thaumcraft compatibility
|
||||
- Fixed tundra boulder generation
|
||||
- Added bamboo thatching > bamboo recipe
|
||||
- Tweaked the Liquid Poison texture
|
||||
- Custom dyes now work on sheep and dog collars
|
||||
- Fixed a bug with connected textures
|
||||
- Updated some temperatures and humidities for Forestry
|
||||
- Added some new gems
|
||||
- Changed the Ancient Staff recipe to use the new gems
|
||||
- Fixed temperature/humidity values for the Hot Springs and Mountain biomes
|
||||
- Added config options for which Nether biomes generate
|
||||
- Added a config option for the custom loot
|
||||
- Fixed a bug with bamboo not decaying
|
||||
|
||||
Version 0.5.4 '01-06-13'
|
||||
- Added use animation to berry bushes
|
||||
- Tweaked apple leaf textures
|
||||
- Removed nether tags from overworld biomes
|
||||
- Added several Nether Biomes
|
||||
- Undergarden
|
||||
- Corrupted Sands
|
||||
- Phantasmagoric Inferno
|
||||
- Boneyard
|
||||
- Tweaked dandelion particles
|
||||
- Apples and berries from leaves and bushes no longer spawn directly on the player
|
||||
- Fixed a bug with trees in the Jade Cliffs
|
||||
- Added ivy
|
||||
- Nerfed apple tree growth
|
||||
- Tweaked algae generation
|
||||
- Tweaked algae texture
|
||||
- Adjusted the Boreal Forest
|
||||
- Added Bone Segments
|
||||
- Added kelp
|
||||
- Made amethyst tools and armour repairable
|
||||
- Overhauled the Bog biome
|
||||
- Renamed the Swampwoods to the Sludegpit and made it like the old Bog
|
||||
- Adjusted the Deadlands and how Smoldering Grass generates
|
||||
- Added the Timber biome
|
||||
- Added Spring Water
|
||||
- Added Liquid Poison
|
||||
- Added the Nourishment potion effect (from Spring Wtaer)
|
||||
- Added the Paralysis potion effect (from Poison Darts)
|
||||
- Gave the deathbloom a particle effect
|
||||
- Made the deathbloom apply the wither effect on contact
|
||||
- Added pine trees
|
||||
- Tweaked the Canyon
|
||||
- Tweaked hard dirt texture
|
||||
- Tweaked aloe texture
|
||||
- Tweaked fir leaf texture
|
||||
- Added pine, hellbark and jacaranda wood, leaves, planks, stairs and slabs
|
||||
- Added the Hot Springs biome
|
||||
- Added Jacaranda trees
|
||||
- Disabled oil generation in the Promised Land
|
||||
- Adjusted quicksand generation
|
||||
- Allowed tiny cacti and thorns to live in any light level
|
||||
- Reworked the Promised Lands portal
|
||||
- Improved the Mangrove biome
|
||||
- Added steam particles
|
||||
- Tweaked grass bounding boxes
|
||||
- Added beach variations
|
||||
- Players now enter the overworld upon falling out of the Promised Lands
|
||||
- The Ancient Staff now depletes on use
|
||||
- Gave the Promised Lands a movement ratio of 16
|
||||
- The Ancient Staff can now be used in the Promised Lands
|
||||
|
||||
Version 0.5.3 '17-05-13'
|
||||
- Added reeds
|
||||
- Added 2 new mushrooms (Portobello and Blue Milk Cap)
|
||||
- Adjusted and fixed mod compatibility with Thermal Expansion
|
||||
- Adjusted hitboxes for some flowers
|
||||
- Added poison ivy
|
||||
- Changed default distance between villages
|
||||
- Tweaked the Fungi Forest
|
||||
- Fixed High Grass generation in the Marsh
|
||||
- Removed Barley from blacksmith chests
|
||||
- Added white dandelions (they can be blown into the air too!)
|
||||
- Improved Redwood Forest Biome and thin Redwood tree generation
|
||||
- Replaced the old Ice Sheet Biome with a Polar biome
|
||||
- Added random offset for foliage
|
||||
- Renamed Yucca to Aloe
|
||||
- Changed the moss texture
|
||||
- Added the dart blower
|
||||
- Fixed a few crafting recipes
|
||||
- Added a new Promised Land generator
|
||||
- Added Promised Land Sub-Biomes
|
||||
- Adjusted which plants grow from bonemeal
|
||||
- Made the Promised Lands use holy stone
|
||||
- Adjusted Amethyst Ore texture
|
||||
- Added hippy flower bands
|
||||
- Added cloud blocks
|
||||
- Redwood trees now require a 3x3 of redwood saplings
|
||||
- Tweaked spider spawn weights in the Ominous Woods
|
||||
- Added big tree variants of the red and orange trees to the Seasonal Forest
|
||||
- Made the sky colour of the Promised Lands configurable
|
||||
- Added Celestial Crystal
|
||||
- Fixed a crash bug with mudballs
|
||||
- Tweaked apple leaves
|
||||
- Adjusted palm tree generation
|
||||
- Added alternative blue, brown and green, black and white dyes
|
||||
- Added glowshrooms
|
||||
- Made Icy Hills hillier
|
||||
- Gave barley a random offset
|
||||
- Added sunflowers
|
||||
- Added lilyflowers
|
||||
- Adjusted some achievement descriptions
|
||||
- Switched to using BWG4 Acacia Trees
|
||||
- Tweaked the Savanna
|
||||
- BOP woods now trigger the "Get Wood" achievement
|
||||
- Added berry bushes
|
||||
- Added sunflower seeds
|
||||
- Overhauled the Grove Biome
|
||||
- Overhauled the Field Biome
|
||||
- Added the "Glob"
|
||||
|
||||
Version 0.5.2 '05-05-13'
|
||||
- Added an API for other mod developers
|
||||
- Added support for Biomes O Plenty woods in Thermal Expansion sawmills
|
||||
- Significantly compressed the amount of Block IDs used, however breaks existing worlds
|
||||
- Updated to the latest Forge
|
||||
- Changed various things to use IShearable
|
||||
- Changed default biome ids to be compatible with Mo Creatures
|
||||
- Made a proper fix for achievements and made them enabled by default (The config option is still there though for those that want it)
|
||||
- Added Better World Generation 4 support
|
||||
- Made shears instantly destroy Biomes O Plenty leaves
|
||||
- Adjusted high grass hitbox to cover both blocks
|
||||
- Fixed an issue causing sound files to be created on the desktop
|
||||
- Biomes O Plenty saplings now work in the Forestry fermenter
|
||||
- Biomes O Plenty flowers can now be used with bees
|
||||
- Gave the different types Autumn and Cherry Leaves their own names
|
||||
- Added Biome Dictionary support
|
||||
- Added seeds on destroyed Biomes O Plenty grasses
|
||||
- Carrots and potatoes now have a chance (1%) to be dropped from sprouts
|
||||
- Added a random drop of apples when destroying apple leaves
|
||||
- Added flowers to plants created on bonemeal use
|
||||
- Tweaked the recipe for bamboo thatching
|
||||
- Bamboo now acts as sticks
|
||||
- Hopefully fixed saplings once and for all
|
||||
- Added hardcoded foliage colours
|
||||
- Added configurable spawn distance between villages in the BOP world type
|
||||
- Added more biomes for villages to spawn in
|
||||
- Tweaked cattail generation
|
||||
- Renamed the texture files to reflect the in-game names
|
||||
- You can now have different textures for the heart of every log
|
||||
- Added Thaumcraft compatibility
|
||||
- Updated the regular BOP music disc file (courtesy of Forstride), may require deleting the old bopdisc.ogg to take effect
|
||||
- Allowed Forestry beehives to spawn on Biomes O Plenty certain blocks
|
||||
- Fixed registering biomes for world types - BOP biomes now accessible in Large Biomes World Type
|
||||
- Fixed leaf decay
|
||||
- Fixed config option for adding biomes to vanilla world types
|
||||
- Fixed Red Rock
|
||||
- Fixed BOP Items
|
||||
- Fixed placing of Mangrove and Holy Saplings
|
||||
- Finished the Thaumcraft aspects
|
||||
- Changed the styling of Bamboo Forests to that of Forstrides liking
|
||||
- Added Yucca flower to desert biomes
|
||||
- Added High Cattails
|
||||
- Seperated High Grass into two blocks
|
||||
- Fire now burns infinitely on ashes
|
||||
- Fixed willow colouring
|
||||
- Adjust the Canyon Biome slightly
|
||||
- Adjusted the Lush Desert biome slightly
|
||||
|
||||
Version 0.5.1 '17-04-2013'
|
||||
- Fixed server crash with mudballs
|
||||
- Fixed Forestry beehives spawning, as well as giving biomes appropriate temperatures
|
||||
- Removed wrong recipe for mossy cobblestone
|
||||
- Added bamboo saplings
|
||||
- Bonemeal now creates the appropriate giant flowers when used on red and yellow flowers
|
||||
- Changed default biome ids
|
||||
- Fixed sapling bugs
|
||||
|
||||
Version 0.5.0 '09-04-2013'
|
||||
- Desert sprouts and Dune Grass now require shears to be harvested
|
||||
- Added alpha beaches to origin valley biome
|
||||
- You can now throw Mudballs to deal 1/2 heart of damage
|
||||
- Entities get the slowness potion effect when hit by mudballs
|
||||
- Mud balls can now be fired from dispensers
|
||||
- Resources now only install client-side
|
||||
- Fixed bonemeal on Origin Saplings
|
||||
- Bonemeal now only reacts to mangrove saplings when they are on sand
|
||||
- Fixed bonemeal and holy grass dependancies on Holy and Magic saplings
|
||||
- Changed the leaves blocks to use the IShearable interface
|
||||
- Made the enderporter only work in the overworld
|
||||
- Fixed the textures for logs to display according to their orientation
|
||||
- Adding Leaves, Saplings, Stairs and Slabs to Ore Dictionary
|
||||
- Fixed crash on right clicking on slabs with nothing in your hand
|
||||
- Fixed trees not generating in the Mystic grove
|
||||
- Fixed placing Moss, TreeMoss and Willow
|
||||
- Fixed a bug with Promised Lands not using the ID from the config file
|
||||
|
||||
Version 0.4.9 '03-04-2013'
|
||||
- Tools actually have the properties of the tools they are meant to be (they used to all think they are swords)
|
||||
- Ore dictionary support for wood
|
||||
- Added a temporary fix for the Ach Flower issue in the form of a config option for achievements
|
||||
- Fancier message upon creation of The Promised Lands
|
||||
- No more duplicate chat messages on creating the Promised Lands
|
||||
- You can no longer create an infinite endstone supply from spamming Promised Lands portals
|
||||
- Holy Tall grass no longer drops itself without using shears
|
||||
- Fixed things wrongly having wooden footstep sounds
|
||||
- Saplings now use the new bonemeal system added by Minecraft 1.5
|
||||
- Bonemeal now creates Holy Tall Grass when used on Holy Grass
|
||||
- Fixed slabs not stacking
|
||||
- Fixed leaf decay
|
||||
- Fixed tool effectiveness on various blocks
|
||||
- Gave smoldering grass and ash their expected behaviours; burn on contact (smoldering grass) and slowness (ash)
|
||||
- Holy and magic saplings will only grow on Holy Grass
|
||||
- Holy Grass burns up into Soulsand in the Nether
|
||||
- Fixed axe recipes
|
||||
- Removed unnecessary recipes for hoes
|
||||
|
||||
Version 0.4.8 '31-03-2013'
|
||||
- Fixed smoldering grass texture
|
||||
- Fixed flower achievement?
|
||||
- Fixed Giant red flower texture
|
||||
|
||||
Version 0.4.7 '30-03-2013'
|
||||
- Updated to Minecraft 1.5.1
|
||||
|
|
405
build.gradle
405
build.gradle
|
@ -1,188 +1,217 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.matthewprenger.cursegradle" version "1.4.0"
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'maven'
|
||||
|
||||
repositories { mavenLocal() }
|
||||
|
||||
group = "com.github.glitchfiend.biomesoplenty"
|
||||
archivesBaseName = "BiomesOPlenty"
|
||||
|
||||
def getGitHash = {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
version = "${minecraft_version}-${mod_version}.${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
minecraft {
|
||||
mappings channel: 'official', version: minecraft_version
|
||||
|
||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
|
||||
runs {
|
||||
client = {
|
||||
workingDirectory = project.file("run").canonicalPath
|
||||
source sourceSets.main
|
||||
}
|
||||
server = {
|
||||
workingDirectory = project.file("run").canonicalPath
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
from (sourceSets.main.resources.srcDirs) {
|
||||
include 'META-INF/mods.toml'
|
||||
expand 'version': project.version
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier = 'universal'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:' + minecraft_version + '-' + forge_version
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
from (sourceSets.main.output) {
|
||||
include 'LICENSE.txt'
|
||||
}
|
||||
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'deobf'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from(sourceSets.main.allJava) {
|
||||
include 'biomesoplenty/api/**'
|
||||
}
|
||||
from (sourceSets.main.output) {
|
||||
include 'LICENSE.txt'
|
||||
include 'biomesoplenty/api/**'
|
||||
}
|
||||
|
||||
classifier = 'api'
|
||||
}
|
||||
|
||||
def changelog_file = rootProject.file("build/BiomesOPlenty-${version}-changelog.txt")
|
||||
|
||||
curseforge {
|
||||
if (project.hasProperty('curseApiKey')) {
|
||||
apiKey = project.getProperty('curseApiKey')
|
||||
project {
|
||||
id = '220318'
|
||||
|
||||
if (changelog_file.exists()) {
|
||||
changelog = changelog_file
|
||||
}
|
||||
|
||||
releaseType = 'beta'
|
||||
|
||||
mainArtifact(jar) {
|
||||
displayName = "Biomes O' Plenty ${version}"
|
||||
}
|
||||
addArtifact sourcesJar
|
||||
addArtifact deobfJar
|
||||
addArtifact apiJar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
if (changelog_file.exists()) {
|
||||
archives changelog_file
|
||||
}
|
||||
archives jar
|
||||
archives sourcesJar
|
||||
archives deobfJar
|
||||
archives apiJar
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
if (project.hasProperty('forgeMavenPassword')) {
|
||||
repository(url: "https://files.minecraftforge.net/maven/manage/upload") {
|
||||
authentication(userName: project.getProperty('forgeMavenUsername'), password: project.getProperty('forgeMavenPassword'))
|
||||
}
|
||||
}
|
||||
else {
|
||||
// local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local
|
||||
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
||||
}
|
||||
|
||||
pom {
|
||||
groupId = project.group
|
||||
version = project.version
|
||||
artifactId = project.archivesBaseName
|
||||
project {
|
||||
name project.archivesBaseName
|
||||
packaging 'jar'
|
||||
description 'Biomes O Plenty'
|
||||
url 'https://github.com/Glitchfiend/BiomesOPlenty'
|
||||
|
||||
scm {
|
||||
url 'https://github.com/Glitchfiend/BiomesOPlenty'
|
||||
connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git'
|
||||
developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git'
|
||||
}
|
||||
|
||||
issueManagement {
|
||||
system 'github'
|
||||
url 'https://github.com/Glitchfiend/BiomesOPlenty/issues'
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International Public License'
|
||||
url 'http://creativecommons.org/licenses/by-nc-nd/4.0/'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id 'Adubbz'
|
||||
name 'Adubbz'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'Forstride'
|
||||
name 'Forstride'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven {
|
||||
name = "ForgeFS"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
deployJars
|
||||
}
|
||||
|
||||
apply plugin: "maven"
|
||||
apply plugin: "forge"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
flatDir {
|
||||
name "fileRepo"
|
||||
dirs "repo"
|
||||
}
|
||||
ivy {
|
||||
name 'Forge FS legacy'
|
||||
artifactPattern "http://files.minecraftforge.net/[module]/[module]-dev-[revision].[ext]"
|
||||
}
|
||||
}
|
||||
|
||||
// define the properties file
|
||||
ext.configFile = file "build.properties"
|
||||
|
||||
configFile.withReader {
|
||||
// read config. it shall from now on be referenced as simply config or as project.config
|
||||
def prop = new Properties()
|
||||
prop.load(it)
|
||||
project.ext.config = new ConfigSlurper().parse prop
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//compile name: 'WorldCore', version: "${config.minecraft_version}-${config.worldcore_version}", ext: 'jar'
|
||||
//compile name: 'ForgeMultipart', version: "${config.minecraft_version}-${config.fmp_version}", ext: 'jar'
|
||||
}
|
||||
|
||||
group = "com.github.glitchfiend.biomesoplenty"
|
||||
version = config.mod_version
|
||||
archivesBaseName = "BiomesOPlenty"
|
||||
|
||||
minecraft {
|
||||
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
|
||||
assetDir = "run/assets"
|
||||
|
||||
replaceIn "BiomesOPlenty.java"
|
||||
replace "1.42.666.42.1", config.forge_version
|
||||
}
|
||||
|
||||
// add some stuff to the version
|
||||
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
jenkins {
|
||||
job = 'BiomesOPlenty'
|
||||
}
|
||||
|
||||
processResources {
|
||||
// replace stuff in the files we want.
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include '**/*.info'
|
||||
include '**/*.properties'
|
||||
|
||||
// replaces
|
||||
expand ([
|
||||
'modid': project.archivesBaseName,
|
||||
'mod_version': project.config.mod_version,
|
||||
'minecraft_version': project.config.minecraft_version,
|
||||
'build_number': project.config.build_number,
|
||||
'worldcore_version': project.config.worldcore_version
|
||||
])
|
||||
}
|
||||
|
||||
// copy everything else, thats we didnt do before
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude '**/*.info'
|
||||
exclude '**/*.properties'
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
//attributes 'FMLCorePlugin': 'biomesoplenty.asm.BOPFMLLoadingPlugin'
|
||||
//attributes 'FMLCorePluginContainsFMLMod': 'true'
|
||||
}
|
||||
classifier = 'universal'
|
||||
}
|
||||
|
||||
import net.minecraftforge.gradle.tasks.dev.ChangelogTask
|
||||
import net.minecraftforge.gradle.common.Constants
|
||||
import net.minecraftforge.gradle.delayed.*
|
||||
|
||||
task createChangelog(type: ChangelogTask) {
|
||||
def jobName = "${System.getenv().JOB_NAME}"
|
||||
def buildNumber = "${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
setServerRoot(new DelayedString(project, 'http://ci.jenkins.minecraftforge.net/'))
|
||||
setJobName(new DelayedString(project, jobName.toString()));
|
||||
setAuthName(new DelayedString(project, 'console_script'));
|
||||
setAuthPassword(new DelayedString(project, 'dc6d48ca20a474beeac280a9a16a926e'));
|
||||
setTargetBuild({buildNumber.toString()});
|
||||
setOutput(new DelayedFile(project, 'build/distributions/' + project.getName() + '-' + project.version + '-changelog.txt'));
|
||||
}
|
||||
|
||||
tasks.build.dependsOn('createChangelog')
|
||||
|
||||
task sourceZip(type: Zip) {
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'src'
|
||||
}
|
||||
|
||||
task apiZip(type: Zip) {
|
||||
from(sourceSets.main.java)
|
||||
{
|
||||
include "biomesoplenty/api/*"
|
||||
}
|
||||
classifier = 'api'
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'deobf'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourceZip
|
||||
archives deobfJar
|
||||
archives apiZip
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
add getProject().repositories.mavenLocal()
|
||||
}
|
||||
repositories.mavenDeployer {
|
||||
configuration = configurations.deployJars
|
||||
|
||||
if (project.hasProperty("filesmaven")) {
|
||||
logger.info('Publishing to files server')
|
||||
repository(url: project.filesmaven.url) {
|
||||
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
|
||||
}
|
||||
} else {
|
||||
logger.info('Publishing to repo folder')
|
||||
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
||||
}
|
||||
|
||||
pom {
|
||||
groupId = project.group
|
||||
version = project.version
|
||||
artifactId = project.archivesBaseName
|
||||
}
|
||||
pom.project {
|
||||
name project.archivesBaseName
|
||||
packaging 'jar'
|
||||
description 'Biomes O Plenty'
|
||||
url 'https://github.com/Glitchfiend/BiomesOPlenty'
|
||||
|
||||
scm {
|
||||
url 'https://github.com/Glitchfiend/BiomesOPlenty'
|
||||
connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git'
|
||||
developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git'
|
||||
}
|
||||
|
||||
issueManagement {
|
||||
system 'github'
|
||||
url 'https://github.com/Glitchfiend/BiomesOPlenty/issues'
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported'
|
||||
url 'http://creativecommons.org/licenses/by-nc-nd/3.0/deed.en_US'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id 'Adubbz'
|
||||
name 'Adubbz'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'Forstride'
|
||||
name 'Forstride'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'Amnet'
|
||||
name 'Amnet'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
|
||||
developer {
|
||||
id 'ted80'
|
||||
name 'ted80'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
minecraft_version=1.7.10
|
||||
forge_version=10.13.0.1180
|
||||
mod_version=2.1.0
|
|
@ -1,12 +0,0 @@
|
|||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
mod_version=13.1.0
|
||||
|
||||
minecraft_version=1.16.5
|
||||
minecraft_version_toml=16
|
||||
forge_version=36.1.0
|
||||
forge_version_toml=36
|
||||
forge_group=net.minecraftforge
|
Binary file not shown.
|
@ -1,5 +1,6 @@
|
|||
#Wed Oct 09 10:24:07 CDT 2013
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
|
||||
|
|
|
@ -6,6 +6,47 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
|
@ -20,49 +61,9 @@ while [ -h "$PRG" ] ; do
|
|||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
@ -89,7 +90,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
@ -113,7 +114,6 @@ fi
|
|||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
|
@ -154,19 +154,11 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
|
@ -0,0 +1,46 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IMutation;
|
||||
/**
|
||||
*
|
||||
* Some miscellaneous lists and settings for bees.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public class BeeManager {
|
||||
|
||||
/**
|
||||
* Get your own reference to this via AlleleManager.alleleRegistry.getSpeciesRoot("rootBees") and save it somewhere.
|
||||
*/
|
||||
@Deprecated
|
||||
public static IBeeRoot beeInterface;
|
||||
|
||||
/**
|
||||
* Species templates for bees that can drop from hives.
|
||||
*
|
||||
* 0 - Forest 1 - Meadows 2 - Desert 3 - Jungle 4 - End 5 - Snow 6 - Swamp
|
||||
*
|
||||
* see {@link IMutation} for template format
|
||||
*/
|
||||
public static ArrayList<IHiveDrop>[] hiveDrops;
|
||||
|
||||
/**
|
||||
* 0 - Common Village Bees 1 - Uncommon Village Bees (20 % of spawns)
|
||||
*/
|
||||
public static ArrayList<IBeeGenome>[] villageBees;
|
||||
|
||||
/**
|
||||
* List of items that can induce swarming. Integer denotes x in 1000 chance.
|
||||
*/
|
||||
public static HashMap<ItemStack, Integer> inducers = new HashMap<ItemStack, Integer>();
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleArea;
|
||||
import forestry.api.genetics.IAlleleBoolean;
|
||||
import forestry.api.genetics.IAlleleFloat;
|
||||
import forestry.api.genetics.IAlleleFlowers;
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
import forestry.api.genetics.IAlleleTolerance;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
/**
|
||||
* Enum representing the order of chromosomes in a bee's genome and what they control.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public enum EnumBeeChromosome implements IChromosomeType {
|
||||
/**
|
||||
* Species of the bee. Alleles here must implement {@link IAlleleBeeSpecies}.
|
||||
*/
|
||||
SPECIES(IAlleleBeeSpecies.class),
|
||||
/**
|
||||
* (Production) Speed of the bee.
|
||||
*/
|
||||
SPEED(IAlleleFloat.class),
|
||||
/**
|
||||
* Lifespan of the bee.
|
||||
*/
|
||||
LIFESPAN(IAlleleInteger.class),
|
||||
/**
|
||||
* Fertility of the bee. Determines number of offspring.
|
||||
*/
|
||||
FERTILITY(IAlleleInteger.class),
|
||||
/**
|
||||
* Temperature difference to its native supported one the bee can tolerate.
|
||||
*/
|
||||
TEMPERATURE_TOLERANCE(IAlleleTolerance.class),
|
||||
/**
|
||||
* Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally nocturnal bee can work during the day.
|
||||
*/
|
||||
NOCTURNAL(IAlleleBoolean.class),
|
||||
/**
|
||||
* Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST.
|
||||
*/
|
||||
@Deprecated
|
||||
HUMIDITY(IAllele.class),
|
||||
/**
|
||||
* Humidity difference to its native supported one the bee can tolerate.
|
||||
*/
|
||||
HUMIDITY_TOLERANCE(IAlleleTolerance.class),
|
||||
/**
|
||||
* If true the bee can work during rain.
|
||||
*/
|
||||
TOLERANT_FLYER(IAlleleBoolean.class),
|
||||
/**
|
||||
* If true, the bee can work without a clear view of the sky.
|
||||
*/
|
||||
CAVE_DWELLING(IAlleleBoolean.class),
|
||||
/**
|
||||
* Contains the supported flower provider.
|
||||
*/
|
||||
FLOWER_PROVIDER(IAlleleFlowers.class),
|
||||
/**
|
||||
* Determines pollination speed.
|
||||
*/
|
||||
FLOWERING(IAlleleInteger.class),
|
||||
/**
|
||||
* Determines the size of the bee's territory.
|
||||
*/
|
||||
TERRITORY(IAlleleArea.class),
|
||||
/**
|
||||
* Determines the bee's effect.
|
||||
*/
|
||||
EFFECT(IAlleleBeeEffect.class);
|
||||
|
||||
Class<? extends IAllele> clss;
|
||||
|
||||
EnumBeeChromosome(Class<? extends IAllele> clss) {
|
||||
this.clss = clss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IAllele> getAlleleClass() {
|
||||
return clss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.toString().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpeciesRoot getSpeciesRoot() {
|
||||
return AlleleManager.alleleRegistry.getSpeciesRoot("rootBees");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum EnumBeeType {
|
||||
DRONE, PRINCESS, QUEEN, LARVAE, NONE;
|
||||
|
||||
public static final EnumBeeType[] VALUES = values();
|
||||
|
||||
String name;
|
||||
|
||||
private EnumBeeType() {
|
||||
this.name = "bees." + this.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
|
||||
public class FlowerManager {
|
||||
/**
|
||||
* ItemStacks representing simple flower blocks. Meta-sensitive, processed by the basic {@link IFlowerProvider}.
|
||||
*/
|
||||
public static ArrayList<ItemStack> plainFlowers = new ArrayList<ItemStack>();
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public interface IAlleleBeeEffect extends IAlleleEffect {
|
||||
|
||||
/**
|
||||
* Called by apiaries to cause an effect in the world.
|
||||
*
|
||||
* @param genome
|
||||
* Genome of the bee queen causing this effect
|
||||
* @param storedData
|
||||
* Object containing the stored effect data for the apiary/hive the bee is in.
|
||||
* @param housing {@link IBeeHousing} the bee currently resides in.
|
||||
* @return storedData, may have been manipulated.
|
||||
*/
|
||||
IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* Is called to produce bee effects.
|
||||
*
|
||||
* @param genome
|
||||
* @param storedData
|
||||
* Object containing the stored effect data for the apiary/hive the bee is in.
|
||||
* @param housing {@link IBeeHousing} the bee currently resides in.
|
||||
* @return storedData, may have been manipulated.
|
||||
*/
|
||||
IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
|
||||
public interface IAlleleBeeSpecies extends IAlleleSpecies {
|
||||
|
||||
/**
|
||||
* @return the IBeeRoot
|
||||
*/
|
||||
IBeeRoot getRoot();
|
||||
|
||||
/**
|
||||
* @return true if this species is only active at night.
|
||||
*/
|
||||
boolean isNocturnal();
|
||||
|
||||
/**
|
||||
* @return Map of possible products with the chance for drop each bee cycle. (0 - 100)
|
||||
*/
|
||||
Map<ItemStack, Integer> getProducts();
|
||||
|
||||
/**
|
||||
* @return Map of possible specialities with the chance for drop each bee cycle. (0 - 100)
|
||||
*/
|
||||
Map<ItemStack, Integer> getSpecialty();
|
||||
|
||||
/**
|
||||
* Only jubilant bees produce specialities.
|
||||
* @return true if the bee is jubilant, false otherwise.
|
||||
*/
|
||||
boolean isJubilant(IBeeGenome genome, IBeeHousing housing);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getIcon(EnumBeeType type, int renderPass);
|
||||
|
||||
/**
|
||||
* @return Path of the texture to use for entity rendering.
|
||||
*/
|
||||
String getEntityTexture();
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.core.ITileStructure;
|
||||
|
||||
/**
|
||||
* Needs to be implemented by TileEntities that want to be part of an alveary.
|
||||
*/
|
||||
public interface IAlvearyComponent extends ITileStructure {
|
||||
|
||||
void registerBeeModifier(IBeeModifier modifier);
|
||||
|
||||
void removeBeeModifier(IBeeModifier modifier);
|
||||
|
||||
void registerBeeListener(IBeeListener event);
|
||||
|
||||
void removeBeeListener(IBeeListener event);
|
||||
|
||||
void addTemperatureChange(float change, float boundaryDown, float boundaryUp);
|
||||
|
||||
void addHumidityChange(float change, float boundaryDown, float boundaryUp);
|
||||
|
||||
/**
|
||||
* @return true if this TE has a function other than a plain alveary block. Returning true prevents the TE from becoming master.
|
||||
*/
|
||||
boolean hasFunction();
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IBreedingTracker;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
/**
|
||||
* Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval functions.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IApiaristTracker extends IBreedingTracker {
|
||||
|
||||
/**
|
||||
* Register the birth of a queen. Will mark species as discovered.
|
||||
*
|
||||
* @param queen
|
||||
* Created queen.
|
||||
*/
|
||||
void registerQueen(IIndividual queen);
|
||||
|
||||
/**
|
||||
* @return Amount of queens bred with this tracker.
|
||||
*/
|
||||
int getQueenCount();
|
||||
|
||||
/**
|
||||
* Register the birth of a princess. Will mark species as discovered.
|
||||
*
|
||||
* @param princess
|
||||
* Created princess.
|
||||
*/
|
||||
void registerPrincess(IIndividual princess);
|
||||
|
||||
/**
|
||||
* @return Amount of princesses bred with this tracker.
|
||||
*/
|
||||
int getPrincessCount();
|
||||
|
||||
/**
|
||||
* Register the birth of a drone. Will mark species as discovered.
|
||||
*
|
||||
* @param drone
|
||||
* Created drone.
|
||||
*/
|
||||
void registerDrone(IIndividual drone);
|
||||
|
||||
/**
|
||||
* @return Amount of drones bred with this tracker.
|
||||
*/
|
||||
int getDroneCount();
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* When implemented by armor piece items, allows them to act as apiarist's armor.
|
||||
*/
|
||||
public interface IArmorApiarist {
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
*
|
||||
* @param player
|
||||
* Player being attacked
|
||||
* @param armor
|
||||
* Armor item
|
||||
* @param cause
|
||||
* Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect
|
||||
* Whether or not to actually do the side effects of protection
|
||||
* @return Whether or not the armor should protect the player from that attack
|
||||
*/
|
||||
public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect);
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IIndividualLiving;
|
||||
|
||||
/**
|
||||
* Other implementations than Forestry's default one are not supported.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IBee extends IIndividualLiving {
|
||||
|
||||
/**
|
||||
* @return Bee's genetic information.
|
||||
*/
|
||||
IBeeGenome getGenome();
|
||||
|
||||
/**
|
||||
* @return Genetic information of the bee's mate, null if unmated.
|
||||
*/
|
||||
IBeeGenome getMate();
|
||||
|
||||
/**
|
||||
* @return true if the individual is originally of natural origin.
|
||||
*/
|
||||
boolean isNatural();
|
||||
|
||||
/**
|
||||
* @return generation this individual is removed from the original individual.
|
||||
*/
|
||||
int getGeneration();
|
||||
|
||||
/**
|
||||
* Set the natural flag on this bee.
|
||||
* @param flag
|
||||
*/
|
||||
void setIsNatural(boolean flag);
|
||||
|
||||
/**
|
||||
* @return true if the bee is mated with another whose isNatural() doesn't match.
|
||||
*/
|
||||
boolean isIrregularMating();
|
||||
|
||||
IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing);
|
||||
|
||||
IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* @return true if the bee may spawn offspring
|
||||
*/
|
||||
boolean canSpawn();
|
||||
|
||||
/**
|
||||
* Determines whether the queen can work.
|
||||
*
|
||||
* @param housing the {@link IBeeHousing} the bee currently resides in.
|
||||
* @return Ordinal of the error code encountered. 0 - EnumErrorCode.OK
|
||||
*/
|
||||
int isWorking(IBeeHousing housing);
|
||||
|
||||
boolean hasFlower(IBeeHousing housing);
|
||||
|
||||
ArrayList<Integer> getSuitableBiomeIds();
|
||||
|
||||
ItemStack[] getProduceList();
|
||||
|
||||
ItemStack[] getSpecialtyList();
|
||||
|
||||
ItemStack[] produceStacks(IBeeHousing housing);
|
||||
|
||||
IBee spawnPrincess(IBeeHousing housing);
|
||||
|
||||
IBee[] spawnDrones(IBeeHousing housing);
|
||||
|
||||
void plantFlowerRandom(IBeeHousing housing);
|
||||
|
||||
IIndividual retrievePollen(IBeeHousing housing);
|
||||
|
||||
boolean pollinateRandom(IBeeHousing housing, IIndividual pollen);
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.EnumTolerance;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import forestry.api.genetics.IGenome;
|
||||
|
||||
/**
|
||||
* Only the default implementation is supported.
|
||||
*
|
||||
* @author SirSengir
|
||||
*
|
||||
*/
|
||||
public interface IBeeGenome extends IGenome {
|
||||
|
||||
IAlleleBeeSpecies getPrimary();
|
||||
|
||||
IAlleleBeeSpecies getSecondary();
|
||||
|
||||
float getSpeed();
|
||||
|
||||
int getLifespan();
|
||||
|
||||
int getFertility();
|
||||
|
||||
EnumTolerance getToleranceTemp();
|
||||
|
||||
EnumTolerance getToleranceHumid();
|
||||
|
||||
boolean getNocturnal();
|
||||
|
||||
boolean getTolerantFlyer();
|
||||
|
||||
boolean getCaveDwelling();
|
||||
|
||||
IFlowerProvider getFlowerProvider();
|
||||
|
||||
int getFlowering();
|
||||
|
||||
int[] getTerritory();
|
||||
|
||||
IAlleleBeeEffect getEffect();
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IHousing;
|
||||
|
||||
public interface IBeeHousing extends IBeeModifier, IBeeListener, IHousing {
|
||||
|
||||
ItemStack getQueen();
|
||||
|
||||
ItemStack getDrone();
|
||||
|
||||
void setQueen(ItemStack itemstack);
|
||||
|
||||
void setDrone(ItemStack itemstack);
|
||||
|
||||
/**
|
||||
* @return true if princesses and drones can (currently) mate in this housing to generate queens.
|
||||
*/
|
||||
boolean canBreed();
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
public interface IBeeListener {
|
||||
|
||||
/**
|
||||
* Called on queen update.
|
||||
*
|
||||
* @param queen
|
||||
*/
|
||||
void onQueenChange(ItemStack queen);
|
||||
|
||||
/**
|
||||
* Called when the bees wear out the housing's equipment.
|
||||
*
|
||||
* @param amount
|
||||
* Integer indicating the amount worn out.
|
||||
*/
|
||||
void wearOutEquipment(int amount);
|
||||
|
||||
/**
|
||||
* Called just before the children are generated, and the queen removed.
|
||||
*
|
||||
* @param queen
|
||||
*/
|
||||
void onQueenDeath(IBee queen);
|
||||
|
||||
/**
|
||||
* Called after the children have been spawned, but before the queen appears
|
||||
*
|
||||
* @param queen
|
||||
*/
|
||||
void onPostQueenDeath(IBee queen);
|
||||
|
||||
boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled);
|
||||
|
||||
boolean onEggLaid(IBee queen);
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
public interface IBeeModifier {
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float used to modify the base territory.
|
||||
*/
|
||||
float getTerritoryModifier(IBeeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param mate
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float used to modify the base mutation chance.
|
||||
*/
|
||||
float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float used to modify the life span of queens.
|
||||
*/
|
||||
float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float modifying the production speed of queens.
|
||||
*/
|
||||
float getProductionModifier(IBeeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @return Float modifying the flowering of queens.
|
||||
*/
|
||||
float getFloweringModifier(IBeeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @return Float modifying the chance for a swarmer queen to die off.
|
||||
*/
|
||||
float getGeneticDecay(IBeeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
* @return Boolean indicating if housing can ignore rain
|
||||
*/
|
||||
boolean isSealed();
|
||||
|
||||
/**
|
||||
* @return Boolean indicating if housing can ignore darkness/night
|
||||
*/
|
||||
boolean isSelfLighted();
|
||||
|
||||
/**
|
||||
* @return Boolean indicating if housing can ignore not seeing the sky
|
||||
*/
|
||||
boolean isSunlightSimulated();
|
||||
|
||||
/**
|
||||
* @return Boolean indicating whether this housing simulates the nether
|
||||
*/
|
||||
boolean isHellish();
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import forestry.api.genetics.IMutation;
|
||||
|
||||
public interface IBeeMutation extends IMutation {
|
||||
|
||||
IBeeRoot getRoot();
|
||||
|
||||
/**
|
||||
* @param housing
|
||||
* @param allele0
|
||||
* @param allele1
|
||||
* @param genome0
|
||||
* @param genome1
|
||||
* @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously!
|
||||
*/
|
||||
float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1);
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.core.IStructureLogic;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface IBeeRoot extends ISpeciesRoot {
|
||||
|
||||
/**
|
||||
* @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != EnumBeeType.NONE
|
||||
*/
|
||||
boolean isMember(ItemStack stack);
|
||||
|
||||
/**
|
||||
* @return {@link IBee} pattern parsed from the passed stack's nbt data.
|
||||
*/
|
||||
IBee getMember(ItemStack stack);
|
||||
|
||||
IBee getMember(NBTTagCompound compound);
|
||||
|
||||
/* GENOME CONVERSION */
|
||||
IBee templateAsIndividual(IAllele[] template);
|
||||
|
||||
IBee templateAsIndividual(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
IBeeGenome templateAsGenome(IAllele[] template);
|
||||
|
||||
IBeeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
/* BREEDING TRACKER */
|
||||
/**
|
||||
* @param world
|
||||
* @return {@link IApiaristTracker} associated with the passed world.
|
||||
*/
|
||||
IApiaristTracker getBreedingTracker(World world, String player);
|
||||
|
||||
/* BEE SPECIFIC */
|
||||
/**
|
||||
* @return type of bee encoded on the itemstack. EnumBeeType.NONE if it isn't a bee.
|
||||
*/
|
||||
EnumBeeType getType(ItemStack stack);
|
||||
|
||||
/**
|
||||
* @return true if passed item is a drone. Equal to getType(ItemStack stack) == EnumBeeType.DRONE
|
||||
*/
|
||||
boolean isDrone(ItemStack stack);
|
||||
|
||||
/**
|
||||
* @return true if passed item is mated (i.e. a queen)
|
||||
*/
|
||||
boolean isMated(ItemStack stack);
|
||||
|
||||
/**
|
||||
* @param genome
|
||||
* Valid {@link IBeeGenome}
|
||||
* @return {@link IBee} from the passed genome
|
||||
*/
|
||||
IBee getBee(World world, IBeeGenome genome);
|
||||
|
||||
/**
|
||||
* Creates an IBee suitable for a queen containing the necessary second genome for the mate.
|
||||
*
|
||||
* @param genome
|
||||
* Valid {@link IBeeGenome}
|
||||
* @param mate
|
||||
* Valid {@link IBee} representing the mate.
|
||||
* @return Mated {@link IBee} from the passed genomes.
|
||||
*/
|
||||
IBee getBee(World world, IBeeGenome genome, IBee mate);
|
||||
|
||||
/* TEMPLATES */
|
||||
ArrayList<IBee> getIndividualTemplates();
|
||||
|
||||
/* MUTATIONS */
|
||||
Collection<IBeeMutation> getMutations(boolean shuffle);
|
||||
|
||||
/* GAME MODE */
|
||||
void resetBeekeepingMode();
|
||||
|
||||
ArrayList<IBeekeepingMode> getBeekeepingModes();
|
||||
|
||||
IBeekeepingMode getBeekeepingMode(World world);
|
||||
|
||||
IBeekeepingMode getBeekeepingMode(String name);
|
||||
|
||||
void registerBeekeepingMode(IBeekeepingMode mode);
|
||||
|
||||
void setBeekeepingMode(World world, String name);
|
||||
|
||||
/* MISC */
|
||||
/**
|
||||
* @param housing
|
||||
* Object implementing IBeeHousing.
|
||||
* @return IBeekeepingLogic
|
||||
*/
|
||||
IBeekeepingLogic createBeekeepingLogic(IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* TileEntities wanting to function as alveary components need to implement structure logic for validation.
|
||||
*
|
||||
* @return IStructureLogic for alvearies.
|
||||
*/
|
||||
IStructureLogic createAlvearyStructureLogic(IAlvearyComponent structure);
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.core.INBTTagable;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public interface IBeekeepingLogic extends INBTTagable {
|
||||
|
||||
/* STATE INFORMATION */
|
||||
int getBreedingTime();
|
||||
|
||||
int getTotalBreedingTime();
|
||||
|
||||
IBee getQueen();
|
||||
|
||||
IBeeHousing getHousing();
|
||||
|
||||
IEffectData[] getEffectData();
|
||||
|
||||
/* UPDATING */
|
||||
void update();
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IBeekeepingMode extends IBeeModifier {
|
||||
|
||||
/**
|
||||
* @return Localized name of this beekeeping mode.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* @return Localized list of strings outlining the behaviour of this beekeeping mode.
|
||||
*/
|
||||
ArrayList<String> getDescription();
|
||||
|
||||
/**
|
||||
* @return Float used to modify the wear on comb frames.
|
||||
*/
|
||||
float getWearModifier();
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return fertility taking into account the birthing queen and surroundings.
|
||||
*/
|
||||
int getFinalFertility(IBee queen, World world, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return true if the queen is genetically "fatigued" and should not be reproduced anymore.
|
||||
*/
|
||||
boolean isFatigued(IBee queen, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @param housing
|
||||
* @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect.
|
||||
*/
|
||||
boolean isOverworked(IBee queen, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param queen
|
||||
* @param offspring
|
||||
* @param housing
|
||||
* @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect.
|
||||
*/
|
||||
boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return true if an offspring of this queen is considered a natural
|
||||
*/
|
||||
boolean isNaturalOffspring(IBee queen);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return true if this mode allows the passed queen or princess to be multiplied
|
||||
*/
|
||||
boolean mayMultiplyPrincess(IBee queen);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Bees can be seeded either as hive drops or as mutation results.
|
||||
*
|
||||
* Add IHiveDrops to BeeManager.hiveDrops
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IHiveDrop {
|
||||
|
||||
ItemStack getPrincess(World world, int x, int y, int z, int fortune);
|
||||
|
||||
Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune);
|
||||
|
||||
Collection<ItemStack> getAdditional(World world, int x, int y, int z, int fortune);
|
||||
|
||||
/**
|
||||
* Chance to drop. Default drops have 80 (= 80 %).
|
||||
*
|
||||
* @param world Minecraft world this is called for.
|
||||
* @param x x-Coordinate of the broken hive.
|
||||
* @param y y-Coordinate of the broken hive.
|
||||
* @param z z-Coordinate of the broken hive.
|
||||
* @return Chance for drop as an integer of 0 - 100.
|
||||
*/
|
||||
int getChance(World world, int x, int y, int z);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IHiveFrame extends IBeeModifier {
|
||||
|
||||
/**
|
||||
* Wears out a frame.
|
||||
*
|
||||
* @param housing
|
||||
* IBeeHousing the frame is contained in.
|
||||
* @param frame
|
||||
* ItemStack containing the actual frame.
|
||||
* @param queen
|
||||
* Current queen in the caller.
|
||||
* @param wear
|
||||
* Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account.
|
||||
* @return ItemStack containing the actual frame with adjusted damage.
|
||||
*/
|
||||
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|apiculture")
|
||||
package forestry.api.apiculture;
|
||||
import cpw.mods.fml.common.API;
|
|
@ -0,0 +1,23 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
public enum EnumGermlingType {
|
||||
SAPLING("Sapling"), BLOSSOM("Blossom"), POLLEN("Pollen"), GERMLING("Germling"), NONE("None");
|
||||
|
||||
public static final EnumGermlingType[] VALUES = values();
|
||||
|
||||
String name;
|
||||
|
||||
private EnumGermlingType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
public enum EnumGrowthConditions {
|
||||
HOSTILE, PALTRY, NORMAL, GOOD, EXCELLENT
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleArea;
|
||||
import forestry.api.genetics.IAlleleFloat;
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
import forestry.api.genetics.IAllelePlantType;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public enum EnumTreeChromosome implements IChromosomeType {
|
||||
|
||||
/**
|
||||
* Determines the following: - WorldGen, including the used wood blocks - {@link IFruitFamily}s supported. Limits which {@link IFruitProvider}
|
||||
* will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome.
|
||||
*/
|
||||
SPECIES(IAlleleTreeSpecies.class),
|
||||
/**
|
||||
* {@link IGrowthProvider}, determines conditions required by the tree to grow.
|
||||
*/
|
||||
GROWTH(IAlleleGrowth.class),
|
||||
/**
|
||||
* A float modifying the height of the tree. Taken into account at worldgen.
|
||||
*/
|
||||
HEIGHT(IAlleleFloat.class),
|
||||
/**
|
||||
* Chance for saplings.
|
||||
*/
|
||||
FERTILITY(IAlleleFloat.class),
|
||||
/**
|
||||
* {@link IFruitProvider}, determines if and what fruits are grown on the tree. Limited by the {@link IFruitFamily}s the species supports.
|
||||
*/
|
||||
FRUITS(IAlleleFruit.class),
|
||||
/**
|
||||
* Chance for fruit leaves and/or drops.
|
||||
*/
|
||||
YIELD(IAlleleFloat.class),
|
||||
/**
|
||||
* May add additional tolerances for {@link EnumPlantTypes}.
|
||||
*/
|
||||
PLANT(IAllelePlantType.class),
|
||||
/**
|
||||
* Determines the speed at which fruit will ripen on this tree.
|
||||
*/
|
||||
SAPPINESS(IAlleleFloat.class),
|
||||
/**
|
||||
* Territory for leaf effects. Unused.
|
||||
*/
|
||||
TERRITORY(IAlleleArea.class),
|
||||
/**
|
||||
* Leaf effect. Unused.
|
||||
*/
|
||||
EFFECT(IAlleleLeafEffect.class),
|
||||
/**
|
||||
* Amount of random ticks which need to elapse before a sapling will grow into a tree.
|
||||
*/
|
||||
MATURATION(IAlleleInteger.class),
|
||||
|
||||
GIRTH(IAlleleInteger.class),
|
||||
;
|
||||
|
||||
Class<? extends IAllele> clss;
|
||||
|
||||
EnumTreeChromosome(Class<? extends IAllele> clss) {
|
||||
this.clss = clss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IAllele> getAlleleClass() {
|
||||
return clss;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.toString().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpeciesRoot getSpeciesRoot() {
|
||||
return AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating an {@link IFruitProvider}.
|
||||
*/
|
||||
public interface IAlleleFruit extends IAllele {
|
||||
|
||||
IFruitProvider getProvider();
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating an {@link IGrowthProvider}.
|
||||
*/
|
||||
public interface IAlleleGrowth extends IAllele {
|
||||
|
||||
IGrowthProvider getProvider();
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating a leaf effect. (Not implemented)
|
||||
*/
|
||||
public interface IAlleleLeafEffect extends IAlleleEffect {
|
||||
|
||||
IEffectData doEffect(ITreeGenome genome, IEffectData storedData, World world, int x, int y, int z);
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public interface IAlleleTreeSpecies extends IAlleleSpecies {
|
||||
|
||||
ITreeRoot getRoot();
|
||||
|
||||
/**
|
||||
* @return Native plant type of this species.
|
||||
*/
|
||||
EnumPlantType getPlantType();
|
||||
|
||||
/**
|
||||
* @return List of all {@link IFruitFamily}s which can grow on leaves generated by this species.
|
||||
*/
|
||||
Collection<IFruitFamily> getSuitableFruit();
|
||||
|
||||
/**
|
||||
* @return Trunk girth. 1 = 1x1, 2 = 2x2, etc.
|
||||
*/
|
||||
@Deprecated
|
||||
int getGirth();
|
||||
|
||||
/**
|
||||
* @param tree
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return Tree generator for the tree at the given location.
|
||||
*/
|
||||
WorldGenerator getGenerator(ITree tree, World world, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @return All available generator classes for this species.
|
||||
*/
|
||||
Class<? extends WorldGenerator>[] getGeneratorClasses();
|
||||
|
||||
/* TEXTURES AND OVERRIDES */
|
||||
int getLeafColour(ITree tree);
|
||||
|
||||
short getLeafIconIndex(ITree tree, boolean fancy);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getGermlingIcon(EnumGermlingType type, int renderPass);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
int getGermlingColour(EnumGermlingType type, int renderPass);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Array of ItemStacks representing logs that these tree produces, the first one being the primary one
|
||||
*/
|
||||
ItemStack[] getLogStacks();
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IBreedingTracker;
|
||||
|
||||
public interface IArboristTracker extends IBreedingTracker {
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public interface IFruitProvider {
|
||||
|
||||
IFruitFamily getFamily();
|
||||
|
||||
int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime);
|
||||
|
||||
boolean markAsFruitLeaf(ITreeGenome genome, World world, int x, int y, int z);
|
||||
|
||||
int getRipeningPeriod();
|
||||
|
||||
// / Products, Chance
|
||||
ItemStack[] getProducts();
|
||||
|
||||
// / Specialty, Chance
|
||||
ItemStack[] getSpecialty();
|
||||
|
||||
ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime);
|
||||
|
||||
/**
|
||||
* @return Short, human-readable identifier used in the treealyzer.
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
/* TEXTURE OVERLAY */
|
||||
/**
|
||||
* @param genome
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param ripeningTime
|
||||
* Elapsed ripening time for the fruit.
|
||||
* @param fancy
|
||||
* @return IIcon index of the texture to overlay on the leaf block.
|
||||
*/
|
||||
short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy);
|
||||
|
||||
/**
|
||||
* @return true if this fruit provider requires fruit blocks to spawn, false otherwise.
|
||||
*/
|
||||
boolean requiresFruitBlocks();
|
||||
|
||||
/**
|
||||
* Tries to spawn a fruit block at the potential position when the tree generates.
|
||||
*
|
||||
* @param genome
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return true if a fruit block was spawned, false otherwise.
|
||||
*/
|
||||
boolean trySpawnFruitBlock(ITreeGenome genome, World world, int x, int y, int z);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerIcons(IIconRegister register);
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IGrowthProvider {
|
||||
|
||||
/**
|
||||
* Check to see whether a sapling at the given location with the given genome can grow into a tree.
|
||||
*
|
||||
* @param genome Genome of the tree this is called for.
|
||||
* @param world Minecraft world the tree will inhabit.
|
||||
* @param xPos x-Coordinate to attempt growth at.
|
||||
* @param yPos y-Coordinate to attempt growth at.
|
||||
* @param zPos z-Coordinate to attempt growth at.
|
||||
* @param expectedGirth Trunk size of the tree to generate.
|
||||
* @param expectedHeight Height of the tree to generate.
|
||||
* @return true if the tree can grow at the given coordinates, false otherwise.
|
||||
*/
|
||||
boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight);
|
||||
|
||||
EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos);
|
||||
|
||||
/**
|
||||
* @return Short, human-readable identifier used in the treealyzer.
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
/**
|
||||
* @return Detailed description of growth behaviour used in the treealyzer.
|
||||
*/
|
||||
String[] getInfo();
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ILeafTickHandler {
|
||||
boolean onRandomLeafTick(ITree tree, World world, int biomeId, int x, int y, int z, boolean isDestroyed);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IToolGrafter {
|
||||
/**
|
||||
* Called by leaves to determine the increase in sapling droprate.
|
||||
*
|
||||
* @param stack ItemStack containing the grafter.
|
||||
* @param world Minecraft world the player and the target block inhabit.
|
||||
* @param x x-Coordinate of the broken leaf block.
|
||||
* @param y y-Coordinate of the broken leaf block.
|
||||
* @param z z-Coordinate of the broken leaf block.
|
||||
* @return Float representing the factor the usual drop chance is to be multiplied by.
|
||||
*/
|
||||
float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, int x, int y, int z);
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
public interface ITree extends IIndividual {
|
||||
|
||||
void mate(ITree other);
|
||||
|
||||
IEffectData[] doEffect(IEffectData[] storedData, World world, int biomeid, int x, int y, int z);
|
||||
|
||||
IEffectData[] doFX(IEffectData[] storedData, World world, int biomeid, int x, int y, int z);
|
||||
|
||||
ITreeGenome getGenome();
|
||||
|
||||
ITreeGenome getMate();
|
||||
|
||||
EnumSet<EnumPlantType> getPlantTypes();
|
||||
|
||||
ITree[] getSaplings(World world, int x, int y, int z, float modifier);
|
||||
|
||||
ItemStack[] getProduceList();
|
||||
|
||||
ItemStack[] getSpecialtyList();
|
||||
|
||||
ItemStack[] produceStacks(World world, int x, int y, int z, int ripeningTime);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return Boolean indicating whether a sapling can stay planted at the given position.
|
||||
*/
|
||||
boolean canStay(World world, int x, int y, int z);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return Boolean indicating whether a sapling at the given position can grow into a tree.
|
||||
*/
|
||||
boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight);
|
||||
|
||||
/**
|
||||
* @return Integer denoting the maturity (block ticks) required for a sapling to attempt to grow into a tree.
|
||||
*/
|
||||
int getRequiredMaturity();
|
||||
|
||||
/**
|
||||
* @return Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars).
|
||||
*/
|
||||
int getResilience();
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return Integer denoting the size of the tree trunk.
|
||||
*/
|
||||
int getGirth(World world, int x, int y, int z);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return Growth conditions at the given position.
|
||||
*/
|
||||
EnumGrowthConditions getGrowthCondition(World world, int x, int y, int z);
|
||||
|
||||
WorldGenerator getTreeGenerator(World world, int x, int y, int z, boolean wasBonemealed);
|
||||
|
||||
ITree copy();
|
||||
|
||||
boolean isPureBred(EnumTreeChromosome chromosome);
|
||||
|
||||
boolean canBearFruit();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IGenome;
|
||||
|
||||
public interface ITreeGenome extends IGenome {
|
||||
|
||||
IAlleleTreeSpecies getPrimary();
|
||||
|
||||
IAlleleTreeSpecies getSecondary();
|
||||
|
||||
IFruitProvider getFruitProvider();
|
||||
|
||||
IGrowthProvider getGrowthProvider();
|
||||
|
||||
float getHeight();
|
||||
|
||||
float getFertility();
|
||||
|
||||
/**
|
||||
* @return Determines either a) how many fruit leaves there are or b) the chance for any fruit leave to drop a sapling. Exact usage determined by the
|
||||
* IFruitProvider
|
||||
*/
|
||||
float getYield();
|
||||
|
||||
float getSappiness();
|
||||
|
||||
EnumSet<EnumPlantType> getPlantTypes();
|
||||
|
||||
/**
|
||||
* @return Amount of random block ticks required for a sapling to mature into a fully grown tree.
|
||||
*/
|
||||
int getMaturationTime();
|
||||
|
||||
int getGirth();
|
||||
|
||||
IAlleleLeafEffect getEffect();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
public interface ITreeModifier {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param genome
|
||||
* @return Float used to modify the height.
|
||||
*/
|
||||
float getHeightModifier(ITreeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param genome
|
||||
* @return Float used to modify the yield.
|
||||
*/
|
||||
float getYieldModifier(ITreeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param genome
|
||||
* @return Float used to modify the sappiness.
|
||||
*/
|
||||
float getSappinessModifier(ITreeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param genome
|
||||
* @return Float used to modify the maturation.
|
||||
*/
|
||||
float getMaturationModifier(ITreeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome0
|
||||
* @param genome1
|
||||
* @return Float used to modify the base mutation chance.
|
||||
*/
|
||||
float getMutationModifier(ITreeGenome genome0, ITreeGenome genome1, float currentModifier);
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface ITreeMutation extends IMutation {
|
||||
|
||||
/**
|
||||
* @return {@link ISpeciesRoot} this mutation is associated with.
|
||||
*/
|
||||
ITreeRoot getRoot();
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param allele0
|
||||
* @param allele1
|
||||
* @param genome0
|
||||
* @param genome1
|
||||
* @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously!
|
||||
*/
|
||||
float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1);
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosome;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface ITreeRoot extends ISpeciesRoot {
|
||||
|
||||
boolean isMember(ItemStack itemstack);
|
||||
|
||||
ITree getMember(ItemStack itemstack);
|
||||
|
||||
ITree getMember(NBTTagCompound compound);
|
||||
|
||||
ITreeGenome templateAsGenome(IAllele[] template);
|
||||
|
||||
ITreeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* @return {@link IArboristTracker} associated with the passed world.
|
||||
*/
|
||||
IArboristTracker getBreedingTracker(World world, String player);
|
||||
|
||||
/* TREE SPECIFIC */
|
||||
/**
|
||||
* Register a leaf tick handler.
|
||||
* @param handler the {@link ILeafTickHandler} to register.
|
||||
*/
|
||||
void registerLeafTickHandler(ILeafTickHandler handler);
|
||||
|
||||
Collection<ILeafTickHandler> getLeafTickHandlers();
|
||||
|
||||
/**
|
||||
* @return type of tree encoded on the itemstack. EnumBeeType.NONE if it isn't a tree.
|
||||
*/
|
||||
EnumGermlingType getType(ItemStack stack);
|
||||
|
||||
ITree getTree(World world, int x, int y, int z);
|
||||
|
||||
ITree getTree(World world, ITreeGenome genome);
|
||||
|
||||
boolean plantSapling(World world, ITree tree, String owner, int x, int y, int z);
|
||||
|
||||
boolean setLeaves(World world, IIndividual tree, String owner, int x, int y, int z);
|
||||
|
||||
IChromosome[] templateAsChromosomes(IAllele[] template);
|
||||
|
||||
IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, short[] indices, int x, int y, int z);
|
||||
|
||||
/* GAME MODE */
|
||||
ArrayList<ITreekeepingMode> getTreekeepingModes();
|
||||
|
||||
ITreekeepingMode getTreekeepingMode(World world);
|
||||
|
||||
ITreekeepingMode getTreekeepingMode(String name);
|
||||
|
||||
void registerTreekeepingMode(ITreekeepingMode mode);
|
||||
|
||||
void setTreekeepingMode(World world, String name);
|
||||
|
||||
/* TEMPLATES */
|
||||
ArrayList<ITree> getIndividualTemplates();
|
||||
|
||||
/* MUTATIONS */
|
||||
Collection<ITreeMutation> getMutations(boolean shuffle);
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public interface ITreekeepingMode extends ITreeModifier {
|
||||
|
||||
/**
|
||||
* @return Localized name of this treekeeping mode.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* @return Localized list of strings outlining the behaviour of this treekeeping mode.
|
||||
*/
|
||||
ArrayList<String> getDescription();
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
public class TreeManager {
|
||||
public static int treeSpeciesCount = 0;
|
||||
|
||||
/**
|
||||
* Get your own reference to this via AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees") and save it somewhere.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ITreeRoot treeInterface;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|arboriculture")
|
||||
package forestry.api.arboriculture;
|
||||
import cpw.mods.fml.common.API;
|
|
@ -0,0 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
public class ChipsetManager {
|
||||
|
||||
public static ISolderManager solderManager;
|
||||
public static ICircuitRegistry circuitRegistry;
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public interface ICircuit {
|
||||
String getUID();
|
||||
|
||||
boolean requiresDiscovery();
|
||||
|
||||
int getLimit();
|
||||
|
||||
String getName();
|
||||
|
||||
boolean isCircuitable(TileEntity tile);
|
||||
|
||||
void onInsertion(int slot, TileEntity tile);
|
||||
|
||||
void onLoad(int slot, TileEntity tile);
|
||||
|
||||
void onRemoval(int slot, TileEntity tile);
|
||||
|
||||
void onTick(int slot, TileEntity tile);
|
||||
|
||||
void addTooltip(List<String> list);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import forestry.api.core.INBTTagable;
|
||||
|
||||
public interface ICircuitBoard extends INBTTagable {
|
||||
|
||||
int getPrimaryColor();
|
||||
|
||||
int getSecondaryColor();
|
||||
|
||||
void addTooltip(List<String> list);
|
||||
|
||||
void onInsertion(TileEntity tile);
|
||||
|
||||
void onLoad(TileEntity tile);
|
||||
|
||||
void onRemoval(TileEntity tile);
|
||||
|
||||
void onTick(TileEntity tile);
|
||||
|
||||
ICircuit[] getCircuits();
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
public interface ICircuitLayout {
|
||||
|
||||
String getUID();
|
||||
|
||||
String getName();
|
||||
|
||||
String getUsage();
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
public interface ICircuitLibrary {
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ICircuitRegistry {
|
||||
|
||||
/* CIRCUITS */
|
||||
HashMap<String, ICircuit> getRegisteredCircuits();
|
||||
|
||||
void registerCircuit(ICircuit circuit);
|
||||
|
||||
ICircuit getCircuit(String uid);
|
||||
|
||||
ICircuitLibrary getCircuitLibrary(World world, String playername);
|
||||
|
||||
void registerLegacyMapping(int id, String uid);
|
||||
|
||||
ICircuit getFromLegacyMap(int id);
|
||||
|
||||
/* LAYOUTS */
|
||||
HashMap<String, ICircuitLayout> getRegisteredLayouts();
|
||||
|
||||
void registerLayout(ICircuitLayout layout);
|
||||
|
||||
ICircuitLayout getLayout(String uid);
|
||||
|
||||
ICircuitLayout getDefaultLayout();
|
||||
|
||||
|
||||
ICircuitBoard getCircuitboard(ItemStack itemstack);
|
||||
|
||||
boolean isChipset(ItemStack itemstack);
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.circuits;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ISolderManager {
|
||||
|
||||
void addRecipe(ICircuitLayout layout, ItemStack resource, ICircuit circuit);
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|circuits")
|
||||
package forestry.api.circuits;
|
||||
import cpw.mods.fml.common.API;
|
|
@ -0,0 +1,40 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
public class BlockInterface {
|
||||
/**
|
||||
* Rather limited function to retrieve block ids.
|
||||
*
|
||||
* @param ident
|
||||
* @return ItemStack representing the block.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ItemStack getBlock(String ident) {
|
||||
ItemStack item = null;
|
||||
|
||||
try {
|
||||
String pack = ItemInterface.class.getPackage().getName();
|
||||
pack = pack.substring(0, pack.lastIndexOf('.'));
|
||||
String itemClass = pack.substring(0, pack.lastIndexOf('.')) + ".core.config.ForestryBlock";
|
||||
Object obj = Class.forName(itemClass).getField(ident).get(null);
|
||||
if (obj instanceof Block)
|
||||
item = new ItemStack((Block) obj);
|
||||
else if (obj instanceof ItemStack)
|
||||
item = (ItemStack) obj;
|
||||
} catch (Exception ex) {
|
||||
FMLLog.warning("Could not retrieve Forestry block identified by: " + ident);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location.
|
||||
*
|
||||
* This enum concerns humidity.
|
||||
*/
|
||||
public enum EnumHumidity {
|
||||
ARID("Arid"), NORMAL("Normal"), DAMP("Damp");
|
||||
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional arid biomes here. (ex. desert)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> aridBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional damp biomes here. (ex. jungle)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> dampBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional normal biomes here.
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> normalBiomeIds = new ArrayList<Integer>();
|
||||
|
||||
public final String name;
|
||||
|
||||
private EnumHumidity(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> getBiomeIds(EnumHumidity humidity) {
|
||||
switch (humidity) {
|
||||
case ARID:
|
||||
return aridBiomeIds;
|
||||
case DAMP:
|
||||
return dampBiomeIds;
|
||||
case NORMAL:
|
||||
default:
|
||||
return normalBiomeIds;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the EnumHumidity given a floating point representation of Minecraft Rainfall
|
||||
* @param rawHumidity raw rainfall value
|
||||
* @return EnumHumidity corresponding to rainfall value
|
||||
*/
|
||||
public static EnumHumidity getFromValue(float rawHumidity) {
|
||||
EnumHumidity value = EnumHumidity.ARID;
|
||||
|
||||
if (rawHumidity >= 0.9f) {
|
||||
value = EnumHumidity.DAMP;
|
||||
}
|
||||
else if (rawHumidity >= 0.3f) {
|
||||
value = EnumHumidity.NORMAL;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
/**
|
||||
* Many things Forestry use temperature and humidity of a biome to determine whether they can or how they can work or spawn at a given location.
|
||||
*
|
||||
* This enum concerns temperature.
|
||||
*/
|
||||
public enum EnumTemperature {
|
||||
NONE("None", "habitats/ocean"), ICY("Icy", "habitats/snow"), COLD("Cold", "habitats/taiga"),
|
||||
NORMAL("Normal", "habitats/plains"), WARM("Warm", "habitats/jungle"), HOT("Hot", "habitats/desert"), HELLISH("Hellish", "habitats/nether");
|
||||
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional icy/snow biomes here. (ex. snow plains)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> icyBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional cold biomes here. (ex. taiga)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> coldBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional normal biomes here. (ex. forest, plains)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> normalBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional warm biomes here. (ex. jungle)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> warmBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional hot biomes here. (ex. desert)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> hotBiomeIds = new ArrayList<Integer>();
|
||||
/**
|
||||
* Populated by Forestry with vanilla biomes. Add additional hellish biomes here. (ex. nether)
|
||||
* @deprecated Biomes will be checked live rather than relying on cached values, so you don't have to register them.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> hellishBiomeIds = new ArrayList<Integer>();
|
||||
|
||||
public final String name;
|
||||
public final String iconIndex;
|
||||
|
||||
private EnumTemperature(String name, String iconIndex) {
|
||||
this.name = name;
|
||||
this.iconIndex = iconIndex;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon() {
|
||||
return ForestryAPI.textureManager.getDefault(iconIndex);
|
||||
}
|
||||
/**
|
||||
* @deprecated Switching most internals to use getFromValue to not rely on cached values.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<Integer> getBiomeIds(EnumTemperature temperature) {
|
||||
|
||||
switch (temperature) {
|
||||
case ICY:
|
||||
return icyBiomeIds;
|
||||
case COLD:
|
||||
return coldBiomeIds;
|
||||
case WARM:
|
||||
return warmBiomeIds;
|
||||
case HOT:
|
||||
return hotBiomeIds;
|
||||
case HELLISH:
|
||||
return hellishBiomeIds;
|
||||
case NORMAL:
|
||||
default:
|
||||
return normalBiomeIds;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a given BiomeGenBase is of HELLISH temperature, since it is treated seperatly from actual temperature values.
|
||||
* Uses the BiomeDictionary.
|
||||
* @param biomeGen BiomeGenBase of the biome in question
|
||||
* @return true, if the BiomeGenBase is a Nether-type biome; false otherwise.
|
||||
*/
|
||||
public static boolean isBiomeHellish(BiomeGenBase biomeGen) {
|
||||
return BiomeDictionary.isBiomeOfType(biomeGen, BiomeDictionary.Type.NETHER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a given biomeID is of HELLISH temperature, since it is treated seperatly from actual temperature values.
|
||||
* Uses the BiomeDictionary.
|
||||
* @param biomeID ID of the BiomeGenBase in question
|
||||
* @return true, if the biomeID is a Nether-type biome; false otherwise.
|
||||
*/
|
||||
public static boolean isBiomeHellish(int biomeID) {
|
||||
return BiomeDictionary.isBiomeRegistered(biomeID) && BiomeDictionary.isBiomeOfType(BiomeGenBase.getBiome(biomeID), BiomeDictionary.Type.NETHER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the EnumTemperature given a floating point representation of
|
||||
* Minecraft temperature. Hellish biomes are handled based on their biome
|
||||
* type - check isBiomeHellish.
|
||||
* @param rawTemp raw temperature value
|
||||
* @return EnumTemperature corresponding to value of rawTemp
|
||||
*/
|
||||
public static EnumTemperature getFromValue(float rawTemp) {
|
||||
EnumTemperature value = EnumTemperature.ICY;
|
||||
|
||||
if (rawTemp >= 2.0f) {
|
||||
value = EnumTemperature.HOT;
|
||||
}
|
||||
else if (rawTemp >= 0.95f) {
|
||||
value = EnumTemperature.WARM;
|
||||
}
|
||||
else if (rawTemp >= 0.2f) {
|
||||
value = EnumTemperature.NORMAL;
|
||||
}
|
||||
else if (rawTemp >= 0.05f) {
|
||||
value = EnumTemperature.COLD;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Forestry's API is divided into several subcategories to make it easier to understand.
|
||||
*
|
||||
* If you need to distribute API files, try to only include the parts you are actually
|
||||
* using to minimize conflicts due to API changes.
|
||||
*
|
||||
* .core - Miscallenous base classes and interfaces as well as some basics for tools, armor, game modes and stuff needed by biome mods.
|
||||
* .fuels - Managers and classes to facilitate adding fuels to various engines and machines.
|
||||
* .recipes - Managers and helpers to facilitate adding new recipes to various machines.
|
||||
* .storage - Managers, events and interfaces for defining new backpacks and handling backpack behaviour.
|
||||
* .mail - Anything related to handling letters and adding new mail carrier systems.
|
||||
* .genetics - Shared code for all genetic subclasses.
|
||||
* \ .apiculture - Bees.
|
||||
* \ .arboriculture - Trees.
|
||||
* \ .lepidopterology - Butterflies.
|
||||
*
|
||||
* Note that if Forestry is not present, all these references will be null.
|
||||
*/
|
||||
public class ForestryAPI {
|
||||
|
||||
/**
|
||||
* The main mod instance for Forestry.
|
||||
*/
|
||||
public static Object instance;
|
||||
|
||||
/**
|
||||
* A {@link ITextureManager} needed for some things in the API.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static ITextureManager textureManager;
|
||||
|
||||
/**
|
||||
* The currently active {@link IGameMode}.
|
||||
*/
|
||||
public static IGameMode activeMode;
|
||||
|
||||
/**
|
||||
* Provides information on certain Forestry constants (Villager IDs, Chest gen keys, etc)
|
||||
*/
|
||||
public static IForestryConstants forestryConstants;
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IBreedingTracker;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public abstract class ForestryEvent extends Event {
|
||||
|
||||
private static abstract class BreedingEvent extends ForestryEvent {
|
||||
public final ISpeciesRoot root;
|
||||
public final IBreedingTracker tracker;
|
||||
public final String username;
|
||||
|
||||
private BreedingEvent(ISpeciesRoot root, String username, IBreedingTracker tracker) {
|
||||
super();
|
||||
this.root = root;
|
||||
this.username = username;
|
||||
this.tracker = tracker;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SpeciesDiscovered extends BreedingEvent {
|
||||
public final IAlleleSpecies species;
|
||||
public SpeciesDiscovered(ISpeciesRoot root, String username, IAlleleSpecies species, IBreedingTracker tracker) {
|
||||
super(root, username, tracker);
|
||||
this.species = species;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MutationDiscovered extends BreedingEvent {
|
||||
public final IMutation allele;
|
||||
public MutationDiscovered(ISpeciesRoot root, String username, IMutation allele, IBreedingTracker tracker) {
|
||||
super(root, username, tracker);
|
||||
this.allele = allele;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SyncedBreedingTracker extends ForestryEvent {
|
||||
public final IBreedingTracker tracker;
|
||||
public final EntityPlayer player;
|
||||
public SyncedBreedingTracker(IBreedingTracker tracker, EntityPlayer player) {
|
||||
super();
|
||||
this.tracker = tracker;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IArmorNaturalist {
|
||||
|
||||
/**
|
||||
* Called when the naturalist's armor acts as spectacles for seeing pollinated tree leaves/flowers.
|
||||
*
|
||||
* @param player
|
||||
* Player doing the viewing
|
||||
* @param armor
|
||||
* Armor item
|
||||
* @param doSee
|
||||
* Whether or not to actually do the side effects of viewing
|
||||
* @return true if the armor actually allows the player to see pollination.
|
||||
*/
|
||||
public boolean canSeePollination(EntityPlayer player, ItemStack armor, boolean doSee);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
public interface IForestryConstants {
|
||||
|
||||
/**
|
||||
* @return The villager ID for the Apiarist Villager.
|
||||
*/
|
||||
public int getApicultureVillagerID();
|
||||
|
||||
/**
|
||||
* @return The villager ID for the Arborist Villager.
|
||||
*/
|
||||
public int getArboricultureVillagerID();
|
||||
|
||||
/**
|
||||
* @return The ChestGenHooks key for adding items to the Forestry Villager chest.
|
||||
*/
|
||||
public String getVillagerChestGenKey();
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IGameMode {
|
||||
|
||||
/**
|
||||
* @return Human-readable identifier for the game mode. (i.e. 'EASY', 'NORMAL', 'HARD')
|
||||
*/
|
||||
String getIdentifier();
|
||||
|
||||
/**
|
||||
* @param ident Identifier for the setting. (See the gamemode config.)
|
||||
* @return Value of the requested setting, false if unknown setting.
|
||||
*/
|
||||
boolean getBooleanSetting(String ident);
|
||||
|
||||
/**
|
||||
* @param ident Identifier for the setting. (See the gamemode config.)
|
||||
* @return Value of the requested setting, 0 if unknown setting.
|
||||
*/
|
||||
int getIntegerSetting(String ident);
|
||||
|
||||
/**
|
||||
* @param ident Identifier for the setting. (See the gamemode config.)
|
||||
* @return Value of the requested setting, 0 if unknown setting.
|
||||
*/
|
||||
float getFloatSetting(String ident);
|
||||
|
||||
/**
|
||||
* @param ident Identifier for the setting. (See the gamemode config.)
|
||||
* @return Value of the requested setting, an itemstack containing an apple if unknown setting.
|
||||
*/
|
||||
ItemStack getStackSetting(String ident);
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Provides icons, needed in some interfaces, most notably for bees and trees.
|
||||
*/
|
||||
public interface IIconProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getIcon(short texUID);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerIcons(IIconRegister register);
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public interface INBTTagable {
|
||||
void readFromNBT(NBTTagCompound nbttagcompound);
|
||||
|
||||
void writeToNBT(NBTTagCompound nbttagcompound);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
/**
|
||||
* Optional way to hook into Forestry.
|
||||
*
|
||||
* Plugin classes can reside in any package, their class name however has to start with 'Plugin', i.e. 'PluginMyStuff'.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IPlugin {
|
||||
|
||||
/**
|
||||
* @return true if the plugin is to be loaded.
|
||||
*/
|
||||
public boolean isAvailable();
|
||||
|
||||
/**
|
||||
* Called during Forestry's @PreInit.
|
||||
*/
|
||||
public void preInit();
|
||||
|
||||
/**
|
||||
* Called at the start of Forestry's @PostInit.
|
||||
*/
|
||||
public void doInit();
|
||||
|
||||
/**
|
||||
* Called at the end of Forestry's @PostInit.
|
||||
*/
|
||||
public void postInit();
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
public interface IStructureLogic extends INBTTagable {
|
||||
|
||||
/**
|
||||
* @return String unique to the type of structure controlled by this structure logic.
|
||||
*/
|
||||
String getTypeUID();
|
||||
|
||||
/**
|
||||
* Called by {@link ITileStructure}'s validateStructure().
|
||||
*/
|
||||
void validateStructure();
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface ITextureManager {
|
||||
|
||||
void registerIconProvider(IIconProvider provider);
|
||||
|
||||
IIcon getIcon(short texUID);
|
||||
|
||||
IIcon getDefault(String ident);
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* The basis for multiblock components.
|
||||
*/
|
||||
public interface ITileStructure {
|
||||
|
||||
/**
|
||||
* @return String unique to the type of structure controlled by this structure logic. Should map to {@link IStructureLogic}
|
||||
*/
|
||||
String getTypeUID();
|
||||
|
||||
/**
|
||||
* Should map to {@link IStructureLogic}
|
||||
*/
|
||||
void validateStructure();
|
||||
|
||||
/**
|
||||
* Called when the structure resets.
|
||||
*/
|
||||
void onStructureReset();
|
||||
|
||||
/**
|
||||
* @return TileEntity that is the master in this structure, null if no structure exists.
|
||||
*/
|
||||
ITileStructure getCentralTE();
|
||||
|
||||
/**
|
||||
* Called to set the master TileEntity. Implementing TileEntity should keep track of the master's coordinates, not refer to the TE object itself.
|
||||
*
|
||||
* @param tile
|
||||
*/
|
||||
void setCentralTE(TileEntity tile);
|
||||
|
||||
/**
|
||||
* @return IInventory representing the TE's inventory.
|
||||
*/
|
||||
IInventory getInventory();
|
||||
|
||||
/**
|
||||
* Only called on Forestry's own blocks.
|
||||
*/
|
||||
void makeMaster();
|
||||
|
||||
/**
|
||||
* @return true if this TE is the master in a structure, false otherwise.
|
||||
*/
|
||||
boolean isMaster();
|
||||
|
||||
/**
|
||||
* @return true if the TE is master or has a master.
|
||||
*/
|
||||
boolean isIntegratedIntoStructure();
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
/**
|
||||
* Marks a tool as a scoop.
|
||||
*/
|
||||
public interface IToolScoop {
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
/**
|
||||
* This is going away someday, use FML's GameRegistry instead.
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public class ItemInterface {
|
||||
|
||||
/**
|
||||
* Get items here!
|
||||
*
|
||||
* Blocks currently not supported.
|
||||
*
|
||||
* @param ident
|
||||
* @return ItemStack representing the item, null if not found.
|
||||
*/
|
||||
public static ItemStack getItem(String ident) {
|
||||
ItemStack item = null;
|
||||
|
||||
try {
|
||||
String pack = ItemInterface.class.getPackage().getName();
|
||||
pack = pack.substring(0, pack.lastIndexOf('.'));
|
||||
String itemClass = pack.substring(0, pack.lastIndexOf('.')) + ".core.config.ForestryItem";
|
||||
Object[] enums = Class.forName(itemClass).getEnumConstants();
|
||||
for (Object e : enums) {
|
||||
if (e.toString().equals(ident)) {
|
||||
Method m = e.getClass().getMethod("getItemStack");
|
||||
return (ItemStack) m.invoke(e);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
FMLLog.warning("Could not retrieve Forestry item identified by: " + ident);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* Optional annotation to provide additional information on IPlugins. This information will be available via the "/forestry plugin info $pluginID" command ingame.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface PluginInfo {
|
||||
|
||||
/**
|
||||
* @return Unique identifier for the plugin, no spaces!
|
||||
*/
|
||||
String pluginID();
|
||||
|
||||
/**
|
||||
* @return Nice and readable plugin name.
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* @return Plugin author's name.
|
||||
*/
|
||||
String author() default "";
|
||||
|
||||
/**
|
||||
* @return URL of plugin homepage.
|
||||
*/
|
||||
String url() default "";
|
||||
|
||||
/**
|
||||
* @return Version of the plugin, if any.
|
||||
*/
|
||||
String version() default "";
|
||||
|
||||
/**
|
||||
* @return Short description what the plugin does.
|
||||
*/
|
||||
String description() default "";
|
||||
|
||||
/**
|
||||
* @return Not used (yet?).
|
||||
*/
|
||||
String help() default "";
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
/**
|
||||
* References to the specialised tabs added by Forestry to creative inventory.
|
||||
*/
|
||||
public class Tabs {
|
||||
|
||||
public static CreativeTabs tabApiculture;
|
||||
public static CreativeTabs tabArboriculture;
|
||||
public static CreativeTabs tabLepidopterology;
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="1.0", owner="Forestry", provides="ForestryAPI|core")
|
||||
package forestry.api.core;
|
||||
import cpw.mods.fml.common.API;
|
|
@ -0,0 +1,20 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Farmables {
|
||||
/**
|
||||
* Can be used to add IFarmables to some of the vanilla farm logics.
|
||||
*
|
||||
* Identifiers: farmArboreal farmWheat farmGourd farmInfernal farmPoales farmSucculentes farmVegetables farmShroom
|
||||
*/
|
||||
public static HashMap<String, Collection<IFarmable>> farmables = new HashMap<String, Collection<IFarmable>>();
|
||||
|
||||
public static IFarmInterface farmInterface;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ICrop {
|
||||
|
||||
/**
|
||||
* Harvests this crop. Performs the necessary manipulations to set the crop into a "harvested" state.
|
||||
*
|
||||
* @return Products harvested.
|
||||
*/
|
||||
Collection<ItemStack> harvest();
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import forestry.api.core.ITileStructure;
|
||||
|
||||
public interface IFarmComponent extends ITileStructure {
|
||||
|
||||
boolean hasFunction();
|
||||
|
||||
void registerListener(IFarmListener listener);
|
||||
|
||||
void removeListener(IFarmListener listener);
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public interface IFarmHousing {
|
||||
|
||||
int[] getCoords();
|
||||
|
||||
int[] getArea();
|
||||
|
||||
int[] getOffset();
|
||||
|
||||
World getWorld();
|
||||
|
||||
/**
|
||||
* Will run the work cycle on a master TE. Will do nothing on any other farm component.
|
||||
*
|
||||
* @return true if any work was done, false otherwise.
|
||||
*/
|
||||
boolean doWork();
|
||||
|
||||
boolean hasLiquid(FluidStack liquid);
|
||||
|
||||
void removeLiquid(FluidStack liquid);
|
||||
|
||||
boolean hasResources(ItemStack[] resources);
|
||||
|
||||
void removeResources(ItemStack[] resources);
|
||||
|
||||
/**
|
||||
* Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling from the farm's inventory. It's up to the
|
||||
* logic to only call this on a valid location.
|
||||
*
|
||||
* @param farmable
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return true if planting was successful, false otherwise.
|
||||
*/
|
||||
boolean plantGermling(IFarmable farmable, World world, int x, int y, int z);
|
||||
|
||||
/* INTERACTION WITH HATCHES */
|
||||
boolean acceptsAsGermling(ItemStack itemstack);
|
||||
|
||||
boolean acceptsAsResource(ItemStack itemstack);
|
||||
|
||||
boolean acceptsAsFertilizer(ItemStack itemstack);
|
||||
|
||||
/* LOGIC */
|
||||
/**
|
||||
* Set a farm logic for the given direction. UP/DOWN/UNKNOWN are invalid!
|
||||
*
|
||||
* @param direction
|
||||
* @param logic
|
||||
*/
|
||||
void setFarmLogic(ForgeDirection direction, IFarmLogic logic);
|
||||
|
||||
/**
|
||||
* Reset the farm logic for the given direction to default. UP/DOWN/UNKNOWN are invalid!
|
||||
*
|
||||
* @param direction
|
||||
*/
|
||||
void resetFarmLogic(ForgeDirection direction);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import forestry.api.core.IStructureLogic;
|
||||
|
||||
public interface IFarmInterface {
|
||||
|
||||
/**
|
||||
* Creates {@link IStructureLogic} for use in farm components.
|
||||
*
|
||||
* @param structure
|
||||
* {@link IFarmComponent} to create the logic for.
|
||||
* @return {@link IStructureLogic} for use in farm components
|
||||
*/
|
||||
IStructureLogic createFarmStructureLogic(IFarmComponent structure);
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IFarmListener {
|
||||
|
||||
/**
|
||||
* Called before a crop is harvested.
|
||||
*
|
||||
* @param crop
|
||||
* ICrop about to be harvested.
|
||||
* @return true to cancel further processing of this crop.
|
||||
*/
|
||||
boolean beforeCropHarvest(ICrop crop);
|
||||
|
||||
/**
|
||||
* Called after a crop has been harvested, but before harvested items are stowed in the farms inventory.
|
||||
*
|
||||
* @param harvested
|
||||
* Collection of harvested stacks. May be manipulated. Ensure removal of stacks with 0 or less items!
|
||||
* @param crop
|
||||
* Harvested {@link ICrop}
|
||||
*/
|
||||
void afterCropHarvest(Collection<ItemStack> harvested, ICrop crop);
|
||||
|
||||
/**
|
||||
* Called after the stack of collected items has been returned by the farm logic, but before it is added to the farm's pending queue.
|
||||
*
|
||||
* @param collected
|
||||
* Collection of collected stacks. May be manipulated. Ensure removal of stacks with 0 or less items!
|
||||
* @param logic
|
||||
*/
|
||||
void hasCollected(Collection<ItemStack> collected, IFarmLogic logic);
|
||||
|
||||
/**
|
||||
* Called after farmland has successfully been cultivated by a farm logic.
|
||||
*
|
||||
* @param logic
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param direction
|
||||
* @param extent
|
||||
*/
|
||||
void hasCultivated(IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent);
|
||||
|
||||
/**
|
||||
* Called after the stack of harvested crops has been returned by the farm logic, but before it is added to the farm's pending queue.
|
||||
*
|
||||
* @param harvested
|
||||
* @param logic
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param direction
|
||||
* @param extent
|
||||
*/
|
||||
void hasScheduledHarvest(Collection<ICrop> harvested, IFarmLogic logic, int x, int y, int z, ForgeDirection direction, int extent);
|
||||
|
||||
/**
|
||||
* Can be used to cancel farm task on a per side/{@link IFarmLogic} basis.
|
||||
*
|
||||
* @param logic
|
||||
* @param direction
|
||||
* @return true to skip any work action on the given logic and direction for this work cycle.
|
||||
*/
|
||||
boolean cancelTask(IFarmLogic logic, ForgeDirection direction);
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IFarmLogic {
|
||||
|
||||
int getFertilizerConsumption();
|
||||
|
||||
int getWaterConsumption(float hydrationModifier);
|
||||
|
||||
boolean isAcceptedResource(ItemStack itemstack);
|
||||
|
||||
boolean isAcceptedGermling(ItemStack itemstack);
|
||||
|
||||
Collection<ItemStack> collect();
|
||||
|
||||
boolean cultivate(int x, int y, int z, ForgeDirection direction, int extent);
|
||||
|
||||
Collection<ICrop> harvest(int x, int y, int z, ForgeDirection direction, int extent);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getIcon();
|
||||
|
||||
ResourceLocation getSpriteSheet();
|
||||
|
||||
String getName();
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.farming;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* IGermling describes a crop or other harvestable object and can be used to inspect item stacks and blocks for matches.
|
||||
*/
|
||||
public interface IFarmable {
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return true if the block at the given location is a "sapling" for this type, i.e. a non-harvestable immature version of the crop.
|
||||
*/
|
||||
boolean isSaplingAt(World world, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return {@link ICrop} if the block at the given location is a harvestable and mature crop, null otherwise.
|
||||
*/
|
||||
ICrop getCropAt(World world, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @param itemstack
|
||||
* @return true if the item is a valid germling (plantable sapling, seed, etc.) for this type.
|
||||
*/
|
||||
boolean isGermling(ItemStack itemstack);
|
||||
|
||||
/**
|
||||
* @param itemstack
|
||||
* @return true if the item is something that can drop from this type without actually being harvested as a crop. (Apples or sapling from decaying leaves.)
|
||||
*/
|
||||
boolean isWindfall(ItemStack itemstack);
|
||||
|
||||
/**
|
||||
* Plants a sapling by manipulating the world. The {@link IFarmLogic} should have verified the given location as valid. Called by the {@link IFarmHousing}
|
||||
* which handles resources.
|
||||
*
|
||||
* @param germling
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return true on success, false otherwise.
|
||||
*/
|
||||
boolean plantSaplingAt(ItemStack germling, World world, int x, int y, int z);
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|farming")
|
||||
package forestry.api.farming;
|
||||
import cpw.mods.fml.common.API;
|
|
@ -0,0 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.food;
|
||||
|
||||
public class BeverageManager {
|
||||
public static IBeverageEffect[] effectList = new IBeverageEffect[128];
|
||||
|
||||
public static IInfuserManager infuserManager;
|
||||
public static IIngredientManager ingredientManager;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.food;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IBeverageEffect {
|
||||
int getId();
|
||||
|
||||
void doEffect(World world, EntityPlayer player);
|
||||
|
||||
String getDescription();
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.food;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IInfuserManager {
|
||||
|
||||
void addMixture(int meta, ItemStack ingredient, IBeverageEffect effect);
|
||||
|
||||
void addMixture(int meta, ItemStack[] ingredients, IBeverageEffect effect);
|
||||
|
||||
ItemStack getSeasoned(ItemStack base, ItemStack[] ingredients);
|
||||
|
||||
boolean hasMixtures(ItemStack[] ingredients);
|
||||
|
||||
ItemStack[] getRequired(ItemStack[] ingredients);
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.food;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IIngredientManager {
|
||||
|
||||
String getDescription(ItemStack itemstack);
|
||||
|
||||
void addIngredient(ItemStack ingredient, String description);
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|food")
|
||||
package forestry.api.food;
|
||||
import cpw.mods.fml.common.API;
|
|
@ -0,0 +1,34 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class EngineBronzeFuel {
|
||||
/**
|
||||
* Item that is valid fuel for a biogas engine.
|
||||
*/
|
||||
public final Fluid liquid;
|
||||
/**
|
||||
* Power produced by this fuel per work cycle of the engine.
|
||||
*/
|
||||
public final int powerPerCycle;
|
||||
/**
|
||||
* How many work cycles a single "stack" of this type lasts.
|
||||
*/
|
||||
public final int burnDuration;
|
||||
/**
|
||||
* By how much the normal heat dissipation rate of 1 is multiplied when using this fuel type.
|
||||
*/
|
||||
public final int dissipationMultiplier;
|
||||
|
||||
public EngineBronzeFuel(Fluid liquid, int powerPerCycle, int burnDuration, int dissipationMultiplier) {
|
||||
this.liquid = liquid;
|
||||
this.powerPerCycle = powerPerCycle;
|
||||
this.burnDuration = burnDuration;
|
||||
this.dissipationMultiplier = dissipationMultiplier;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EngineCopperFuel {
|
||||
|
||||
/**
|
||||
* Item that is valid fuel for a peat-fired engine.
|
||||
*/
|
||||
public final ItemStack fuel;
|
||||
/**
|
||||
* Power produced by this fuel per work cycle.
|
||||
*/
|
||||
public final int powerPerCycle;
|
||||
/**
|
||||
* Amount of work cycles this item lasts before being consumed.
|
||||
*/
|
||||
public final int burnDuration;
|
||||
|
||||
public EngineCopperFuel(ItemStack fuel, int powerPerCycle, int burnDuration) {
|
||||
this.fuel = fuel;
|
||||
this.powerPerCycle = powerPerCycle;
|
||||
this.burnDuration = burnDuration;
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue