mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 09:34:57 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
202d19df93 | ||
|
|
333334190a | ||
|
|
7c00ea2965 | ||
|
|
79cf866a96 | ||
|
|
504ec8acfc | ||
|
|
44a926f897 | ||
|
|
30d7365518 | ||
|
|
56800af94d | ||
|
|
043571b659 | ||
|
|
7fd2776147 | ||
|
|
d4c2d7220d | ||
|
|
d392666dc4 | ||
|
|
07b88d36fc | ||
|
|
408d1dc7c3 | ||
|
|
7b1aead339 | ||
|
|
21969649a2 | ||
|
|
f9b8b89340 | ||
|
|
65712adcb3 | ||
|
|
9864a84a13 | ||
|
|
8f9ae45147 | ||
|
|
2965f28403 | ||
|
|
cb93c217e0 | ||
|
|
219e9bf355 | ||
|
|
43a2f0ae76 | ||
|
|
098b739dca | ||
|
|
4dfa29b1ad | ||
|
|
60d2820ed6 | ||
|
|
91ec6cff9b | ||
|
|
1775e59880 | ||
|
|
f62745b233 | ||
|
|
1d6293c788 | ||
|
|
3fd07f2a7a | ||
|
|
856e800e0e | ||
|
|
d9561fd7af | ||
|
|
e0623f7d57 | ||
|
|
d48b979ac3 | ||
|
|
63494c40a7 | ||
|
|
2c57aef3b3 | ||
|
|
1392823fae | ||
|
|
67693961ac | ||
|
|
8ad8597ff0 | ||
|
|
4c8d5e2f43 | ||
|
|
d04713339c | ||
|
|
844aea7431 | ||
|
|
53a9bf458e | ||
|
|
2ae52451b2 | ||
|
|
d3054c33e7 | ||
|
|
bf61462a2a | ||
|
|
41f3ae4b1f | ||
|
|
b1d7c1721d | ||
|
|
2944165741 | ||
|
|
e316526675 | ||
|
|
411cbd913c | ||
|
|
2191d00f3d | ||
|
|
a02af0ddf2 | ||
|
|
a8e4f5dde7 | ||
|
|
85718b1df8 | ||
|
|
781b4d883b | ||
|
|
c5c056750a | ||
|
|
3b8af4e4c9 | ||
|
|
f58938ff32 | ||
|
|
a05bc13852 | ||
|
|
1cd3e15ef9 | ||
|
|
1ac7a7de42 | ||
|
|
90ed57c742 | ||
|
|
94b0b44f51 | ||
|
|
c0fafc20da | ||
|
|
4f85236475 | ||
|
|
41ab1ea374 | ||
|
|
52b8d56ff0 | ||
|
|
a61879daff | ||
|
|
e71edd5855 | ||
|
|
321e316665 | ||
|
|
aca6ed1fd8 | ||
|
|
b135593733 | ||
|
|
ac7fe4b2d2 | ||
|
|
5e0e045053 | ||
|
|
f01dab6f58 | ||
|
|
9385a4caca | ||
|
|
582c8d64df | ||
|
|
26c40b2006 | ||
|
|
b7eaaf6804 | ||
|
|
3f07e68952 | ||
|
|
2b40762934 | ||
|
|
dcaf6e144f | ||
|
|
413e1b9a0d | ||
|
|
64f64f2b5c | ||
|
|
2d25754731 | ||
|
|
2df6cfb7f7 | ||
|
|
2d0ca49359 | ||
|
|
d567138365 | ||
|
|
72380251f3 | ||
|
|
05a263826e | ||
|
|
61aa8bdcf0 | ||
|
|
e0694842b6 | ||
|
|
ff9942d0bc | ||
|
|
dcf7776cc1 | ||
|
|
a0d355d0aa | ||
|
|
649a061b6e | ||
|
|
2ca743a931 | ||
|
|
76a34a603b | ||
|
|
68651939e7 | ||
|
|
9dcc818a17 | ||
|
|
5e3c23e4eb | ||
|
|
d8ffc5c4b8 | ||
|
|
737f64eeab | ||
|
|
0db27d83b0 | ||
|
|
f57de19b06 | ||
|
|
1fed58fae5 | ||
|
|
1d8d61daf1 | ||
|
|
65bd93749c | ||
|
|
ac48b4b5c6 | ||
|
|
3be3ecfc8a | ||
|
|
10aae6b6bc | ||
|
|
d84560926c | ||
|
|
ab3de49198 | ||
|
|
b2b743398c | ||
|
|
52f233e84a | ||
|
|
2f2ec91670 | ||
|
|
2e2fa8e6df | ||
|
|
3de6e0c5b7 | ||
|
|
0f4ba8d8fa | ||
|
|
9570d26c83 | ||
|
|
01dc4f2bfe | ||
|
|
80de4d6490 | ||
|
|
253e9f18ed | ||
|
|
bbda5c8ba9 | ||
|
|
c289590740 | ||
|
|
714858be99 | ||
|
|
5bb60cad8a | ||
|
|
b8cf4ef1cf | ||
|
|
d35075d681 | ||
|
|
79c56311c2 | ||
|
|
77cea8a645 | ||
|
|
ed00ca3158 | ||
|
|
418f00abf2 | ||
|
|
0fa8fdad39 | ||
|
|
0a110eb761 | ||
|
|
9feb5cb114 | ||
|
|
7aa44fb1fa | ||
|
|
84fa956ce4 | ||
|
|
0c14a85c31 | ||
|
|
a20fbbe60f | ||
|
|
27d932ee34 | ||
|
|
52b1784f25 | ||
|
|
154f4f2712 | ||
|
|
806ca2cf7b | ||
|
|
9f171977bb | ||
|
|
2031f7fe02 | ||
|
|
4259a55e7a | ||
|
|
065344ba5e | ||
|
|
d0c9a77528 | ||
|
|
604429f267 | ||
|
|
f5a9dcccb8 | ||
|
|
b056cce707 | ||
|
|
1497aada57 | ||
|
|
fb8ddf54b7 | ||
|
|
9a05322d45 | ||
|
|
8c2008b06c | ||
|
|
e3cc08a624 | ||
|
|
36cd4663d9 | ||
|
|
a014ef6d14 | ||
|
|
34fa218c38 | ||
|
|
f422b577fe | ||
|
|
e379465227 | ||
|
|
eb63e75200 | ||
|
|
b5faab51c3 | ||
|
|
ddffe5d4ce | ||
|
|
f59e57aa6a | ||
|
|
ae8cbf2ff2 | ||
|
|
305f3f78ec | ||
|
|
98e506cc4a | ||
|
|
ecfb11c096 | ||
|
|
6b59736ffe | ||
|
|
a3a1f7720e | ||
|
|
89cfbfca9c | ||
|
|
e0676030d6 | ||
|
|
0c76e22b8a | ||
|
|
1a8f1751d9 | ||
|
|
b95bb8315f | ||
|
|
2cc2540bdc | ||
|
|
84af238d82 | ||
|
|
89960db2bd | ||
|
|
c5f53bda3e | ||
|
|
2e1b62e58d | ||
|
|
982aefa165 | ||
|
|
2cccf95775 | ||
|
|
1969ed8b09 | ||
|
|
c3fc490fac | ||
|
|
59687329fb | ||
|
|
94f751d78a | ||
|
|
f6feca096f | ||
|
|
649f38efb8 | ||
|
|
e4e221b9fd | ||
|
|
d7f063eec8 | ||
|
|
aa988a3be7 | ||
|
|
18f2a027bc | ||
|
|
7ca34e52d6 | ||
|
|
7f83b5b909 | ||
|
|
641f763d05 | ||
|
|
0df85063a1 | ||
|
|
550b0dc3f5 | ||
|
|
96a7b688c0 | ||
|
|
8f6c2baba6 | ||
|
|
523a8da908 | ||
|
|
cd10500a17 | ||
|
|
6d9211ada1 | ||
|
|
003ca9273d | ||
|
|
28f65f13a5 | ||
|
|
21ee0947d7 | ||
|
|
1e11992de2 | ||
|
|
d690a38fa2 | ||
|
|
46eb29cf28 | ||
|
|
fb01d3ffaa | ||
|
|
e676a73a7c | ||
|
|
6e348dbc5d | ||
|
|
39114ec429 | ||
|
|
3b82fe3bd0 | ||
|
|
2667334252 | ||
|
|
be39e2c3c3 | ||
|
|
40eece7d77 | ||
|
|
4fcc785e85 | ||
|
|
11e4097bd8 | ||
|
|
f8c37da06d | ||
|
|
09756f21fd | ||
|
|
a06c4bd1dc | ||
|
|
bb477f0dfb | ||
|
|
0b86b3df8f | ||
|
|
edd5357008 | ||
|
|
dfb4e04f4a | ||
|
|
45c0375387 | ||
|
|
5e4cfa5112 | ||
|
|
086b53e4a3 | ||
|
|
fbb5612b8c | ||
|
|
c3c471ab33 | ||
|
|
67ddc252aa | ||
|
|
59945a8961 | ||
|
|
bbabb967b1 | ||
|
|
4cb1ee4cb1 | ||
|
|
95135544e2 | ||
|
|
e34b71c13e | ||
|
|
cc8bcf384a | ||
|
|
1f21952beb | ||
|
|
1ed4ced65f | ||
|
|
beb74e635d | ||
|
|
40c4fc5d1f | ||
|
|
645dba903d | ||
|
|
1ac4acdb47 | ||
|
|
74aa33e80c | ||
|
|
6f6b45abcf | ||
|
|
7297a6a5d3 | ||
|
|
5ef76cffca | ||
|
|
9284f84645 | ||
|
|
85ba33e1ff | ||
|
|
9f5f5e7812 | ||
|
|
8617c4a79f | ||
|
|
e9809238de | ||
|
|
c0a22f4a28 | ||
|
|
41c6fb15b3 | ||
|
|
b5d65e83f0 | ||
|
|
1a7c148a7e | ||
|
|
ead630aa51 | ||
|
|
85b71c785a | ||
|
|
04cb58dfa2 | ||
|
|
3822e90ada | ||
|
|
af5cb93689 | ||
|
|
6a62024dd4 | ||
|
|
bedb7ffe85 | ||
|
|
4a21641bcd | ||
|
|
21d0b832b9 | ||
|
|
ce9081249f | ||
|
|
f6786cd44a | ||
|
|
a045c18a89 | ||
|
|
d6af85ad77 | ||
|
|
af55bd86a2 | ||
|
|
7aa840282f | ||
|
|
a5d57c4788 | ||
|
|
4d0c2d1ea2 | ||
|
|
840331b7d5 | ||
|
|
df91b47b35 | ||
|
|
f400241ff4 | ||
|
|
8639148f20 | ||
|
|
28e7b561ea | ||
|
|
ba7ef4228c | ||
|
|
fcd3ee6feb | ||
|
|
6ddc9f3079 | ||
|
|
cc53894473 | ||
|
|
2cd76bdad7 | ||
|
|
92eab8d47a | ||
|
|
12f5d7be6c | ||
|
|
ab88e7d57c | ||
|
|
725d85181d | ||
|
|
23c9b2071b | ||
|
|
ae025a92fc | ||
|
|
fbf30b1a73 | ||
|
|
4ba3370fc9 | ||
|
|
c1a590961d | ||
|
|
a1f7a678c1 | ||
|
|
1117b820f1 | ||
|
|
4681bf4cfb | ||
|
|
b9dd19a556 | ||
|
|
f97a737185 | ||
|
|
68fb27410e |
No files matched your search
@@ -9,7 +9,7 @@ Forestry is a modification for the game Minecraft and known primarily for its fa
|
||||
|
||||
[Wiki](http://forestry.sengir.net/)
|
||||
|
||||
[Latest Builds for 1.9](http://jenkins.ic2.player.to/job/Forestry_5/)
|
||||
[Latest Builds for 1.10 / 1.10.2](http://jenkins.ic2.player.to/job/Forestry_5/)
|
||||
|
||||
[IRC #forestry on esper.net](http://webchat.esper.net/?nick=ForestryGithub...&channels=forestry&prompt=1)
|
||||
|
||||
|
||||
+13
-18
@@ -1,14 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||
@@ -16,11 +9,10 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "net.minecraftforge.gradle.forge" version "2.0.2"
|
||||
id "com.matthewprenger.cursegradle" version "1.0.7"
|
||||
id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "1.32"
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'maven'
|
||||
|
||||
version = version_major + '.' + version_minor + '.' + version_patch + '.' + getBuildNumber()
|
||||
@@ -40,7 +32,6 @@ targetCompatibility = 1.8
|
||||
minecraft {
|
||||
version = mcversion + "-" + forgeversion
|
||||
runDir = "run"
|
||||
useDepAts = true
|
||||
mappings = mcp_mappings
|
||||
|
||||
replace '@VERSION@', project.version
|
||||
@@ -56,6 +47,9 @@ sourceSets {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://maven.epoxide.xyz'
|
||||
}
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
@@ -66,7 +60,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
deobfCompile "mezz.jei:jei_${mcversion}:${jei_version}"
|
||||
deobfCompile "net.darkhax.tesla:Tesla:${tesla_version}"
|
||||
deobfCompile "mezz.jei:jei_${mcversion}:${jei_version}:api"
|
||||
runtime "mezz.jei:jei_${mcversion}:${jei_version}"
|
||||
deobfCompile "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
|
||||
}
|
||||
|
||||
@@ -94,6 +90,9 @@ processResources {
|
||||
exclude 'mcmod.info'
|
||||
exclude '**/*.md'
|
||||
}
|
||||
|
||||
// Move access transformers to META-INF
|
||||
rename '(.+_at.cfg)', 'META-INF/$1'
|
||||
}
|
||||
|
||||
// prevent java 8's strict doclint for javadocs from failing builds
|
||||
@@ -104,12 +103,8 @@ allprojects {
|
||||
}
|
||||
|
||||
jar {
|
||||
// Copy redstone api into the jar, should shade this as a maven dep...
|
||||
from (sourceSets.api.allSource) {
|
||||
include 'cofh/**/*.txt'
|
||||
}
|
||||
from (sourceSets.api.output.classesDir) {
|
||||
include 'cofh/**/*.*'
|
||||
manifest {
|
||||
attributes 'FMLAT': 'forestry_at.cfg'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
-7
@@ -1,10 +1,11 @@
|
||||
mcversion=1.9.4
|
||||
forgeversion=12.17.0.1950
|
||||
mcp_mappings=snapshot_20160525
|
||||
mcversion=1.10.2
|
||||
forgeversion=12.18.2.2125
|
||||
mcp_mappings=snapshot_20161111
|
||||
|
||||
jei_version=3.4.0.+
|
||||
ic2_version=2.5.5-ex19
|
||||
tesla_version=1.10.2-1.2.1.49
|
||||
jei_version=3.13.2.349
|
||||
ic2_version=2.6.76-ex110
|
||||
|
||||
version_major=5
|
||||
version_minor=0
|
||||
version_patch=9
|
||||
version_minor=2
|
||||
version_patch=17
|
||||
+1
-1
Submodule lang updated: 50cc3f6cfc...e919e4ad51.
@@ -12,6 +12,21 @@ package forestry;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.core.EventHandlerCore;
|
||||
import forestry.core.climate.ClimateEventHandler;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.GameMode;
|
||||
import forestry.core.errors.EnumErrorCode;
|
||||
import forestry.core.errors.ErrorStateRegistry;
|
||||
import forestry.core.gui.GuiHandler;
|
||||
import forestry.core.multiblock.MultiblockEventHandler;
|
||||
import forestry.core.network.PacketHandler;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.worldgen.WorldGenerator;
|
||||
import forestry.plugins.PluginManager;
|
||||
import forestry.plugins.compat.PluginIC2;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@@ -25,20 +40,6 @@ import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.core.EventHandlerCore;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.GameMode;
|
||||
import forestry.core.errors.EnumErrorCode;
|
||||
import forestry.core.errors.ErrorStateRegistry;
|
||||
import forestry.core.gui.GuiHandler;
|
||||
import forestry.core.multiblock.MultiblockEventHandler;
|
||||
import forestry.core.network.PacketHandler;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.worldgen.WorldGenerator;
|
||||
import forestry.plugins.PluginManager;
|
||||
|
||||
/**
|
||||
* Forestry Minecraft Mod
|
||||
*
|
||||
@@ -49,15 +50,10 @@ import forestry.plugins.PluginManager;
|
||||
name = "Forestry",
|
||||
version = Constants.VERSION,
|
||||
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
|
||||
dependencies = "required-after:Forge@[12.17.0.1949,);"
|
||||
+ "after:Buildcraft|Core@[7.2,);"
|
||||
+ "after:BuildCraft|Energy@[7.2,);"
|
||||
+ "after:ExtrabiomesXL;"
|
||||
+ "after:BiomesOPlenty;"
|
||||
+ "after:IC2@[2.3.235,);"
|
||||
+ "after:Natura@[2.2.0,);"
|
||||
+ "after:HardcoreEnderExpansion;"
|
||||
+ "after:basemetals;")
|
||||
acceptedMinecraftVersions = "[1.10]",
|
||||
dependencies = "required-after:Forge@[12.18.1.2080,);"
|
||||
+ "after:JEI@[3.11.2.278,);"
|
||||
+ "after:" + PluginIC2.modId + ";")
|
||||
public class Forestry {
|
||||
|
||||
@Mod.Instance(Constants.MOD_ID)
|
||||
@@ -82,6 +78,7 @@ public class Forestry {
|
||||
EventHandlerCore eventHandlerCore = new EventHandlerCore();
|
||||
MinecraftForge.EVENT_BUS.register(eventHandlerCore);
|
||||
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new ClimateEventHandler());
|
||||
|
||||
configFolder = new File(event.getModConfigurationDirectory(), Constants.MOD_ID);
|
||||
Config.load();
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.CapabilityInject;
|
||||
|
||||
public class ApicultureCapabilities {
|
||||
/**
|
||||
* Capability for {@link IArmorApiarist}.
|
||||
* The {@link Capability#getDefaultInstance()} will always protect the wearer with no side effects.
|
||||
*/
|
||||
@CapabilityInject(IArmorApiarist.class)
|
||||
public static Capability<IArmorApiarist> ARMOR_APIARIST;
|
||||
}
|
||||
@@ -50,12 +50,4 @@ public interface IAlleleBeeSpecies extends IAlleleSpecies {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager);
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 3.6.
|
||||
* @return Path of the texture to use for entity rendering.
|
||||
*/
|
||||
@Deprecated
|
||||
String getEntityTexture();
|
||||
|
||||
}
|
||||
@@ -5,21 +5,24 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* When implemented by armor piece items, allows them to act as apiarist's armor.
|
||||
* When implemented as a capability by armor items, protects the wearer from negative bee effects.
|
||||
* @see ApicultureCapabilities#ARMOR_APIARIST
|
||||
*/
|
||||
public interface IArmorApiarist {
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
*
|
||||
* @param entity Entity being attacked
|
||||
* @param armor Armor item
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param entity Entity 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
|
||||
*/
|
||||
boolean protectEntity(EntityLivingBase entity, ItemStack armor, String cause, boolean doProtect);
|
||||
boolean protectEntity(EntityLivingBase entity, ItemStack armor, @Nullable String cause, boolean doProtect);
|
||||
}
|
||||
@@ -13,9 +13,9 @@ import java.util.Set;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IIndividualLiving;
|
||||
|
||||
/**
|
||||
@@ -85,8 +85,8 @@ public interface IBee extends IIndividualLiving {
|
||||
|
||||
void plantFlowerRandom(IBeeHousing housing);
|
||||
|
||||
ITree retrievePollen(IBeeHousing housing);
|
||||
IIndividual retrievePollen(IBeeHousing housing);
|
||||
|
||||
boolean pollinateRandom(IBeeHousing housing, ITree pollen);
|
||||
boolean pollinateRandom(IBeeHousing housing, IIndividual pollen);
|
||||
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
|
||||
import forestry.api.genetics.EnumTolerance;
|
||||
@@ -20,9 +22,11 @@ import forestry.api.genetics.IGenome;
|
||||
public interface IBeeGenome extends IGenome {
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
IAlleleBeeSpecies getPrimary();
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
IAlleleBeeSpecies getSecondary();
|
||||
|
||||
float getSpeed();
|
||||
|
||||
@@ -5,28 +5,24 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.climate.IClimateProvider;
|
||||
import forestry.api.core.IErrorLogicSource;
|
||||
import forestry.api.core.ILocatable;
|
||||
import forestry.api.genetics.IHousing;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public interface IBeeHousing extends IHousing, IErrorLogicSource {
|
||||
public interface IBeeHousing extends IHousing, IErrorLogicSource, IClimateProvider, ILocatable {
|
||||
|
||||
/**
|
||||
* Used by BeeManager.beeRoot.createBeeHousingModifier(IBeeHousing housing)
|
||||
* Used by {@link IBeeRoot#createBeeHousingModifier(IBeeHousing)}
|
||||
* to combine bee modifiers from several sources that can change over time.
|
||||
* @return IBeeModifiers from the housing, frames, etc.
|
||||
*/
|
||||
Iterable<IBeeModifier> getBeeModifiers();
|
||||
|
||||
/**
|
||||
* Used by BeeManager.beeRoot.createBeeHousingListener(IBeeHousing housing)
|
||||
* Used by {@link IBeeRoot#createBeeHousingListener(IBeeHousing)}
|
||||
* to combine bee listeners from several sources that can change over time.
|
||||
* @return IBeeListeners from the housing, multiblock parts, etc.
|
||||
*/
|
||||
@@ -36,24 +32,17 @@ public interface IBeeHousing extends IHousing, IErrorLogicSource {
|
||||
|
||||
IBeekeepingLogic getBeekeepingLogic();
|
||||
|
||||
EnumTemperature getTemperature();
|
||||
|
||||
EnumHumidity getHumidity();
|
||||
|
||||
int getBlockLightValue();
|
||||
|
||||
boolean canBlockSeeTheSky();
|
||||
|
||||
/** Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 */
|
||||
World getWorldObj();
|
||||
|
||||
Biome getBiome();
|
||||
|
||||
boolean isRaining();
|
||||
|
||||
GameProfile getOwner();
|
||||
|
||||
/**
|
||||
* @since Forestry 4.2
|
||||
* @return exact coordinates where bee FX should spawn from
|
||||
* @return exact coordinates where bee particle FX should spawn from
|
||||
*/
|
||||
Vec3d getBeeFXCoordinates();
|
||||
}
|
||||
+4
-3
@@ -5,8 +5,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IMutationCustom;
|
||||
|
||||
public interface IBeeMutationCustom extends IBeeMutation, IMutationCustom {
|
||||
import forestry.api.genetics.IMutationBuilder;
|
||||
|
||||
public interface IBeeMutationBuilder extends IMutationBuilder {
|
||||
@Override
|
||||
IBeeMutation build();
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public interface IBeeMutationFactory {
|
||||
/**
|
||||
* Creates a new bee mutation.
|
||||
* Automatically registered with BeeManager.beeRoot.registerMutation()
|
||||
* See IBeeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
|
||||
* See IBeeMutationBuilder and IMutationBuilder for adding additional properties to the returned mutation.
|
||||
*
|
||||
* @param parentBee0 A parent bee for this mutation
|
||||
* @param parentBee1 A parent bee for this mutation
|
||||
@@ -19,5 +19,5 @@ public interface IBeeMutationFactory {
|
||||
* @param chance The chance that breeding the two parent bees will result in this mutation
|
||||
* @return a new bee mutation.
|
||||
*/
|
||||
IBeeMutationCustom createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance);
|
||||
IBeeMutationBuilder createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance);
|
||||
}
|
||||
@@ -7,17 +7,15 @@ package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface IBeeRoot extends ISpeciesRoot {
|
||||
|
||||
/**
|
||||
@@ -100,7 +98,7 @@ public interface IBeeRoot extends ISpeciesRoot {
|
||||
|
||||
/* MUTATIONS */
|
||||
@Override
|
||||
Collection<IBeeMutation> getMutations(boolean shuffle);
|
||||
List<IBeeMutation> getMutations(boolean shuffle);
|
||||
|
||||
/* GAME MODE */
|
||||
void resetBeekeepingMode();
|
||||
|
||||
@@ -36,6 +36,12 @@ public interface IBeekeepingLogic extends INbtWritable, INbtReadable {
|
||||
*/
|
||||
void doWork();
|
||||
|
||||
/**
|
||||
* Force the logic to refresh any cached values and error states.
|
||||
* Call this when a player opens the gui so that all errors are up to date.
|
||||
*/
|
||||
void clearCachedValues();
|
||||
|
||||
|
||||
/* CLIENT */
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public interface IJubilanceFactory {
|
||||
/** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */
|
||||
IJubilanceProvider getDefault();
|
||||
|
||||
/** The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. */
|
||||
IJubilanceProvider getRequiresResource(Block block, int meta);
|
||||
IJubilanceProvider getRequiresResource(IBlockState... acceptedBlockStates);
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture.hives;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
@@ -46,5 +48,5 @@ public interface IHiveDescription {
|
||||
* Called after successful hive generation.
|
||||
* world, x, y, z give the location of the new hive.
|
||||
**/
|
||||
void postGen(World world, BlockPos pos);
|
||||
void postGen(World world, Random rand, BlockPos pos);
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion = "4.8.0", owner = "ForestryAPI|core", provides = "ForestryAPI|apiculture")
|
||||
@API(apiVersion = "5.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|apiculture")
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -0,0 +1,14 @@
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.core.IArmorNaturalist;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.CapabilityInject;
|
||||
|
||||
public class ArboricultureCapabilities {
|
||||
/**
|
||||
* Capability for {@link IArmorNaturalist}.
|
||||
* The {@link Capability#getDefaultInstance()} will always show pollination with no side effects.
|
||||
*/
|
||||
@CapabilityInject(IArmorNaturalist.class)
|
||||
public static Capability<IArmorNaturalist> ARMOR_NATURALIST;
|
||||
}
|
||||
@@ -10,28 +10,51 @@ import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
public enum EnumForestryWoodType implements IWoodType {
|
||||
LARCH, TEAK, ACACIA, LIME,
|
||||
CHESTNUT, WENGE, BAOBAB, SEQUOIA(4.0f),
|
||||
LARCH(4),
|
||||
TEAK(4),
|
||||
ACACIA(4),
|
||||
LIME(4),
|
||||
CHESTNUT(4),
|
||||
WENGE(4),
|
||||
BAOBAB(4),
|
||||
SEQUOIA(3, 4.0f),
|
||||
|
||||
KAPOK, EBONY, MAHOGANY, BALSA(1.0f),
|
||||
WILLOW, WALNUT, GREENHEART(7.5f), CHERRY,
|
||||
KAPOK(4),
|
||||
EBONY(4),
|
||||
MAHOGANY(4),
|
||||
BALSA(4, 1.0f),
|
||||
WILLOW(4),
|
||||
WALNUT(4),
|
||||
GREENHEART(4, 7.5f),
|
||||
CHERRY(4),
|
||||
|
||||
MAHOE, POPLAR, PALM, PAPAYA,
|
||||
PINE(3.0f), PLUM, MAPLE, CITRUS,
|
||||
MAHOE(4),
|
||||
POPLAR(4),
|
||||
PALM(4),
|
||||
PAPAYA(4),
|
||||
PINE(4, 3.0f),
|
||||
PLUM(4),
|
||||
MAPLE(4),
|
||||
CITRUS(4),
|
||||
|
||||
GIGANTEUM, IPE, PADAUK, COCOBOLO,
|
||||
ZEBRAWOOD;
|
||||
GIGANTEUM(3, 4.0f),
|
||||
IPE(4),
|
||||
PADAUK(4),
|
||||
COCOBOLO(4),
|
||||
ZEBRAWOOD(4);
|
||||
|
||||
public static final float DEFAULT_HARDNESS = 2.0f;
|
||||
public static final EnumForestryWoodType[] VALUES = values();
|
||||
|
||||
private final int carbonization;
|
||||
private final float hardness;
|
||||
|
||||
EnumForestryWoodType() {
|
||||
this(DEFAULT_HARDNESS);
|
||||
EnumForestryWoodType(int carbonization) {
|
||||
this(carbonization, DEFAULT_HARDNESS);
|
||||
}
|
||||
|
||||
EnumForestryWoodType(float hardness) {
|
||||
EnumForestryWoodType(int carbonization, float hardness) {
|
||||
this.carbonization = carbonization;
|
||||
this.hardness = hardness;
|
||||
}
|
||||
|
||||
@@ -66,4 +89,46 @@ public enum EnumForestryWoodType implements IWoodType {
|
||||
}
|
||||
return VALUES[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCarbonization() {
|
||||
return carbonization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCharcoalChance(int numberOfCharcoal) {
|
||||
if(numberOfCharcoal == 3){
|
||||
return 0.75F;
|
||||
}else if(numberOfCharcoal == 4){
|
||||
return 0.5F;
|
||||
}else if(numberOfCharcoal == 5){
|
||||
return 0.25F;
|
||||
}
|
||||
return 0.15F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTexture() {
|
||||
return "forestry:blocks/wood/planks." + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorLowerTexture() {
|
||||
return "forestry:blocks/doors/" + getName() + "_lower";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorUpperTexture() {
|
||||
return "forestry:blocks/doors/" + getName() + "_upper";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBarkTexture() {
|
||||
return "forestry:blocks/wood/bark." + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHeartTexture() {
|
||||
return "forestry:blocks/wood/heart." + getName();
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,6 @@ package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleArea;
|
||||
import forestry.api.genetics.IAlleleBoolean;
|
||||
@@ -18,6 +16,7 @@ import forestry.api.genetics.IAllelePlantType;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
public enum EnumTreeChromosome implements IChromosomeType {
|
||||
|
||||
@@ -28,7 +27,9 @@ public enum EnumTreeChromosome implements IChromosomeType {
|
||||
SPECIES(IAlleleTreeSpecies.class),
|
||||
/**
|
||||
* {@link IGrowthProvider}, determines conditions required by the tree to grow.
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
GROWTH(IAlleleGrowth.class),
|
||||
/**
|
||||
* A float modifying the height of the tree. Taken into account at worldgen.
|
||||
@@ -48,15 +49,19 @@ public enum EnumTreeChromosome implements IChromosomeType {
|
||||
YIELD(IAlleleFloat.class),
|
||||
/**
|
||||
* May add additional tolerances for {@link EnumPlantType}.
|
||||
* @deprecated this is tied to species directly
|
||||
*/
|
||||
@Deprecated
|
||||
PLANT(IAllelePlantType.class),
|
||||
/**
|
||||
* Determines the speed at which fruit will ripen on this tree.
|
||||
*/
|
||||
SAPPINESS(IAlleleFloat.class),
|
||||
/**
|
||||
* Territory for leaf effects. Unused.
|
||||
* Territory for leaf effects.
|
||||
* @deprecated unused
|
||||
*/
|
||||
@Deprecated
|
||||
TERRITORY(IAlleleArea.class),
|
||||
/**
|
||||
* Leaf effect. Unused.
|
||||
@@ -70,11 +75,15 @@ public enum EnumTreeChromosome implements IChromosomeType {
|
||||
GIRTH(IAlleleInteger.class),
|
||||
/**
|
||||
* The combustibility of the wood, when it burn to charcoal and the combustibility of the charcoal.
|
||||
* @deprecated this is tied to species directly
|
||||
*/
|
||||
@Deprecated
|
||||
COMBUSTIBILITY(IAlleleInteger.class),
|
||||
/**
|
||||
* The amount of charcoal that a wood pile ash drop;
|
||||
* @deprecated this is tied to species directly
|
||||
*/
|
||||
@Deprecated
|
||||
CARBONIZATION(IAlleleInteger.class),
|
||||
/**
|
||||
* Determines if the tree can burn.
|
||||
|
||||
@@ -7,12 +7,12 @@ import java.util.Random;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
|
||||
public enum EnumVanillaWoodType implements IWoodType {
|
||||
OAK(BlockPlanks.EnumType.OAK),
|
||||
SPRUCE(BlockPlanks.EnumType.SPRUCE),
|
||||
BIRCH(BlockPlanks.EnumType.BIRCH),
|
||||
JUNGLE(BlockPlanks.EnumType.JUNGLE),
|
||||
ACACIA(BlockPlanks.EnumType.ACACIA),
|
||||
DARK_OAK(BlockPlanks.EnumType.DARK_OAK);
|
||||
OAK(BlockPlanks.EnumType.OAK, 5),
|
||||
SPRUCE(BlockPlanks.EnumType.SPRUCE, 4),
|
||||
BIRCH(BlockPlanks.EnumType.BIRCH, 4),
|
||||
JUNGLE(BlockPlanks.EnumType.JUNGLE, 5),
|
||||
ACACIA(BlockPlanks.EnumType.ACACIA, 4),
|
||||
DARK_OAK(BlockPlanks.EnumType.DARK_OAK, 5);
|
||||
|
||||
public static final EnumVanillaWoodType[] VALUES = values();
|
||||
|
||||
@@ -21,9 +21,11 @@ public enum EnumVanillaWoodType implements IWoodType {
|
||||
}
|
||||
|
||||
private final BlockPlanks.EnumType vanillaType;
|
||||
private final int carbonization;
|
||||
|
||||
EnumVanillaWoodType(BlockPlanks.EnumType vanillaType) {
|
||||
EnumVanillaWoodType(BlockPlanks.EnumType vanillaType, int carbonization) {
|
||||
this.vanillaType = vanillaType;
|
||||
this.carbonization = carbonization;
|
||||
}
|
||||
|
||||
public BlockPlanks.EnumType getVanillaType() {
|
||||
@@ -57,4 +59,61 @@ public enum EnumVanillaWoodType implements IWoodType {
|
||||
public float getHardness() {
|
||||
return 2.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCarbonization() {
|
||||
return carbonization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCharcoalChance(int numberOfCharcoal) {
|
||||
if(numberOfCharcoal == 3){
|
||||
return 0.75F;
|
||||
}else if(numberOfCharcoal == 4){
|
||||
return 0.5F;
|
||||
}else if(numberOfCharcoal == 5){
|
||||
return 0.25F;
|
||||
}
|
||||
return 0.15F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTexture() {
|
||||
if(this == DARK_OAK){
|
||||
return "blocks/planks_big_oak";
|
||||
}
|
||||
return "blocks/planks_" + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorLowerTexture() {
|
||||
if(this == OAK){
|
||||
return "blocks/door_wood_lower";
|
||||
}
|
||||
return "blocks/door_wood_lower";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorUpperTexture() {
|
||||
if(this == OAK){
|
||||
return "blocks/door_wood_upper";
|
||||
}
|
||||
return "blocks/door_" + getName() + "_upper";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBarkTexture() {
|
||||
if(this == DARK_OAK){
|
||||
return "blocks/log_big_oak";
|
||||
}
|
||||
return "blocks/log_" + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHeartTexture() {
|
||||
if(this == DARK_OAK){
|
||||
return "blocks/log_big_oak_top";
|
||||
}
|
||||
return "blocks/log_" + getName() + "_top";
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,9 @@ import javax.annotation.Nonnull;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
|
||||
/**
|
||||
@@ -18,8 +21,17 @@ import forestry.api.core.IModelManager;
|
||||
* There is no default implementation because every sapling has a unique icon.
|
||||
*/
|
||||
public interface IGermlingModelProvider {
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager, EnumGermlingType type);
|
||||
|
||||
@Nonnull
|
||||
ModelResourceLocation getModel(EnumGermlingType type);
|
||||
|
||||
/**
|
||||
* Provides color for sapling. See {@link ILeafSpriteProvider} for pollen color.
|
||||
* @param type the germling type to render
|
||||
* @param renderPass renderPass of rendering
|
||||
* @return sapling color for renderPass
|
||||
*/
|
||||
int getSpriteColor(EnumGermlingType type, int renderPass);
|
||||
}
|
||||
@@ -10,6 +10,10 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* @deprecated this is being removed to simplify trees
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IGrowthProvider {
|
||||
|
||||
/**
|
||||
@@ -25,8 +29,6 @@ public interface IGrowthProvider {
|
||||
@Nullable
|
||||
BlockPos canGrow(ITreeGenome genome, World world, BlockPos pos, int expectedGirth, int expectedHeight);
|
||||
|
||||
EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, BlockPos pos);
|
||||
|
||||
/**
|
||||
* @return Short, human-readable identifier used in the treealyzer.
|
||||
*/
|
||||
|
||||
@@ -7,24 +7,19 @@ package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public interface ITree extends IIndividual, ITreeGenData {
|
||||
|
||||
void mate(ITree other);
|
||||
@@ -39,8 +34,6 @@ public interface ITree extends IIndividual, ITreeGenData {
|
||||
|
||||
ITreeGenome getMate();
|
||||
|
||||
EnumSet<EnumPlantType> getPlantTypes();
|
||||
|
||||
/**
|
||||
* @since Forestry 4.0
|
||||
*/
|
||||
@@ -84,12 +77,7 @@ public interface ITree extends IIndividual, ITreeGenData {
|
||||
* @return Integer denoting the size of the tree trunk.
|
||||
*/
|
||||
@Override
|
||||
int getGirth(World world, BlockPos pos);
|
||||
|
||||
/**
|
||||
* @return Growth conditions at the given position.
|
||||
*/
|
||||
EnumGrowthConditions getGrowthCondition(World world, BlockPos pos);
|
||||
int getGirth();
|
||||
|
||||
WorldGenerator getTreeGenerator(World world, BlockPos pos, boolean wasBonemealed);
|
||||
|
||||
|
||||
@@ -6,25 +6,22 @@
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IGenome;
|
||||
|
||||
public interface ITreeGenome extends IGenome {
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
IAlleleTreeSpecies getPrimary();
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
IAlleleTreeSpecies getSecondary();
|
||||
|
||||
@Nonnull
|
||||
IFruitProvider getFruitProvider();
|
||||
|
||||
IGrowthProvider getGrowthProvider();
|
||||
|
||||
float getHeight();
|
||||
|
||||
float getFertility();
|
||||
@@ -37,18 +34,12 @@ public interface ITreeGenome extends IGenome {
|
||||
|
||||
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();
|
||||
|
||||
int getCombustibility();
|
||||
|
||||
int getCarbonization();
|
||||
|
||||
IAlleleLeafEffect getEffect();
|
||||
}
|
||||
+4
-3
@@ -5,8 +5,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IMutationCustom;
|
||||
|
||||
public interface ITreeMutationCustom extends ITreeMutation, IMutationCustom {
|
||||
import forestry.api.genetics.IMutationBuilder;
|
||||
|
||||
public interface ITreeMutationBuilder extends IMutationBuilder {
|
||||
@Override
|
||||
ITreeMutation build();
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public interface ITreeMutationFactory {
|
||||
/**
|
||||
* Creates a new tree mutation.
|
||||
* Automatically registered with TreeManager.treeRoot.registerMutation()
|
||||
* See ITreeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
|
||||
* See ITreeMutationBuilder and IMutationBuilder for adding additional properties to the returned mutation.
|
||||
*
|
||||
* @param parentTree0 A parent tree for this mutation
|
||||
* @param parentTree1 A parent tree for this mutation
|
||||
@@ -19,5 +19,5 @@ public interface ITreeMutationFactory {
|
||||
* @param chance The chance that breeding the two parent trees will result in this mutation
|
||||
* @return a new tree mutation.
|
||||
*/
|
||||
ITreeMutationCustom createMutation(IAlleleTreeSpecies parentTree0, IAlleleTreeSpecies parentTree1, IAllele[] result, int chance);
|
||||
ITreeMutationBuilder createMutation(IAlleleTreeSpecies parentTree0, IAlleleTreeSpecies parentTree1, IAllele[] result, int chance);
|
||||
}
|
||||
@@ -5,22 +5,22 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosome;
|
||||
import forestry.api.genetics.ISpeciesRootPollinatable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosome;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface ITreeRoot extends ISpeciesRoot {
|
||||
public interface ITreeRoot extends ISpeciesRootPollinatable {
|
||||
|
||||
@Override
|
||||
boolean isMember(ItemStack itemstack);
|
||||
@@ -79,10 +79,10 @@ public interface ITreeRoot extends ISpeciesRoot {
|
||||
@Override
|
||||
IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, BlockPos pos);
|
||||
boolean setFruitBlock(@Nonnull World world, @Nonnull IAlleleFruit allele, float sappiness, BlockPos pos);
|
||||
|
||||
/* GAME MODE */
|
||||
ArrayList<ITreekeepingMode> getTreekeepingModes();
|
||||
List<ITreekeepingMode> getTreekeepingModes();
|
||||
|
||||
ITreekeepingMode getTreekeepingMode(World world);
|
||||
|
||||
@@ -98,6 +98,5 @@ public interface ITreeRoot extends ISpeciesRoot {
|
||||
|
||||
/* MUTATIONS */
|
||||
@Override
|
||||
Collection<ITreeMutation> getMutations(boolean shuffle);
|
||||
|
||||
List<ITreeMutation> getMutations(boolean shuffle);
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -22,5 +24,7 @@ public interface IWoodAccess {
|
||||
ItemStack getStack(IWoodType woodType, WoodBlockKind kind, boolean fireproof);
|
||||
|
||||
IBlockState getBlock(IWoodType woodType, WoodBlockKind kind, boolean fireproof);
|
||||
|
||||
List<IWoodType> getRegisteredWoodTypes();
|
||||
|
||||
}
|
||||
@@ -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.arboriculture;
|
||||
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface IWoodItemMeshDefinition extends ItemMeshDefinition {
|
||||
|
||||
ResourceLocation getDefaultModelLocation(ItemStack stack);
|
||||
|
||||
}
|
||||
@@ -7,12 +7,12 @@ package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.ITextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.ITextureManager;
|
||||
|
||||
public interface IWoodProvider {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -30,4 +30,14 @@ public interface IWoodProvider {
|
||||
* @return A stack of wood from the tree to craft wood pile's or other things.
|
||||
*/
|
||||
ItemStack getWoodStack();
|
||||
|
||||
/**
|
||||
* The amount of charcoal dropped from a charcoal pile of this wood.
|
||||
*/
|
||||
int getCarbonization();
|
||||
|
||||
/**
|
||||
* The chance that a pile has to drop a extra charcoal
|
||||
*/
|
||||
float getCharcoalChance(int numberOfCharcoal);
|
||||
}
|
||||
@@ -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.arboriculture;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.IStateMapper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface IWoodStateMapper extends IStateMapper {
|
||||
|
||||
ModelResourceLocation getModelLocation(IBlockState state);
|
||||
|
||||
ModelResourceLocation getDefaultModelResourceLocation(IBlockState state);
|
||||
|
||||
}
|
||||
@@ -10,4 +10,18 @@ public interface IWoodType extends IStringSerializable {
|
||||
int getMetadata();
|
||||
|
||||
float getHardness();
|
||||
|
||||
int getCarbonization();
|
||||
|
||||
float getCharcoalChance(int numberOfCharcoal);
|
||||
|
||||
String getPlankTexture();
|
||||
|
||||
String getDoorLowerTexture();
|
||||
|
||||
String getDoorUpperTexture();
|
||||
|
||||
String getBarkTexture();
|
||||
|
||||
String getHeartTexture();
|
||||
}
|
||||
@@ -1,12 +1,68 @@
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.ModelProcessingHelper;
|
||||
|
||||
public enum WoodBlockKind {
|
||||
LOG, PLANKS, SLAB, FENCE, FENCE_GATE, STAIRS, DOOR;
|
||||
LOG, PLANKS, SLAB, FENCE, FENCE_GATE, STAIRS, DOOR(false);
|
||||
|
||||
public final boolean retextureItem;
|
||||
|
||||
private WoodBlockKind() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
private WoodBlockKind(boolean retextureItem) {
|
||||
this.retextureItem = retextureItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public IModel retextureModel(IModel model, IWoodType type, ImmutableMap<String, String> customTextures){
|
||||
Map<String, String> textures = new HashMap<>();
|
||||
switch (this) {
|
||||
case SLAB:
|
||||
case STAIRS:
|
||||
String textureLocation = type.getPlankTexture();
|
||||
textures.put("particle", textureLocation);
|
||||
textures.put("side", textureLocation);
|
||||
textures.put("top", textureLocation);
|
||||
textures.put("bottom", textureLocation);
|
||||
textures.put("all", textureLocation);
|
||||
break;
|
||||
case PLANKS:
|
||||
textures.put("particle", type.getPlankTexture());
|
||||
textures.put("all", type.getPlankTexture());
|
||||
break;
|
||||
case FENCE_GATE:
|
||||
case FENCE:
|
||||
textures.put("particle", type.getPlankTexture());
|
||||
textures.put("side", type.getPlankTexture());
|
||||
textures.put("texture", type.getPlankTexture());
|
||||
break;
|
||||
case DOOR:
|
||||
textures.put("particle", type.getDoorLowerTexture());
|
||||
textures.put("bottom", type.getDoorLowerTexture());
|
||||
textures.put("top", type.getDoorUpperTexture());
|
||||
break;
|
||||
case LOG:
|
||||
textures.put("particle", type.getBarkTexture());
|
||||
textures.put("side", type.getBarkTexture());
|
||||
textures.put("all", type.getBarkTexture());
|
||||
textures.put("end", type.getHeartTexture());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
textures.putAll(customTextures);
|
||||
return ModelProcessingHelper.retexture(model, new ImmutableMap.Builder<String, String>().putAll(textures).build());
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,6 @@ import java.util.List;
|
||||
public interface ICircuit {
|
||||
String getUID();
|
||||
|
||||
boolean requiresDiscovery();
|
||||
|
||||
int getLimit();
|
||||
|
||||
String getUnlocalizedName();
|
||||
|
||||
boolean isCircuitable(Object tile);
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package forestry.api.climate;
|
||||
|
||||
public enum EnumClimatiserModes {
|
||||
|
||||
POSITIVE, NEGATIVE, NONE
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package forestry.api.climate;
|
||||
|
||||
public enum EnumClimatiserTypes {
|
||||
|
||||
TEMPERATURE, HUMIDITY, NONE
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
public interface IClimateControl {
|
||||
|
||||
float getControlTemperature();
|
||||
|
||||
float getControlHumidity();
|
||||
|
||||
void setControlTemperature(float temperature);
|
||||
|
||||
void setControlHumidity(float humidity);
|
||||
|
||||
}
|
||||
@@ -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.climate;
|
||||
|
||||
import forestry.api.core.ILocatable;
|
||||
|
||||
public interface IClimateControlProvider extends ILocatable {
|
||||
|
||||
IClimateControl getClimateControl();
|
||||
|
||||
}
|
||||
+3
-8
@@ -1,14 +1,9 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
package forestry.api.climate;
|
||||
|
||||
public interface IClimateControlled {
|
||||
/**
|
||||
@@ -0,0 +1,43 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IClimateManager {
|
||||
|
||||
float getTemperature(World world, BlockPos pos);
|
||||
|
||||
float getHumidity(World world, BlockPos pos);
|
||||
|
||||
@Nonnull
|
||||
IClimateProvider getDefaultClimate(World world, BlockPos pos);
|
||||
|
||||
void addRegion(IClimateRegion region);
|
||||
|
||||
void removeRegion(IClimateRegion region);
|
||||
|
||||
void addSource(IClimateSourceProvider source);
|
||||
|
||||
void removeSource(IClimateSourceProvider source);
|
||||
|
||||
@Nullable
|
||||
IClimatePosition getPosition(World world, BlockPos pos);
|
||||
|
||||
@Nullable
|
||||
IClimateRegion getRegionForPos(World world, BlockPos pos);
|
||||
|
||||
@Nonnull
|
||||
Map<Integer, List<IClimateRegion>> getRegions();
|
||||
|
||||
}
|
||||
@@ -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.climate;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.INbtReadable;
|
||||
import forestry.api.core.INbtWritable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IClimatePosition extends INbtReadable, INbtWritable {
|
||||
|
||||
@Nonnull
|
||||
IClimateRegion getClimateRegion();
|
||||
|
||||
@Nonnull
|
||||
BlockPos getPos();
|
||||
|
||||
void setTemperature(float temperature);
|
||||
|
||||
void addTemperature(float temperature);
|
||||
|
||||
float getTemperature();
|
||||
|
||||
void setHumidity(float humidity);
|
||||
|
||||
void addHumidity(float humidity);
|
||||
|
||||
float getHumidity();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
public interface IClimateProvider {
|
||||
Biome getBiome();
|
||||
|
||||
EnumTemperature getTemperature();
|
||||
|
||||
EnumHumidity getHumidity();
|
||||
}
|
||||
@@ -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.climate;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.INbtReadable;
|
||||
import forestry.api.core.INbtWritable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IClimateRegion extends INbtReadable, INbtWritable {
|
||||
|
||||
@Nonnull
|
||||
World getWorld();
|
||||
|
||||
/**
|
||||
* Update the climate in a region.
|
||||
*/
|
||||
void updateClimate(int ticks);
|
||||
|
||||
int getTicksPerUpdate();
|
||||
|
||||
@Nonnull
|
||||
Map<BlockPos, IClimatePosition> getPositions();
|
||||
|
||||
void addSource(IClimateSource source);
|
||||
|
||||
void removeSource(IClimateSource source);
|
||||
|
||||
Collection<IClimateSource> getSources();
|
||||
|
||||
Collection<BlockPos> getOtherPositions();
|
||||
|
||||
float getTemperature();
|
||||
|
||||
float getHumidity();
|
||||
|
||||
}
|
||||
@@ -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.climate;
|
||||
|
||||
/**
|
||||
* A climate source is used to change the climate in a region.
|
||||
*/
|
||||
public interface IClimateSource {
|
||||
|
||||
/**
|
||||
* @param tickCount The current tick count.
|
||||
* @param region The climate region, in that the source stands.
|
||||
* @return Return true if the the climate has changed.
|
||||
*/
|
||||
boolean changeClimate(int tickCount, IClimateRegion region);
|
||||
|
||||
/**
|
||||
* @return The ticks that are required for one change.
|
||||
*/
|
||||
int getTicksForChange(IClimateRegion region);
|
||||
|
||||
IClimateSourceProvider getProvider();
|
||||
|
||||
}
|
||||
@@ -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.climate;
|
||||
|
||||
import forestry.api.core.ILocatable;
|
||||
|
||||
public interface IClimateSourceProvider extends ILocatable {
|
||||
|
||||
IClimateSource getClimateSource();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
public interface IClimatiserDefinition {
|
||||
|
||||
float getChange();
|
||||
|
||||
double getRange();
|
||||
|
||||
EnumClimatiserModes getMode();
|
||||
|
||||
EnumClimatiserTypes getType();
|
||||
|
||||
}
|
||||
+3
-6
@@ -3,10 +3,7 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
@API(apiVersion = "2.1.0", owner = "Forestry", provides = "ForestryAPI|climate")
|
||||
package forestry.api.climate;
|
||||
|
||||
public enum EnumCamouflageType {
|
||||
DEFAULT, GLASS, DOOR;
|
||||
|
||||
public static final EnumCamouflageType[] VALUES = values();
|
||||
}
|
||||
import net.minecraftforge.fml.common.API;
|
||||
+8
-7
@@ -5,13 +5,14 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IClimateManager {
|
||||
|
||||
float getTemperature(World world, BlockPos pos);
|
||||
public class CamouflageManager {
|
||||
|
||||
float getHumidity(World world, BlockPos pos);
|
||||
public static ICamouflageAccess camouflageAccess;
|
||||
|
||||
public static final String DEFAULT = "default";
|
||||
|
||||
public static final String GLASS = "glass";
|
||||
|
||||
public static final String DOOR = "door";
|
||||
|
||||
}
|
||||
@@ -60,15 +60,15 @@ public enum EnumTemperature {
|
||||
}
|
||||
}
|
||||
|
||||
public static EnumTemperature getFromBiome(Biome Biome) {
|
||||
if (BiomeHelper.isBiomeHellish(Biome)) {
|
||||
public static EnumTemperature getFromBiome(Biome biome) {
|
||||
if (BiomeHelper.isBiomeHellish(biome)) {
|
||||
return HELLISH;
|
||||
}
|
||||
return getFromValue(Biome.getTemperature());
|
||||
return getFromValue(biome.getTemperature());
|
||||
}
|
||||
|
||||
public static EnumTemperature getFromBiome(Biome Biome, World world, BlockPos pos) {
|
||||
if (BiomeHelper.isBiomeHellish(Biome)) {
|
||||
public static EnumTemperature getFromBiome(Biome biome, World world, BlockPos pos) {
|
||||
if (BiomeHelper.isBiomeHellish(biome)) {
|
||||
return HELLISH;
|
||||
}
|
||||
float temperature = ForestryAPI.climateManager.getTemperature(world, pos);
|
||||
|
||||
@@ -7,6 +7,7 @@ package forestry.api.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import forestry.api.climate.IClimateManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -5,20 +5,23 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import forestry.api.arboriculture.ArboricultureCapabilities;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Naturalist armor allows players to see pollinated tree leaves.
|
||||
*
|
||||
* @see ArboricultureCapabilities#ARMOR_NATURALIST
|
||||
*/
|
||||
public interface IArmorNaturalist {
|
||||
|
||||
/**
|
||||
* Called when the naturalist's armor acts as spectacles for seeing pollinated tree leaves/flowers.
|
||||
* Called to see if this naturalist's armor allows 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
|
||||
* @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.
|
||||
*/
|
||||
boolean canSeePollination(EntityPlayer player, ItemStack armor, boolean doSee);
|
||||
|
||||
@@ -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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ICamouflageAccess {
|
||||
|
||||
/**
|
||||
* Register a item camouflage handler for a type.
|
||||
*
|
||||
* @param type The camouflage type for of handler.
|
||||
* @param itemHandler The handler that is to register.
|
||||
*/
|
||||
void registerCamouflageItemHandler(@Nonnull ICamouflageItemHandler itemHandler);
|
||||
|
||||
/**
|
||||
* @return A list of all item camouflage handler's that are registered for that camouflage type.
|
||||
*/
|
||||
List<ICamouflageItemHandler> getCamouflageItemHandler(@Nonnull String type);
|
||||
|
||||
void addItemToBlackList(@Nonnull String type, @Nonnull ItemStack camouflageBlock);
|
||||
|
||||
void addModIdToBlackList(@Nonnull String type, @Nonnull String modID);
|
||||
|
||||
boolean isItemBlackListed(@Nonnull String type, @Nonnull ItemStack camouflageBlock);
|
||||
|
||||
ICamouflageItemHandler getHandlerFromItem(ItemStack stack);
|
||||
|
||||
}
|
||||
@@ -6,28 +6,27 @@
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface ICamouflageHandler{
|
||||
public interface ICamouflageHandler extends ILocatable {
|
||||
|
||||
/**
|
||||
* @return The item of the block that is the camouflage of this handler for the EnumCamouflageType.
|
||||
* @return The item of the block that is the camouflage of this handler for the type.
|
||||
*/
|
||||
ItemStack getCamouflageBlock(EnumCamouflageType type);
|
||||
|
||||
/**
|
||||
* @return The default camouflage block item for the EnumCamouflageType.
|
||||
*/
|
||||
ItemStack getDefaultCamouflageBlock(EnumCamouflageType type);
|
||||
ItemStack getCamouflageBlock(String type);
|
||||
|
||||
/**
|
||||
* Set the camouflage block item for the EnumCamouflageType.
|
||||
* @return The default camouflage block item for the type.
|
||||
*/
|
||||
void setCamouflageBlock(EnumCamouflageType type, ItemStack camouflageBlock);
|
||||
|
||||
ItemStack getDefaultCamouflageBlock(String type);
|
||||
|
||||
/**
|
||||
* @return The coordinates of the handler as a BlockPos.
|
||||
* @return True if the handler can handle this type of camouflage.
|
||||
*/
|
||||
BlockPos getCoordinates();
|
||||
|
||||
boolean canHandleType(String type);
|
||||
|
||||
/**
|
||||
* Set the camouflage block item for the type.
|
||||
* @return True if the block has chanced.
|
||||
*/
|
||||
boolean setCamouflageBlock(String type, ItemStack camouflageBlock, boolean sendClientUpdate);
|
||||
}
|
||||
@@ -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.core;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface ICamouflageItemHandler {
|
||||
|
||||
boolean canHandle(ItemStack stack);
|
||||
|
||||
String getType();
|
||||
|
||||
float getLightTransmittance(ItemStack stack, ICamouflageHandler camouflageHandler);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
Pair<IBlockState, IBakedModel> getModel(ItemStack stack, ICamouflageHandler camouflageHandler, ICamouflagedTile camouflageTile);
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface ICamouflagedTile {
|
||||
|
||||
EnumCamouflageType getCamouflageType();
|
||||
String getCamouflageType();
|
||||
|
||||
BlockPos getCoordinates();
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -27,7 +26,10 @@ public interface IErrorState {
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerSprite();
|
||||
|
||||
@SideOnly(value = Side.CLIENT)
|
||||
/**
|
||||
* Sprite registered to the Gui Texture Map at {@link ITextureManager}
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
TextureAtlasSprite getSprite();
|
||||
|
||||
}
|
||||
+21
-21
@@ -1,21 +1,21 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.core.tiles;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ILocatable {
|
||||
BlockPos getCoordinates();
|
||||
|
||||
/** Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 */
|
||||
World getWorldObj();
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ILocatable {
|
||||
BlockPos getCoordinates();
|
||||
|
||||
/** Must not be named "getWorld" to avoid SpecialSource issue https://github.com/md-5/SpecialSource/issues/12 */
|
||||
World getWorldObj();
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -38,7 +39,7 @@ public interface IModelBaker {
|
||||
|
||||
void addModel(@Nonnull AxisAlignedBB renderBounds, @Nonnull TextureAtlasSprite texture, int colorIndex);
|
||||
|
||||
void addBakedModel(@Nonnull IBakedModel model);
|
||||
void addBakedModel(@Nullable IBlockState state, @Nonnull IBakedModel model);
|
||||
|
||||
void addFace(@Nonnull EnumFacing facing, @Nonnull TextureAtlasSprite sprite);
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ package forestry.api.core;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -30,6 +28,4 @@ public interface IModelManager {
|
||||
|
||||
void registerItemModel(Item item, ItemMeshDefinition definition);
|
||||
|
||||
void registerVariant(Item item, ResourceLocation... resources);
|
||||
|
||||
}
|
||||
@@ -6,13 +6,29 @@
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Get the instance from {@link ForestryAPI#textureManager}.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface ITextureManager {
|
||||
|
||||
/**
|
||||
* Location of the Forestry Gui Texture Map.
|
||||
* Used for binding with {@link net.minecraft.client.renderer.texture.TextureManager#bindTexture(ResourceLocation)}
|
||||
*/
|
||||
ResourceLocation getGuiTextureMap();
|
||||
|
||||
/**
|
||||
* Get a texture atlas sprite that has been registered by Forestry, for Forestry's Gui Texture Map.
|
||||
*/
|
||||
TextureAtlasSprite getDefault(String ident);
|
||||
|
||||
/**
|
||||
* Register a sprite with Forestry's Gui Texture Map.
|
||||
*/
|
||||
TextureAtlasSprite registerGuiSprite(ResourceLocation location);
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion = "5.0.0", owner = "Forestry", provides = "ForestryAPI|core")
|
||||
@API(apiVersion = "5.1.0", owner = "Forestry", provides = "ForestryAPI|core")
|
||||
package forestry.api.core;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -8,6 +8,10 @@ package forestry.api.farming;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class Farmables {
|
||||
@@ -18,5 +22,8 @@ public class Farmables {
|
||||
*/
|
||||
@Nonnull
|
||||
public static final Multimap<String, IFarmable> farmables = HashMultimap.create();
|
||||
|
||||
@Nonnull
|
||||
public static final LinkedHashMap<ItemStack, Integer> fertilizers = new LinkedHashMap();
|
||||
|
||||
}
|
||||
@@ -8,22 +8,10 @@ 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;
|
||||
private final Fluid liquid;
|
||||
private final int powerPerCycle;
|
||||
private final int burnDuration;
|
||||
private final int dissipationMultiplier;
|
||||
|
||||
public EngineBronzeFuel(Fluid liquid, int powerPerCycle, int burnDuration, int dissipationMultiplier) {
|
||||
this.liquid = liquid;
|
||||
@@ -31,4 +19,32 @@ public class EngineBronzeFuel {
|
||||
this.burnDuration = burnDuration;
|
||||
this.dissipationMultiplier = dissipationMultiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Item that is valid fuel for a biogas engine.
|
||||
*/
|
||||
public Fluid getLiquid() {
|
||||
return liquid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Power produced by this fuel per work cycle of the engine.
|
||||
*/
|
||||
public int getPowerPerCycle() {
|
||||
return powerPerCycle;
|
||||
}
|
||||
|
||||
/**
|
||||
* How many work cycles a single "stack" of this type lasts.
|
||||
*/
|
||||
public int getBurnDuration() {
|
||||
return burnDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* By how much the normal heat dissipation rate of 1 is multiplied when using this fuel type.
|
||||
*/
|
||||
public int getDissipationMultiplier() {
|
||||
return dissipationMultiplier;
|
||||
}
|
||||
}
|
||||
@@ -9,18 +9,9 @@ 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;
|
||||
private final ItemStack fuel;
|
||||
private final int powerPerCycle;
|
||||
private final int burnDuration;
|
||||
|
||||
public EngineCopperFuel(ItemStack fuel, int powerPerCycle, int burnDuration) {
|
||||
this.fuel = fuel;
|
||||
@@ -28,4 +19,24 @@ public class EngineCopperFuel {
|
||||
this.burnDuration = burnDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Item that is valid fuel for a peat-fired engine.
|
||||
*/
|
||||
public ItemStack getFuel() {
|
||||
return fuel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Power produced by this fuel per work cycle.
|
||||
*/
|
||||
public int getPowerPerCycle() {
|
||||
return powerPerCycle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount of work cycles this item lasts before being consumed.
|
||||
*/
|
||||
public int getBurnDuration() {
|
||||
return burnDuration;
|
||||
}
|
||||
}
|
||||
@@ -8,22 +8,34 @@ package forestry.api.fuels;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class FermenterFuel {
|
||||
/**
|
||||
* Item that is a valid fuel for the fermenter (i.e. fertilizer).
|
||||
*/
|
||||
public final ItemStack item;
|
||||
/**
|
||||
* How much is fermeted per work cycle, i.e. how much biomass is produced per cycle.
|
||||
*/
|
||||
public final int fermentPerCycle;
|
||||
/**
|
||||
* Amount of work cycles a single item of this fuel lasts before expiring.
|
||||
*/
|
||||
public final int burnDuration;
|
||||
private final ItemStack item;
|
||||
private final int fermentPerCycle;
|
||||
private final int burnDuration;
|
||||
|
||||
public FermenterFuel(ItemStack item, int fermentPerCycle, int burnDuration) {
|
||||
this.item = item;
|
||||
this.fermentPerCycle = fermentPerCycle;
|
||||
this.burnDuration = burnDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Item that is a valid fuel for the fermenter (i.e. fertilizer).
|
||||
*/
|
||||
public ItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* How much is fermeted per work cycle, i.e. how much biomass is produced per cycle.
|
||||
*/
|
||||
public int getFermentPerCycle() {
|
||||
return fermentPerCycle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount of work cycles a single item of this fuel lasts before expiring.
|
||||
*/
|
||||
public int getBurnDuration() {
|
||||
return burnDuration;
|
||||
}
|
||||
}
|
||||
@@ -9,18 +9,9 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class GeneratorFuel {
|
||||
|
||||
/**
|
||||
* LiquidStack representing the fuel type and amount consumed per triggered cycle.
|
||||
*/
|
||||
public final FluidStack fuelConsumed;
|
||||
/**
|
||||
* EU emitted per tick while this fuel is being consumed in the generator (i.e. biofuel = 32, biomass = 8).
|
||||
*/
|
||||
public final int eu;
|
||||
/**
|
||||
* Rate at which the fuel is consumed. 1 - Every tick 2 - Every second tick 3 - Every third tick etc.
|
||||
*/
|
||||
public final int rate;
|
||||
private final FluidStack fuelConsumed;
|
||||
private final int eu;
|
||||
private final int rate;
|
||||
|
||||
public GeneratorFuel(FluidStack fuelConsumed, int eu, int rate) {
|
||||
this.fuelConsumed = fuelConsumed;
|
||||
@@ -28,4 +19,24 @@ public class GeneratorFuel {
|
||||
this.rate = rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* LiquidStack representing the fuel type and amount consumed per triggered cycle.
|
||||
*/
|
||||
public FluidStack getFuelConsumed() {
|
||||
return fuelConsumed;
|
||||
}
|
||||
|
||||
/**
|
||||
* EU emitted per tick while this fuel is being consumed in the generator (i.e. biofuel = 32, biomass = 8).
|
||||
*/
|
||||
public int getEu() {
|
||||
return eu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rate at which the fuel is consumed. 1 - Every tick 2 - Every second tick 3 - Every third tick etc.
|
||||
*/
|
||||
public int getRate() {
|
||||
return rate;
|
||||
}
|
||||
}
|
||||
@@ -8,22 +8,10 @@ package forestry.api.fuels;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MoistenerFuel {
|
||||
/**
|
||||
* The item to use
|
||||
*/
|
||||
public final ItemStack item;
|
||||
/**
|
||||
* The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch)
|
||||
*/
|
||||
public final ItemStack product;
|
||||
/**
|
||||
* How much this item contributes to the final product of the moistener (i.e. mycelium)
|
||||
*/
|
||||
public final int moistenerValue;
|
||||
/**
|
||||
* What stage this product represents. Resources with lower stage value will be consumed first.
|
||||
*/
|
||||
public final int stage;
|
||||
private final ItemStack item;
|
||||
private final ItemStack product;
|
||||
private final int moistenerValue;
|
||||
private final int stage;
|
||||
|
||||
public MoistenerFuel(ItemStack item, ItemStack product, int stage, int moistenerValue) {
|
||||
this.item = item;
|
||||
@@ -31,4 +19,32 @@ public class MoistenerFuel {
|
||||
this.stage = stage;
|
||||
this.moistenerValue = moistenerValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item to use
|
||||
*/
|
||||
public ItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch)
|
||||
*/
|
||||
public ItemStack getProduct() {
|
||||
return product;
|
||||
}
|
||||
|
||||
/**
|
||||
* How much this item contributes to the final product of the moistener (i.e. mycelium)
|
||||
*/
|
||||
public int getMoistenerValue() {
|
||||
return moistenerValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* What stage this product represents. Resources with lower stage value will be consumed first.
|
||||
*/
|
||||
public int getStage() {
|
||||
return stage;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion = "2.0.1", owner = "ForestryAPI|core", provides = "ForestryAPI|fuels")
|
||||
@API(apiVersion = "3.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|fuels")
|
||||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -0,0 +1,20 @@
|
||||
package forestry.api.genetics;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* Called after Forestry has registered all his species alleles of a individual.
|
||||
*/
|
||||
public class AlleleSpeciesRegisterEvent extends Event {
|
||||
|
||||
private final ISpeciesRoot root;
|
||||
|
||||
public AlleleSpeciesRegisterEvent(ISpeciesRoot root) {
|
||||
this.root = root;
|
||||
}
|
||||
|
||||
public ISpeciesRoot getRoot() {
|
||||
return root;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,23 +3,22 @@ package forestry.api.genetics;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.core.gui.GuiAlyzer;
|
||||
|
||||
public interface IAlyzerPlugin {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void drawAnalyticsPage1(GuiAlyzer gui, ItemStack itemStack);
|
||||
void drawAnalyticsPage1(GuiScreen gui, ItemStack itemStack);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void drawAnalyticsPage2(GuiAlyzer gui, ItemStack itemStack);
|
||||
void drawAnalyticsPage2(GuiScreen gui, ItemStack itemStack);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void drawAnalyticsPage3(GuiAlyzer gui, ItemStack itemStack);
|
||||
void drawAnalyticsPage3(GuiScreen gui, ItemStack itemStack);
|
||||
|
||||
Map<String, ItemStack> getIconStacks();
|
||||
|
||||
|
||||
@@ -10,12 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.genetics;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
|
||||
/**
|
||||
* Used to check for pollination traits without altering the world by changing vanilla leaves to forestry ones.
|
||||
* For a normal pollinatable that can be mated, see {@link IPollinatable}.
|
||||
@@ -23,15 +19,15 @@ import forestry.api.arboriculture.ITree;
|
||||
public interface ICheckPollinatable {
|
||||
|
||||
/**
|
||||
* @return plant types this pollinatable is classified as.
|
||||
* @return plant type this pollinatable is classified as.
|
||||
* (Can be used by bees to determine whether to interact or not.)
|
||||
*/
|
||||
EnumSet<EnumPlantType> getPlantType();
|
||||
EnumPlantType getPlantType();
|
||||
|
||||
/**
|
||||
* @return IIndividual containing the genetic information of this IPollinatable
|
||||
*/
|
||||
ITree getPollen();
|
||||
IIndividual getPollen();
|
||||
|
||||
/**
|
||||
* Checks whether this can mate with the given pollen.
|
||||
@@ -41,7 +37,7 @@ public interface ICheckPollinatable {
|
||||
* @param pollen IIndividual representing the pollen.
|
||||
* @return true if mating is possible, false otherwise.
|
||||
*/
|
||||
boolean canMateWith(ITree pollen);
|
||||
boolean canMateWith(IIndividual pollen);
|
||||
|
||||
/**
|
||||
* @return true if this has already been pollinated.
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.genetics;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.INbtWritable;
|
||||
|
||||
/**
|
||||
@@ -14,17 +16,23 @@ import forestry.api.core.INbtWritable;
|
||||
*/
|
||||
public interface IGenome extends INbtWritable {
|
||||
|
||||
@Nonnull
|
||||
IAlleleSpecies getPrimary();
|
||||
|
||||
@Nonnull
|
||||
IAlleleSpecies getSecondary();
|
||||
|
||||
@Nonnull
|
||||
IChromosome[] getChromosomes();
|
||||
|
||||
@Nonnull
|
||||
IAllele getActiveAllele(IChromosomeType chromosomeType);
|
||||
|
||||
@Nonnull
|
||||
IAllele getInactiveAllele(IChromosomeType chromosomeType);
|
||||
|
||||
boolean isGeneticEqual(IGenome other);
|
||||
|
||||
|
||||
@Nonnull
|
||||
ISpeciesRoot getSpeciesRoot();
|
||||
}
|
||||
+16
-14
@@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.genetics;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
@@ -13,40 +13,42 @@ import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
|
||||
/** Set custom mutation requirements */
|
||||
public interface IMutationCustom extends IMutation {
|
||||
public interface IMutationBuilder {
|
||||
|
||||
IMutation build();
|
||||
|
||||
/** Prevent this mutation from being shown in the analyzers */
|
||||
IMutationCustom setIsSecret();
|
||||
IMutationBuilder setIsSecret();
|
||||
|
||||
/** Require a specific temperature for this mutation to occur */
|
||||
IMutationCustom restrictTemperature(EnumTemperature temperature);
|
||||
IMutationBuilder restrictTemperature(EnumTemperature temperature);
|
||||
|
||||
IMutationCustom restrictTemperature(EnumTemperature minTemperature, EnumTemperature maxTemperature);
|
||||
IMutationBuilder restrictTemperature(EnumTemperature minTemperature, EnumTemperature maxTemperature);
|
||||
|
||||
/** Require a specific humidity for this mutation to occur */
|
||||
IMutationCustom restrictHumidity(EnumHumidity humidity);
|
||||
IMutationBuilder restrictHumidity(EnumHumidity humidity);
|
||||
|
||||
IMutationCustom restrictHumidity(EnumHumidity minHumidity, EnumHumidity maxHumidity);
|
||||
IMutationBuilder restrictHumidity(EnumHumidity minHumidity, EnumHumidity maxHumidity);
|
||||
|
||||
/**
|
||||
* Restrict this mutation to certain types of biomes.
|
||||
* @param types The types of biomes this mutation can occur.
|
||||
*/
|
||||
IMutationCustom restrictBiomeType(BiomeDictionary.Type... types);
|
||||
IMutationBuilder restrictBiomeType(BiomeDictionary.Type... types);
|
||||
|
||||
/** Restrict the days of the year that this mutation can occur */
|
||||
IMutationCustom restrictDateRange(int startMonth, int startDay, int endMonth, int endDay);
|
||||
IMutationBuilder restrictDateRange(int startMonth, int startDay, int endMonth, int endDay);
|
||||
|
||||
/** Restrict the time of day that this mutation can occur */
|
||||
IMutationCustom requireDay();
|
||||
IMutationBuilder requireDay();
|
||||
|
||||
IMutationCustom requireNight();
|
||||
IMutationBuilder requireNight();
|
||||
|
||||
/** Require a specific resource to be under the location of the mutation */
|
||||
IMutationCustom requireResource(Block block, int meta);
|
||||
IMutationBuilder requireResource(IBlockState... acceptedBlockStates);
|
||||
|
||||
IMutationCustom requireResource(String oreDictName);
|
||||
IMutationBuilder requireResource(String oreDictName);
|
||||
|
||||
/** Require some other custom mutation condition */
|
||||
IMutationCustom addMutationCondition(IMutationCondition mutationCondition);
|
||||
IMutationBuilder addMutationCondition(IMutationCondition mutationCondition);
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.genetics;
|
||||
|
||||
import forestry.api.climate.IClimateProvider;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -15,7 +16,7 @@ public interface IMutationCondition {
|
||||
* Most will return 1 if the condition is met and 0 otherwise,
|
||||
* but the float offers flexibility for more advanced conditions.
|
||||
*/
|
||||
float getChance(World world, BlockPos pos, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1);
|
||||
float getChance(World world, BlockPos pos, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1, IClimateProvider climate);
|
||||
|
||||
/**
|
||||
* A localized description of the mutation condition. (i.e. "A temperature of HOT is required.")
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.genetics;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
|
||||
/**
|
||||
* Can be implemented by tile entities, if they wish to be pollinatable.
|
||||
*
|
||||
@@ -20,5 +18,5 @@ public interface IPollinatable extends ICheckPollinatable {
|
||||
* @param pollen
|
||||
* IIndividual representing the pollen.
|
||||
*/
|
||||
void mateWith(ITree pollen);
|
||||
void mateWith(IIndividual pollen);
|
||||
}
|
||||
@@ -12,12 +12,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
/**
|
||||
* Describes a class of species (i.e. bees, trees, butterflies), provides helper functions and access to common functionality.
|
||||
*/
|
||||
@@ -105,9 +104,9 @@ public interface ISpeciesRoot {
|
||||
void registerTemplate(String identifier, IAllele[] template);
|
||||
|
||||
/**
|
||||
* Retrieves a registered template using the passed identifier.
|
||||
* Retrieves a registered template using the passed species unique identifier.
|
||||
*
|
||||
* @param identifier
|
||||
* @param identifier species UID
|
||||
* @return Array of {@link IAllele} representing a genome.
|
||||
*/
|
||||
IAllele[] getTemplate(String identifier);
|
||||
@@ -139,13 +138,13 @@ public interface ISpeciesRoot {
|
||||
/**
|
||||
* @return All registered mutations.
|
||||
*/
|
||||
Collection<? extends IMutation> getMutations(boolean shuffle);
|
||||
List<? extends IMutation> getMutations(boolean shuffle);
|
||||
|
||||
/**
|
||||
* @param other Allele to match mutations against.
|
||||
* @return All registered mutations the given allele is part of.
|
||||
*/
|
||||
Collection<? extends IMutation> getCombinations(IAllele other);
|
||||
List<? extends IMutation> getCombinations(IAllele other);
|
||||
|
||||
/**
|
||||
* @since Forestry 3.7
|
||||
@@ -170,14 +169,14 @@ public interface ISpeciesRoot {
|
||||
void setResearchSuitability(ItemStack itemstack, float suitability);
|
||||
|
||||
/**
|
||||
* @return Array of {@link IChromosomeType} which are in this species genome
|
||||
* @return Array of all {@link IChromosomeType} which are in this species genome
|
||||
*/
|
||||
IChromosomeType[] getKaryotype();
|
||||
|
||||
/**
|
||||
* @return {@link IChromosomeType} which is the "key" for this species class, usually the species chromosome.
|
||||
* @return {@link IChromosomeType} which is the "key" for this species class, the species chromosome.
|
||||
*/
|
||||
IChromosomeType getKaryotypeKey();
|
||||
IChromosomeType getSpeciesChromosomeType();
|
||||
|
||||
/**
|
||||
* Plugin to add information for the handheld genetic analyzer.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package forestry.api.genetics;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* @since 5.12.16
|
||||
* @author Nedelosk
|
||||
*/
|
||||
public interface ISpeciesRootPollinatable extends ISpeciesRoot {
|
||||
|
||||
ICheckPollinatable createPollinatable(IIndividual individual);
|
||||
|
||||
IPollinatable tryConvertToPollinatable(GameProfile owner, World world, final BlockPos pos, final IIndividual pollen);
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import forestry.api.multiblock.IGreenhouseController;
|
||||
public class DefaultGreenhouseListener implements IGreenhouseListener {
|
||||
|
||||
@Override
|
||||
public <G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse, boolean canWork) {
|
||||
public boolean canWork(IGreenhouseController greenhouse, boolean canWork) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
@@ -15,17 +10,17 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import forestry.api.core.ICamouflageHandler;
|
||||
import forestry.api.core.ICamouflagedTile;
|
||||
import forestry.api.multiblock.IGreenhouseController;
|
||||
|
||||
public class GreenhouseEvents extends Event {
|
||||
|
||||
@Nullable
|
||||
public final IGreenhouseState state;
|
||||
public final IGreenhouseController controller;
|
||||
|
||||
public GreenhouseEvents(@Nullable IGreenhouseState state) {
|
||||
this.state = state;
|
||||
public GreenhouseEvents(@Nullable IGreenhouseController state) {
|
||||
this.controller = state;
|
||||
}
|
||||
|
||||
public static class CamouflageChangeEvent extends GreenhouseEvents{
|
||||
@@ -35,10 +30,10 @@ public class GreenhouseEvents extends Event {
|
||||
@Nonnull
|
||||
public ICamouflageHandler camouflageHandler;
|
||||
@Nonnull
|
||||
public final EnumCamouflageType camouflageType;
|
||||
public final String camouflageType;
|
||||
|
||||
public CamouflageChangeEvent(IGreenhouseState state, @Nullable ICamouflagedTile camouflagedBlock, @Nonnull ICamouflageHandler camouflageHandler, @Nonnull EnumCamouflageType camouflageType) {
|
||||
super(state);
|
||||
public CamouflageChangeEvent(IGreenhouseController controller, @Nullable ICamouflagedTile camouflagedBlock, @Nonnull ICamouflageHandler camouflageHandler, @Nonnull String camouflageType) {
|
||||
super(controller);
|
||||
|
||||
this.camouflagedBlock = camouflagedBlock;
|
||||
this.camouflageHandler = camouflageHandler;
|
||||
@@ -51,8 +46,8 @@ public class GreenhouseEvents extends Event {
|
||||
@Nonnull
|
||||
public IInternalBlock internalBlock;
|
||||
|
||||
public InternalBlockEvent(IGreenhouseState state, @Nonnull IInternalBlock internalBlock) {
|
||||
super(state);
|
||||
public InternalBlockEvent(IGreenhouseController controller, @Nonnull IInternalBlock internalBlock) {
|
||||
super(controller);
|
||||
|
||||
this.internalBlock = internalBlock;
|
||||
}
|
||||
@@ -60,8 +55,8 @@ public class GreenhouseEvents extends Event {
|
||||
|
||||
public static class CreateInternalBlockEvent extends InternalBlockEvent{
|
||||
|
||||
public CreateInternalBlockEvent(IGreenhouseState state, IInternalBlock internalBlock) {
|
||||
super(state, internalBlock);
|
||||
public CreateInternalBlockEvent(IGreenhouseController controller, IInternalBlock internalBlock) {
|
||||
super(controller, internalBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,8 +65,8 @@ public class GreenhouseEvents extends Event {
|
||||
@Nonnull
|
||||
public final IInternalBlockFace face;
|
||||
|
||||
public CheckInternalBlockFaceEvent(IGreenhouseState state, IInternalBlock internalBlock, @Nonnull IInternalBlockFace face) {
|
||||
super(state, internalBlock);
|
||||
public CheckInternalBlockFaceEvent(IGreenhouseController controller, IInternalBlock internalBlock, @Nonnull IInternalBlockFace face) {
|
||||
super(controller, internalBlock);
|
||||
|
||||
this.face = face;
|
||||
}
|
||||
|
||||
@@ -5,15 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GreenhouseManager {
|
||||
|
||||
public static IGreenhouseAccess greenhouseAccess;
|
||||
|
||||
public static IGreenhouseHelper greenhouseHelper;
|
||||
|
||||
public static List<Class<? extends IGreenhouseLogic>> greenhouseLogics = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.EnumCamouflageType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IGreenhouseAccess {
|
||||
|
||||
void registerGreenhouseGlass(@Nonnull ItemStack glass, float lightTransmittance);
|
||||
|
||||
boolean isGreenhouseGlass(@Nonnull ItemStack glass);
|
||||
|
||||
float getGreenhouseGlassLightTransmittance(@Nonnull ItemStack glass);
|
||||
|
||||
void addToCamouflageBlockBlackList(@Nonnull EnumCamouflageType type, @Nonnull ItemStack camouflageBlock);
|
||||
|
||||
boolean isOnCamouflageBlockBlackList(@Nonnull EnumCamouflageType type, @Nonnull ItemStack camouflageBlock);
|
||||
|
||||
}
|
||||
@@ -5,14 +5,21 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import forestry.api.multiblock.IGreenhouseController;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IGreenhouseHelper {
|
||||
|
||||
/**
|
||||
* @return A {@link IGreenhouseState} of a greenhouse, when the pos is a greenhouse
|
||||
* @return A {@link IGreenhouseController} of a greenhouse, when the pos is a greenhouse
|
||||
*/
|
||||
IGreenhouseState getGreenhouseState(World world, BlockPos pos);
|
||||
IGreenhouseController getGreenhouseController(World world, BlockPos pos);
|
||||
|
||||
void addGreenhouseLogic(Class<? extends IGreenhouseLogic> logic);
|
||||
|
||||
List<Class<? extends IGreenhouseLogic>> getGreenhouseLogics();
|
||||
|
||||
}
|
||||
@@ -10,12 +10,12 @@ import forestry.api.multiblock.IGreenhouseController;
|
||||
public interface IGreenhouseListener {
|
||||
|
||||
/**
|
||||
* Called before the greenhouse work.
|
||||
* Called before the greenhouse update the climate system.
|
||||
*
|
||||
* @param greenhouse The greenhouse multiblock.
|
||||
* @param greenhouse The greenhouse of the listener.
|
||||
* @param canWork The actual {@link Boolean} value.
|
||||
* @return True if the greenhouse can work.
|
||||
* @return True if the greenhouse can update the climate.
|
||||
*/
|
||||
<G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse, boolean canWork);
|
||||
boolean canWork(IGreenhouseController greenhouse, boolean canWork);
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.multiblock.IMultiblockComponent;
|
||||
|
||||
public interface IGreenhouseState {
|
||||
|
||||
EnumTemperature getTemperature();
|
||||
|
||||
EnumHumidity getHumidity();
|
||||
|
||||
float getExactTemperature();
|
||||
|
||||
float getExactHumidity();
|
||||
|
||||
Set<IInternalBlock> getInternalBlocks();
|
||||
|
||||
Collection<IMultiblockComponent> getGreenhouseComponents();
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ package forestry.api.greenhouse;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion = "5.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|greenhouse")
|
||||
@API(apiVersion = "5.2.0", owner = "ForestryAPI|core", provides = "ForestryAPI|greenhouse")
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.genetics.EnumTolerance;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import forestry.api.genetics.IGenome;
|
||||
@@ -12,9 +14,11 @@ import forestry.api.genetics.IGenome;
|
||||
public interface IButterflyGenome extends IGenome {
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
IAlleleButterflySpecies getPrimary();
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
IAlleleButterflySpecies getSecondary();
|
||||
|
||||
float getSize();
|
||||
|
||||
+4
-3
@@ -5,8 +5,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
import forestry.api.genetics.IMutationCustom;
|
||||
|
||||
public interface IButterflyMutationCustom extends IButterflyMutation, IMutationCustom {
|
||||
import forestry.api.genetics.IMutationBuilder;
|
||||
|
||||
public interface IButterflyMutationBuilder extends IMutationBuilder {
|
||||
@Override
|
||||
IButterflyMutation build();
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public interface IButterflyMutationFactory {
|
||||
/**
|
||||
* Creates a new butterfly mutation.
|
||||
* Automatically registered with ButterflyManager.butterflyRoot.registerMutation()
|
||||
* See IButterflyMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
|
||||
* See IButterflyMutationBuilder and IMutationBuilder for adding additional properties to the returned mutation.
|
||||
*
|
||||
* @param parentButterfly0 A parent butterfly for this mutation
|
||||
* @param parentButterfly1 A parent butterfly for this mutation
|
||||
@@ -19,5 +19,5 @@ public interface IButterflyMutationFactory {
|
||||
* @param chance The chance that breeding the two parent butterfly's will result in this mutation
|
||||
* @return a new butterfly mutation.
|
||||
*/
|
||||
IButterflyMutationCustom createMutation(IAlleleButterflySpecies parentButterfly0, IAlleleButterflySpecies parentButterfly1, IAllele[] result, int chance);
|
||||
IButterflyMutationBuilder createMutation(IAlleleButterflySpecies parentButterfly0, IAlleleButterflySpecies parentButterfly1, IAllele[] result, int chance);
|
||||
}
|
||||
@@ -5,10 +5,11 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
import forestry.api.climate.IClimateProvider;
|
||||
import forestry.api.genetics.IHousing;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
public interface IButterflyNursery extends IHousing {
|
||||
public interface IButterflyNursery extends IHousing, IClimateProvider {
|
||||
|
||||
IButterfly getCaterpillar();
|
||||
|
||||
|
||||
@@ -7,18 +7,16 @@ package forestry.api.lepidopterology;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface IButterflyRoot extends ISpeciesRoot {
|
||||
|
||||
@Override
|
||||
@@ -67,7 +65,7 @@ public interface IButterflyRoot extends ISpeciesRoot {
|
||||
|
||||
/* MUTATIONS */
|
||||
@Override
|
||||
Collection<IButterflyMutation> getMutations(boolean shuffle);
|
||||
List<IButterflyMutation> getMutations(boolean shuffle);
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,7 @@ package forestry.api.lepidopterology;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.entity.passive.IAnimals;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
public interface IEntityButterfly extends IAnimals {
|
||||
|
||||
@@ -23,9 +23,9 @@ public interface IEntityButterfly extends IAnimals {
|
||||
*/
|
||||
EntityCreature getEntity();
|
||||
|
||||
ITree getPollen();
|
||||
IIndividual getPollen();
|
||||
|
||||
void setPollen(ITree pollen);
|
||||
void setPollen(IIndividual pollen);
|
||||
|
||||
boolean canMateWith(IEntityButterfly butterfly);
|
||||
|
||||
|
||||
@@ -17,9 +17,5 @@ public interface IMailAddress extends INbtWritable {
|
||||
|
||||
boolean isValid();
|
||||
|
||||
boolean isPlayer();
|
||||
|
||||
boolean isTrader();
|
||||
|
||||
GameProfile getPlayerProfile();
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -18,9 +19,10 @@ public interface IPostRegistry {
|
||||
IPostOffice getPostOffice(World world);
|
||||
|
||||
/* MAIL ADDRESSES */
|
||||
IMailAddress getMailAddress(GameProfile gameProfile);
|
||||
|
||||
IMailAddress getMailAddress(String traderName);
|
||||
@Nonnull
|
||||
IMailAddress getMailAddress(@Nonnull GameProfile gameProfile);
|
||||
|
||||
IMailAddress getMailAddress(@Nonnull String traderName);
|
||||
|
||||
/* LETTERS */
|
||||
boolean isLetter(ItemStack itemstack);
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import forestry.api.core.ITextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -31,6 +31,10 @@ public interface IPostalCarrier {
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sprite registered to the Gui Texture Map at {@link ITextureManager}.
|
||||
* Must be 26 pixels wide and 15 pixels tall. The texture itself must be 32x32 square.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
TextureAtlasSprite getSprite();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion = "3.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|mail")
|
||||
@API(apiVersion = "3.1.0", owner = "ForestryAPI|core", provides = "ForestryAPI|mail")
|
||||
package forestry.api.mail;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -7,7 +7,7 @@ package forestry.api.multiblock;
|
||||
|
||||
import forestry.api.apiculture.IBeeListener;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.core.IClimateControlled;
|
||||
import forestry.api.climate.IClimateControlled;
|
||||
|
||||
/**
|
||||
* Needs to be implemented by TileEntities that want to be part of an alveary.
|
||||
|
||||
@@ -8,9 +8,8 @@ package forestry.api.multiblock;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.arboriculture.EnumPileType;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -23,11 +22,10 @@ public interface ICharcoalPileComponent<T extends IMultiblockLogicCharcoalPile>
|
||||
|
||||
@Override
|
||||
T getMultiblockLogic();
|
||||
|
||||
@Nonnull
|
||||
ITree getTree();
|
||||
|
||||
void setTree(@Nonnull ITree tree);
|
||||
|
||||
IAlleleTreeSpecies getTreeSpecies();
|
||||
|
||||
void setTreeSpecies(@Nonnull IAlleleTreeSpecies treeSpecies);
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
@@ -38,6 +36,6 @@ public interface ICharcoalPileComponent<T extends IMultiblockLogicCharcoalPile>
|
||||
EnumPileType getPileType();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ITree getNextWoodPile();
|
||||
IAlleleTreeSpecies getNextWoodPile();
|
||||
|
||||
}
|
||||
Loaded 100 of 1791 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user