mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-10-27 14:53:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfbab6b988 | ||
|
|
3978a068d1 | ||
|
|
9d2d0af432 | ||
|
|
d451309170 | ||
|
|
c82dd0fbfb | ||
|
|
803911e10a | ||
|
|
29eedf9011 | ||
|
|
882848a00f | ||
|
|
4d253e1dd6 | ||
|
|
4d7988ee0f | ||
|
|
fcad67a1c2 | ||
|
|
1bd3b61df9 | ||
|
|
060ca1eb80 | ||
|
|
98a2d9c65e | ||
|
|
eb010094ca | ||
|
|
e6cbced8a2 | ||
|
|
d300078227 | ||
|
|
65c7f0242c | ||
|
|
c4140ef9c3 | ||
|
|
389e5e01e7 | ||
|
|
a55b2645b7 | ||
|
|
9a36381ce0 | ||
|
|
2565eea5ba | ||
|
|
13ae9ece47 | ||
|
|
d3e87b1aaf | ||
|
|
990d4990db | ||
|
|
ce232e808e | ||
|
|
31574a9c6e | ||
|
|
cd9a4110ee | ||
|
|
6b35ff2ba1 | ||
|
|
5133e721cc | ||
|
|
09ced92f5b | ||
|
|
12477a7711 | ||
|
|
b7dc4d9144 | ||
|
|
da48d317ff | ||
|
|
5bfb11e952 | ||
|
|
4dffb9f352 | ||
|
|
beadb47539 | ||
|
|
6301d3c193 | ||
|
|
883863e047 | ||
|
|
2c14f02151 | ||
|
|
00771b1a42 | ||
|
|
46ec2f2740 | ||
|
|
ac653d46c1 | ||
|
|
63d9935d01 | ||
|
|
ba695b977d | ||
|
|
6b1dfb1596 | ||
|
|
fff02be71d | ||
|
|
0e5b9e4957 | ||
|
|
3415030fbf |
No files matched your search
@@ -2,4 +2,4 @@ mcversion=1.7.10
|
||||
forgeversion=10.13.2.1286
|
||||
version_major=3
|
||||
version_minor=5
|
||||
version_patch=0
|
||||
version_patch=3
|
||||
@@ -197,7 +197,6 @@ task mainJarSigned ( type: Jar, dependsOn: 'reobf' ) {
|
||||
from (zipTree(jar.getArchivePath())) {
|
||||
exclude '**/api/**'
|
||||
exclude '**/codechicken/**'
|
||||
exclude '**/undergroundBiomes/**'
|
||||
}
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
@@ -224,7 +223,6 @@ task mainJar ( type: Zip, dependsOn: mainJarSigned ) {
|
||||
from (zipTree(jar.getArchivePath())) {
|
||||
include '**'
|
||||
exclude '**/codechicken/**'
|
||||
exclude '**/undergroundBiomes/**'
|
||||
}
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
@@ -237,7 +235,6 @@ task devJarSigned ( type: Jar, dependsOn: 'classes' ) {
|
||||
from(sourceSets.main.output) {
|
||||
exclude '**/api/**'
|
||||
exclude '**/codechicken/**'
|
||||
exclude '**/undergroundBiomes/**'
|
||||
}
|
||||
|
||||
destinationDir = file("build/tmp")
|
||||
@@ -263,13 +260,11 @@ task devJar ( type: Zip, dependsOn: devJarSigned ) {
|
||||
from(sourceSets.main.allSource) {
|
||||
include '**'
|
||||
exclude '**/codechicken/**'
|
||||
exclude '**/undergroundBiomes/**'
|
||||
}
|
||||
|
||||
from(sourceSets.main.output) {
|
||||
include '**'
|
||||
exclude '**/codechicken/**'
|
||||
exclude '**/undergroundBiomes/**'
|
||||
}
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
+1
-1
Submodule lang updated: c0000f0774...fa0f81998b.
@@ -1,11 +0,0 @@
|
||||
package exterminatorJeff.undergroundBiomes.api;
|
||||
|
||||
/**
|
||||
* Striped down version, get the full API from here: https://github.com/Zeno410/UndergroundBiomes1.7API
|
||||
* @author Zeno410
|
||||
*/
|
||||
public class UBAPIHook {
|
||||
public static final UBAPIHook ubAPIHook = new UBAPIHook();
|
||||
//public UBDimensionalStrataColumnProvider dimensionalStrataColumnProvider; // set in the main Underground Biomes
|
||||
public UBOreTexturizer ubOreTexturizer;
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package exterminatorJeff.undergroundBiomes.api;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Striped down version, get the full API from here: https://github.com/Zeno410/UndergroundBiomes1.7API
|
||||
* This is an interface for the class that can create Underground Biomes versions of arbitary ores
|
||||
* It creates three new blocks for each texturized ore.
|
||||
* @author Zeno410
|
||||
*/
|
||||
public interface UBOreTexturizer {
|
||||
// usage: Block is the ore block.
|
||||
// Overlay name is the fully qualified name, e.g. modname:overlayName
|
||||
// that static vars are fully qualified names for all the textures in the UB pack, just pass as is
|
||||
// the event isn't needed per se, but if this is called anytime else, the blocks will not "stick"
|
||||
public void setupUBOre(Block oreBlock, String overlayName, FMLPreInitializationEvent event);
|
||||
public void setupUBOre(Block oreBlock, int metadata, String overlayName, FMLPreInitializationEvent event);
|
||||
public void setupUBOre(Block oreBlock, int metadata, String overlayName, String blockName, FMLPreInitializationEvent event);
|
||||
|
||||
public void requestUBOreSetup(Block oreBlock, String overlayName) throws BlocksAreAlreadySet;
|
||||
public void requestUBOreSetup(Block oreBlock, int metadata, String overlayName) throws BlocksAreAlreadySet;
|
||||
public void requestUBOreSetup(Block oreBlock, int metadata, String overlayName, String blockName) throws BlocksAreAlreadySet;
|
||||
public void redoOres(int xInBlockCoordinates, int zInBlockCoordinates, World serverSideWorld) ;
|
||||
|
||||
public static String amber_overlay = "undergroundbiomes:amber_overlay";
|
||||
public static String cinnabar_overlay = "undergroundbiomes:cinnabar_overlay";
|
||||
public static String coal_overlay = "undergroundbiomes:coal_overlay";
|
||||
public static String copper_overlay = "undergroundbiomes:copper_overlay";
|
||||
public static String diamond_overlay = "undergroundbiomes:diamond_overlay";
|
||||
public static String emerald_overlay = "undergroundbiomes:emerald_overlay";
|
||||
public static String gold_overlay = "undergroundbiomes:gold_overlay";
|
||||
public static String iron_overlay = "undergroundbiomes:iron_overlay";
|
||||
public static String lapis_overlay = "undergroundbiomes:lapis_overlay";
|
||||
public static String lead_overlay = "undergroundbiomes:lead_overlay";
|
||||
public static String olivine_peridot_overlay = "undergroundbiomes:olivine-peridot_overlay";
|
||||
public static String redstone_overlay = "undergroundbiomes:redstone_overlay";
|
||||
public static String ruby_overlay = "undergroundbiomes:ruby_overlay";
|
||||
public static String sapphire_overlay = "undergroundbiomes:sapphire_overlay";
|
||||
public static String tin_overlay = "undergroundbiomes:tin_overlay";
|
||||
public static String uranium_overlay = "undergroundbiomes:uranium_overlay";
|
||||
|
||||
public class BlocksAreAlreadySet extends RuntimeException {
|
||||
// this is thrown if UB has already run its pre-initialization step and can no longer register blocks
|
||||
public final Block oreBlock;
|
||||
public final String overlayName;
|
||||
|
||||
public BlocksAreAlreadySet(Block oreBlock, String overlayName) {
|
||||
this.oreBlock = oreBlock;
|
||||
this.overlayName = overlayName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String blockDescription = "undefined block";
|
||||
String overlayDescription = "undefined overlay";
|
||||
if (oreBlock != null) blockDescription = oreBlock.getUnlocalizedName();
|
||||
if (overlayName != null) overlayDescription = overlayName;
|
||||
return "Attempt to create Underground Biomes ore for "+blockDescription+" with "+overlayDescription +
|
||||
" after blocks have already been defined";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Executable → Regular
+1
-1
@@ -61,7 +61,7 @@ import forestry.core.utils.StringUtil;
|
||||
+ "after:ExtrabiomesXL;"
|
||||
+ "after:BiomesOPlenty;"
|
||||
+ "after:IC2@[2.0.140,);"
|
||||
+ "before:UndergroundBiomes")
|
||||
+ "after:Natura@[2.2.0,);")
|
||||
//, certificateFingerprint = Version.FINGERPRINT)
|
||||
public class Forestry {
|
||||
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
@@ -1,29 +1,29 @@
|
||||
/*******************************************************************************
|
||||
* 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.apiculture.worldgen;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.hives.IHiveGen;
|
||||
|
||||
public abstract class HiveGen implements IHiveGen {
|
||||
|
||||
@Override
|
||||
public boolean canReplace(World world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
Material material = block.getMaterial();
|
||||
return (material.isReplaceable() && !material.isLiquid()) ||
|
||||
material == Material.air ||
|
||||
material == Material.plants;
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* 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.apiculture.worldgen;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.hives.IHiveGen;
|
||||
|
||||
public abstract class HiveGen implements IHiveGen {
|
||||
|
||||
@Override
|
||||
public boolean canReplace(World world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
Material material = block.getMaterial();
|
||||
return (material.isReplaceable() && !material.isLiquid()) ||
|
||||
material == Material.air ||
|
||||
material == Material.plants;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
/*******************************************************************************
|
||||
* 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.apiculture.worldgen;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import forestry.api.apiculture.hives.IHiveGen;
|
||||
import forestry.api.apiculture.hives.IHiveGenHelper;
|
||||
|
||||
public class HiveGenHelper implements IHiveGenHelper {
|
||||
|
||||
private static final IHiveGen treeGen = new HiveGenTree();
|
||||
|
||||
@Override
|
||||
public IHiveGen ground(Block... validGroundBlocks) {
|
||||
return new HiveGenGround(validGroundBlocks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHiveGen tree() {
|
||||
return treeGen;
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* 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.apiculture.worldgen;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import forestry.api.apiculture.hives.IHiveGen;
|
||||
import forestry.api.apiculture.hives.IHiveGenHelper;
|
||||
|
||||
public class HiveGenHelper implements IHiveGenHelper {
|
||||
|
||||
private static final IHiveGen treeGen = new HiveGenTree();
|
||||
|
||||
@Override
|
||||
public IHiveGen ground(Block... validGroundBlocks) {
|
||||
return new HiveGenGround(validGroundBlocks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHiveGen tree() {
|
||||
return treeGen;
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,7 @@ public class ForestryCore {
|
||||
|
||||
EnumErrorCode.init();
|
||||
|
||||
PluginManager.runSetup();
|
||||
PluginManager.runPreInit();
|
||||
}
|
||||
|
||||
|
||||
Executable → Regular
+1
-1
@@ -110,7 +110,7 @@ public class Config {
|
||||
public static float getBeehivesRate() {
|
||||
return generateBeehivesRate;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isExUtilEnderLilyEnabled() {
|
||||
return ExUtilEnderLily;
|
||||
}
|
||||
|
||||
@@ -225,45 +225,45 @@ public class Allele implements IAllele {
|
||||
public static IAlleleButterflySpecies lepiLLacewing;
|
||||
|
||||
// / ALL // GENERIC
|
||||
public static Allele boolFalse;
|
||||
public static Allele boolTrue;
|
||||
public static final Allele boolFalse = new AlleleBoolean("boolFalse", false);
|
||||
public static final Allele boolTrue = new AlleleBoolean("boolTrue", true);
|
||||
|
||||
public static Allele int1;
|
||||
public static Allele int2;
|
||||
public static Allele int3;
|
||||
public static Allele int4;
|
||||
public static Allele int5;
|
||||
public static Allele int6;
|
||||
public static Allele int7;
|
||||
public static Allele int8;
|
||||
public static Allele int9;
|
||||
public static Allele int10;
|
||||
public static final Allele int1 = new AlleleInteger("i1d", 1, true);
|
||||
public static final Allele int2 = new AlleleInteger("i2d", 2, true);
|
||||
public static final Allele int3 = new AlleleInteger("i3d", 3, true);
|
||||
public static final Allele int4 = new AlleleInteger("i4d", 4, true);
|
||||
public static final Allele int5 = new AlleleInteger("i5d", 5, true);
|
||||
public static final Allele int6 = new AlleleInteger("i6d", 6, true);
|
||||
public static final Allele int7 = new AlleleInteger("i7d", 7, true);
|
||||
public static final Allele int8 = new AlleleInteger("i8d", 8, true);
|
||||
public static final Allele int9 = new AlleleInteger("i9d", 9, true);
|
||||
public static final Allele int10 = new AlleleInteger("i10d", 10, true);
|
||||
|
||||
// / BEES // SPEED 1100 - 1199
|
||||
public static Allele speedSlowest;
|
||||
public static Allele speedSlower;
|
||||
public static Allele speedSlow;
|
||||
public static Allele speedNorm;
|
||||
public static Allele speedFast;
|
||||
public static Allele speedFaster;
|
||||
public static Allele speedFastest;
|
||||
public static final Allele speedSlowest = new AlleleFloat("speedSlowest", 0.3f, true).setName("speed", "slowest");
|
||||
public static final Allele speedSlower = new AlleleFloat("speedSlower", 0.6f, true).setName("speed", "slower");
|
||||
public static final Allele speedSlow = new AlleleFloat("speedSlow", 0.8f, true).setName("speed", "slow");
|
||||
public static final Allele speedNorm = new AlleleFloat("speedNorm", 1.0f).setName("speed", "normal");
|
||||
public static final Allele speedFast = new AlleleFloat("speedFast", 1.2f, true).setName("speed", "fast");
|
||||
public static final Allele speedFaster = new AlleleFloat("speedFaster", 1.4f).setName("speed", "faster");
|
||||
public static final Allele speedFastest = new AlleleFloat("speedFastest", 1.7f).setName("speed", "fastest");
|
||||
|
||||
// / BEES // LIFESPAN 1200 - 1299
|
||||
public static Allele lifespanShortest;
|
||||
public static Allele lifespanShorter;
|
||||
public static Allele lifespanShort;
|
||||
public static Allele lifespanShortened;
|
||||
public static Allele lifespanNormal;
|
||||
public static Allele lifespanElongated;
|
||||
public static Allele lifespanLong;
|
||||
public static Allele lifespanLonger;
|
||||
public static Allele lifespanLongest;
|
||||
public static final Allele lifespanShortest = new AlleleInteger("lifespanShortest", 10, false).setName("gui.shortestlife");
|
||||
public static final Allele lifespanShorter = new AlleleInteger("lifespanShorter", 20, true).setName("gui.shorterlife");
|
||||
public static final Allele lifespanShort = new AlleleInteger("lifespanShort", 30, true).setName("gui.shortlife");
|
||||
public static final Allele lifespanShortened = new AlleleInteger("lifespanShortened", 35, true).setName("gui.shortenedlife");
|
||||
public static final Allele lifespanNormal = new AlleleInteger("lifespanNormal", 40).setName("gui.normallife");
|
||||
public static final Allele lifespanElongated = new AlleleInteger("lifespanElongated", 45, true).setName("gui.elongatedlife");
|
||||
public static final Allele lifespanLong = new AlleleInteger("lifespanLong", 50).setName("gui.longlife");
|
||||
public static final Allele lifespanLonger = new AlleleInteger("lifespanLonger", 60).setName("gui.longerlife");
|
||||
public static final Allele lifespanLongest = new AlleleInteger("lifespanLongest", 70).setName("gui.longestlife");
|
||||
|
||||
// / BEES // FERTILITY 1300 - 1349
|
||||
public static Allele fertilityLow;
|
||||
public static Allele fertilityNormal;
|
||||
public static Allele fertilityHigh;
|
||||
public static Allele fertilityMaximum;
|
||||
public static final Allele fertilityLow = new AlleleInteger("fertilityLow", 1, true);
|
||||
public static final Allele fertilityNormal = new AlleleInteger("fertilityNormal", 2, true);
|
||||
public static final Allele fertilityHigh = new AlleleInteger("fertilityHigh", 3);
|
||||
public static final Allele fertilityMaximum = new AlleleInteger("fertilityMaximum", 4);
|
||||
|
||||
// / TREES // GROWTH PROVIDER 1350 - 1399
|
||||
public static IAlleleGrowth growthLightlevel;
|
||||
@@ -285,41 +285,41 @@ public class Allele implements IAllele {
|
||||
public static IAlleleFruit fruitJujube;
|
||||
|
||||
// / TREES // HEIGHT 1400 - 1449
|
||||
public static Allele heightSmallest;
|
||||
public static Allele heightSmaller;
|
||||
public static Allele heightSmall;
|
||||
public static Allele heightAverage;
|
||||
public static Allele heightLarge;
|
||||
public static Allele heightLarger;
|
||||
public static Allele heightLargest;
|
||||
public static Allele heightGigantic;
|
||||
public static final Allele heightSmallest = new AlleleFloat("heightSmallest", 0.25f).setName("height", "smallest");
|
||||
public static final Allele heightSmaller = new AlleleFloat("heightSmaller", 0.5f).setName("height", "smaller");
|
||||
public static final Allele heightSmall = new AlleleFloat("heightSmall", 0.75f).setName("height", "small");
|
||||
public static final Allele heightAverage = new AlleleFloat("heightMax10", 1.0f).setName("height", "average");
|
||||
public static final Allele heightLarge = new AlleleFloat("heightLarge", 1.25f).setName("height", "large");
|
||||
public static final Allele heightLarger = new AlleleFloat("heightLarger", 1.5f).setName("height", "larger");
|
||||
public static final Allele heightLargest = new AlleleFloat("heightLargest", 1.75f).setName("height", "largest");
|
||||
public static final Allele heightGigantic = new AlleleFloat("heightGigantic", 2.0f).setName("height", "gigantic");
|
||||
|
||||
/// BUTTERFLIES // SIZE
|
||||
public static Allele sizeSmallest;
|
||||
public static Allele sizeSmaller;
|
||||
public static Allele sizeSmall;
|
||||
public static Allele sizeAverage;
|
||||
public static Allele sizeLarge;
|
||||
public static Allele sizeLarger;
|
||||
public static Allele sizeLargest;
|
||||
public static final Allele sizeSmallest = new AlleleFloat("sizeSmallest", 0.3f).setName("size", "smallest");
|
||||
public static final Allele sizeSmaller = new AlleleFloat("sizeSmaller", 0.4f).setName("size", "smaller");
|
||||
public static final Allele sizeSmall = new AlleleFloat("sizeSmall", 0.5f).setName("size", "small");
|
||||
public static final Allele sizeAverage = new AlleleFloat("sizeAverage", 0.6f).setName("size", "average");
|
||||
public static final Allele sizeLarge = new AlleleFloat("sizeLarge", 0.75f).setName("size", "large");
|
||||
public static final Allele sizeLarger = new AlleleFloat("sizeLarger", 0.9f).setName("size", "larger");
|
||||
public static final Allele sizeLargest = new AlleleFloat("sizeLargest", 1.0f).setName("size", "largest");
|
||||
|
||||
// / BOTH // TOLERANCE 1450 - 1499
|
||||
public static Allele toleranceNone;
|
||||
public static Allele toleranceBoth1;
|
||||
public static Allele toleranceBoth2;
|
||||
public static Allele toleranceBoth3;
|
||||
public static Allele toleranceBoth4;
|
||||
public static Allele toleranceBoth5;
|
||||
public static Allele toleranceUp1;
|
||||
public static Allele toleranceUp2;
|
||||
public static Allele toleranceUp3;
|
||||
public static Allele toleranceUp4;
|
||||
public static Allele toleranceUp5;
|
||||
public static Allele toleranceDown1;
|
||||
public static Allele toleranceDown2;
|
||||
public static Allele toleranceDown3;
|
||||
public static Allele toleranceDown4;
|
||||
public static Allele toleranceDown5;
|
||||
public static final Allele toleranceNone = new AlleleTolerance("toleranceNone", EnumTolerance.NONE);
|
||||
public static final Allele toleranceBoth1 = new AlleleTolerance("toleranceBoth1", EnumTolerance.BOTH_1, true);
|
||||
public static final Allele toleranceBoth2 = new AlleleTolerance("toleranceBoth2", EnumTolerance.BOTH_2);
|
||||
public static final Allele toleranceBoth3 = new AlleleTolerance("toleranceBoth3", EnumTolerance.BOTH_3);
|
||||
public static final Allele toleranceBoth4 = new AlleleTolerance("toleranceBoth4", EnumTolerance.BOTH_4);
|
||||
public static final Allele toleranceBoth5 = new AlleleTolerance("toleranceBoth5", EnumTolerance.BOTH_5);
|
||||
public static final Allele toleranceUp1 = new AlleleTolerance("toleranceUp1", EnumTolerance.UP_1, true);
|
||||
public static final Allele toleranceUp2 = new AlleleTolerance("toleranceUp2", EnumTolerance.UP_2);
|
||||
public static final Allele toleranceUp3 = new AlleleTolerance("toleranceUp3", EnumTolerance.UP_3);
|
||||
public static final Allele toleranceUp4 = new AlleleTolerance("toleranceUp4", EnumTolerance.UP_4);
|
||||
public static final Allele toleranceUp5 = new AlleleTolerance("toleranceUp5", EnumTolerance.UP_5);
|
||||
public static final Allele toleranceDown1 = new AlleleTolerance("toleranceDown1", EnumTolerance.DOWN_1, true);
|
||||
public static final Allele toleranceDown2 = new AlleleTolerance("toleranceDown2", EnumTolerance.DOWN_2);
|
||||
public static final Allele toleranceDown3 = new AlleleTolerance("toleranceDown3", EnumTolerance.DOWN_3);
|
||||
public static final Allele toleranceDown4 = new AlleleTolerance("toleranceDown4", EnumTolerance.DOWN_4);
|
||||
public static final Allele toleranceDown5 = new AlleleTolerance("toleranceDown5", EnumTolerance.DOWN_5);
|
||||
|
||||
// / BEES // FLOWER PROVIDERS 1500 - 1599
|
||||
public static Allele flowersVanilla;
|
||||
@@ -333,56 +333,56 @@ public class Allele implements IAllele {
|
||||
public static Allele flowersGourd;
|
||||
|
||||
// / TREES // FERTILITY 1600 - 1649
|
||||
public static Allele saplingsLowest;
|
||||
public static Allele saplingsLower;
|
||||
public static Allele saplingsLow;
|
||||
public static Allele saplingsAverage;
|
||||
public static Allele saplingsHigh;
|
||||
public static Allele saplingsHigher;
|
||||
public static Allele saplingsHighest;
|
||||
public static final Allele saplingsLowest = new AlleleFloat("saplingsLowest", 0.01f, true).setName("saplings", "lowest");
|
||||
public static final Allele saplingsLower = new AlleleFloat("saplingsLower", 0.025f, true).setName("saplings", "lower");
|
||||
public static final Allele saplingsLow = new AlleleFloat("saplingsLow", 0.035f, true).setName("saplings", "low");
|
||||
public static final Allele saplingsAverage = new AlleleFloat("saplingsDefault", 0.05f, true).setName("saplings", "average");
|
||||
public static final Allele saplingsHigh = new AlleleFloat("saplingsDouble", 0.1f, true).setName("saplings", "high");
|
||||
public static final Allele saplingsHigher = new AlleleFloat("saplingsTriple", 0.2f, true).setName("saplings", "higher");
|
||||
public static final Allele saplingsHighest = new AlleleFloat("saplingsHighest", 0.3f, true).setName("saplings", "highest");
|
||||
|
||||
// / TREES // YIELD 1650 - 1699
|
||||
public static Allele yieldLowest;
|
||||
public static Allele yieldLower;
|
||||
public static Allele yieldLow;
|
||||
public static Allele yieldAverage;
|
||||
public static Allele yieldHigh;
|
||||
public static Allele yieldHigher;
|
||||
public static Allele yieldHighest;
|
||||
public static final Allele yieldLowest = new AlleleFloat("yieldLowest", 0.025f, true).setName("yield", "lowest");
|
||||
public static final Allele yieldLower = new AlleleFloat("yieldLower", 0.05f, true).setName("yield", "lower");
|
||||
public static final Allele yieldLow = new AlleleFloat("yieldLow", 0.1f, true).setName("yield", "low");
|
||||
public static final Allele yieldAverage = new AlleleFloat("yieldDefault", 0.2f, true).setName("yield", "average");
|
||||
public static final Allele yieldHigh = new AlleleFloat("yieldHigh", 0.3f, false).setName("yield", "high");
|
||||
public static final Allele yieldHigher = new AlleleFloat("yieldHigher", 0.35f, false).setName("yield", "higher");
|
||||
public static final Allele yieldHighest = new AlleleFloat("yieldHighest", 0.4f, false).setName("yield", "highest");
|
||||
|
||||
// TREES // SAPPINESS
|
||||
public static Allele sappinessLowest;
|
||||
public static Allele sappinessLower;
|
||||
public static Allele sappinessLow;
|
||||
public static Allele sappinessAverage;
|
||||
public static Allele sappinessHigh;
|
||||
public static Allele sappinessHigher;
|
||||
public static Allele sappinessHighest;
|
||||
public static final Allele sappinessLowest = new AlleleFloat("sappinessLowest", 0.1f, true).setName("sappiness", "lowest");
|
||||
public static final Allele sappinessLower = new AlleleFloat("sappinessLower", 0.2f, true).setName("sappiness", "lower");
|
||||
public static final Allele sappinessLow = new AlleleFloat("sappinessLow", 0.3f, true).setName("sappiness", "low");
|
||||
public static final Allele sappinessAverage = new AlleleFloat("sappinessAverage", 0.4f, true).setName("sappiness", "average");
|
||||
public static final Allele sappinessHigh = new AlleleFloat("sappinessHigh", 0.6f, true).setName("sappiness", "high");
|
||||
public static final Allele sappinessHigher = new AlleleFloat("sappinessHigher", 0.8f, false).setName("sappiness", "higher");
|
||||
public static final Allele sappinessHighest = new AlleleFloat("sappinessHighest", 1.0f, false).setName("sappiness", "highest");
|
||||
|
||||
// TREES // MATURATION TIME
|
||||
public static Allele maturationSlowest;
|
||||
public static Allele maturationSlower;
|
||||
public static Allele maturationSlow;
|
||||
public static Allele maturationAverage;
|
||||
public static Allele maturationFast;
|
||||
public static Allele maturationFaster;
|
||||
public static Allele maturationFastest;
|
||||
public static final Allele maturationSlowest = new AlleleInteger("maturationSlowest", 10, true).setName("maturity", "slowest");
|
||||
public static final Allele maturationSlower = new AlleleInteger("maturationSlower", 7).setName("maturity", "slower");
|
||||
public static final Allele maturationSlow = new AlleleInteger("maturationSlow", 5, true).setName("maturity", "slow");
|
||||
public static final Allele maturationAverage = new AlleleInteger("maturationAverage", 4).setName("maturity", "average");
|
||||
public static final Allele maturationFast = new AlleleInteger("maturationFast", 3).setName("maturity", "fast");
|
||||
public static final Allele maturationFaster = new AlleleInteger("maturationFaster", 2).setName("maturity", "faster");
|
||||
public static final Allele maturationFastest = new AlleleInteger("maturationFastest", 1).setName("maturity", "fastest");
|
||||
|
||||
// / BEES // FLOWER GROWTH 1700 - 1749
|
||||
public static Allele floweringSlowest;
|
||||
public static Allele floweringSlower;
|
||||
public static Allele floweringSlow;
|
||||
public static Allele floweringAverage;
|
||||
public static Allele floweringFast;
|
||||
public static Allele floweringFaster;
|
||||
public static Allele floweringFastest;
|
||||
public static Allele floweringMaximum;
|
||||
public static final Allele floweringSlowest = new AlleleInteger("floweringSlowest", 5, true).setName("flowering", "slowest");
|
||||
public static final Allele floweringSlower = new AlleleInteger("floweringSlower", 10).setName("flowering", "slower");
|
||||
public static final Allele floweringSlow = new AlleleInteger("floweringSlow", 15).setName("flowering", "slow");
|
||||
public static final Allele floweringAverage = new AlleleInteger("floweringAverage", 20).setName("flowering", "average");
|
||||
public static final Allele floweringFast = new AlleleInteger("floweringFast", 25).setName("flowering", "fast");
|
||||
public static final Allele floweringFaster = new AlleleInteger("floweringFaster", 30).setName("flowering", "faster");
|
||||
public static final Allele floweringFastest = new AlleleInteger("floweringFastest", 35).setName("flowering", "fastest");
|
||||
public static final Allele floweringMaximum = new AlleleInteger("floweringMaximum", 99, true).setName("flowering", "maximum");
|
||||
|
||||
// / BOTH // TERRITORY 1750 - 1799
|
||||
public static Allele territoryDefault;
|
||||
public static Allele territoryLarge;
|
||||
public static Allele territoryLarger;
|
||||
public static Allele territoryLargest;
|
||||
public static final Allele territoryDefault = new AlleleArea("territoryDefault", new int[]{9, 6, 9}).setName("territory", "average");
|
||||
public static final Allele territoryLarge = new AlleleArea("territoryLarge", new int[]{11, 8, 11}).setName("territory", "large");
|
||||
public static final Allele territoryLarger = new AlleleArea("territoryLarger", new int[]{13, 12, 13}).setName("territory", "larger");
|
||||
public static final Allele territoryLargest = new AlleleArea("territoryLargest", new int[]{15, 13, 15}).setName("territory", "largest");
|
||||
|
||||
// / BEES // EFFECTS 1800 - 1899
|
||||
public static Allele effectNone;
|
||||
@@ -412,164 +412,20 @@ public class Allele implements IAllele {
|
||||
public static Allele butterflyNone;
|
||||
|
||||
// These are "secondary" plant attributes, i.e. the tree can double as one.
|
||||
public static Allele plantTypeNone;
|
||||
public static Allele plantTypePlains;
|
||||
public static Allele plantTypeDesert;
|
||||
public static Allele plantTypeBeach;
|
||||
public static Allele plantTypeCave;
|
||||
public static Allele plantTypeWater;
|
||||
public static Allele plantTypeNether;
|
||||
public static Allele plantTypeCrop;
|
||||
public static final Allele plantTypeNone = new AllelePlantType("plantTypeNone", EnumSet.noneOf(EnumPlantType.class), true);
|
||||
public static final Allele plantTypePlains = new AllelePlantType("plantTypePlains", EnumPlantType.Plains);
|
||||
public static final Allele plantTypeDesert = new AllelePlantType("plantTypeDesert", EnumPlantType.Desert);
|
||||
public static final Allele plantTypeBeach = new AllelePlantType("plantTypeBeach", EnumPlantType.Beach);
|
||||
public static final Allele plantTypeCave = new AllelePlantType("plantTypeCave", EnumPlantType.Cave);
|
||||
public static final Allele plantTypeWater = new AllelePlantType("plantTypeWater", EnumPlantType.Water);
|
||||
public static final Allele plantTypeNether = new AllelePlantType("plantTypeNether", EnumPlantType.Nether);
|
||||
public static final Allele plantTypeCrop = new AllelePlantType("plantTypeCrop", EnumPlantType.Crop);
|
||||
|
||||
// / TREES // FIREPROOF
|
||||
public static Allele fireproofFalse;
|
||||
public static Allele fireproofTrue;
|
||||
|
||||
public static void initialize() {
|
||||
// ALL // GENERIC
|
||||
boolFalse = new AlleleBoolean("boolFalse", false);
|
||||
boolTrue = new AlleleBoolean("boolTrue", true);
|
||||
|
||||
int1 = new AlleleInteger("i1d", 1, true);
|
||||
int2 = new AlleleInteger("i2d", 2, true);
|
||||
int3 = new AlleleInteger("i3d", 3, true);
|
||||
int4 = new AlleleInteger("i4d", 4, true);
|
||||
int5 = new AlleleInteger("i5d", 5, true);
|
||||
int6 = new AlleleInteger("i6d", 6, true);
|
||||
int7 = new AlleleInteger("i7d", 7, true);
|
||||
int8 = new AlleleInteger("i8d", 8, true);
|
||||
int9 = new AlleleInteger("i9d", 9, true);
|
||||
int10 = new AlleleInteger("i10d", 10, true);
|
||||
|
||||
// BEES // SPEED
|
||||
speedSlowest = new AlleleFloat("speedSlowest", 0.3f, true).setName("speed", "slowest");
|
||||
speedSlower = new AlleleFloat("speedSlower", 0.6f, true).setName("speed", "slower");
|
||||
speedSlow = new AlleleFloat("speedSlow", 0.8f, true).setName("speed", "slow");
|
||||
speedNorm = new AlleleFloat("speedNorm", 1.0f).setName("speed", "normal");
|
||||
speedFast = new AlleleFloat("speedFast", 1.2f, true).setName("speed", "fast");
|
||||
speedFaster = new AlleleFloat("speedFaster", 1.4f).setName("speed", "faster");
|
||||
speedFastest = new AlleleFloat("speedFastest", 1.7f).setName("speed", "fastest");
|
||||
|
||||
// BEES // LIFESPAN
|
||||
lifespanShortest = new AlleleInteger("lifespanShortest", 10, false).setName("gui.shortestlife");
|
||||
lifespanShorter = new AlleleInteger("lifespanShorter", 20, true).setName("gui.shorterlife");
|
||||
lifespanShort = new AlleleInteger("lifespanShort", 30, true).setName("gui.shortlife");
|
||||
lifespanShortened = new AlleleInteger("lifespanShortened", 35, true).setName("gui.shortenedlife");
|
||||
lifespanNormal = new AlleleInteger("lifespanNormal", 40).setName("gui.normallife");
|
||||
lifespanElongated = new AlleleInteger("lifespanElongated", 45, true).setName("gui.elongatedlife");
|
||||
lifespanLong = new AlleleInteger("lifespanLong", 50).setName("gui.longlife");
|
||||
lifespanLonger = new AlleleInteger("lifespanLonger", 60).setName("gui.longerlife");
|
||||
lifespanLongest = new AlleleInteger("lifespanLongest", 70).setName("gui.longestlife");
|
||||
|
||||
// BEES // FERTILITY
|
||||
fertilityLow = new AlleleInteger("fertilityLow", 1, true);
|
||||
fertilityNormal = new AlleleInteger("fertilityNormal", 2, true);
|
||||
fertilityHigh = new AlleleInteger("fertilityHigh", 3);
|
||||
fertilityMaximum = new AlleleInteger("fertilityMaximum", 4);
|
||||
|
||||
// TREES // HEIGHT
|
||||
heightSmallest = new AlleleFloat("heightSmallest", 0.25f).setName("height", "smallest");
|
||||
heightSmaller = new AlleleFloat("heightSmaller", 0.5f).setName("height", "smaller");
|
||||
heightSmall = new AlleleFloat("heightSmall", 0.75f).setName("height", "small");
|
||||
heightAverage = new AlleleFloat("heightMax10", 1.0f).setName("height", "average");
|
||||
heightLarge = new AlleleFloat("heightLarge", 1.25f).setName("height", "large");
|
||||
heightLarger = new AlleleFloat("heightLarger", 1.5f).setName("height", "larger");
|
||||
heightLargest = new AlleleFloat("heightLargest", 1.75f).setName("height", "largest");
|
||||
heightGigantic = new AlleleFloat("heightGigantic", 2.0f).setName("height", "gigantic");
|
||||
|
||||
// BUTTERFLIES // SIZE
|
||||
sizeSmallest = new AlleleFloat("sizeSmallest", 0.3f).setName("size", "smallest");
|
||||
sizeSmaller = new AlleleFloat("sizeSmaller", 0.4f).setName("size", "smaller");
|
||||
sizeSmall = new AlleleFloat("sizeSmall", 0.5f).setName("size", "small");
|
||||
sizeAverage = new AlleleFloat("sizeAverage", 0.6f).setName("size", "average");
|
||||
sizeLarge = new AlleleFloat("sizeLarge", 0.75f).setName("size", "large");
|
||||
sizeLarger = new AlleleFloat("sizeLarger", 0.9f).setName("size", "larger");
|
||||
sizeLargest = new AlleleFloat("sizeLargest", 1.0f).setName("size", "largest");
|
||||
|
||||
// BEES // TOLERANCE
|
||||
toleranceNone = new AlleleTolerance("toleranceNone", EnumTolerance.NONE);
|
||||
toleranceBoth1 = new AlleleTolerance("toleranceBoth1", EnumTolerance.BOTH_1, true);
|
||||
toleranceBoth2 = new AlleleTolerance("toleranceBoth2", EnumTolerance.BOTH_2);
|
||||
toleranceBoth3 = new AlleleTolerance("toleranceBoth3", EnumTolerance.BOTH_3);
|
||||
toleranceBoth4 = new AlleleTolerance("toleranceBoth4", EnumTolerance.BOTH_4);
|
||||
toleranceBoth5 = new AlleleTolerance("toleranceBoth5", EnumTolerance.BOTH_5);
|
||||
toleranceUp1 = new AlleleTolerance("toleranceUp1", EnumTolerance.UP_1, true);
|
||||
toleranceUp2 = new AlleleTolerance("toleranceUp2", EnumTolerance.UP_2);
|
||||
toleranceUp3 = new AlleleTolerance("toleranceUp3", EnumTolerance.UP_3);
|
||||
toleranceUp4 = new AlleleTolerance("toleranceUp4", EnumTolerance.UP_4);
|
||||
toleranceUp5 = new AlleleTolerance("toleranceUp5", EnumTolerance.UP_5);
|
||||
toleranceDown1 = new AlleleTolerance("toleranceDown1", EnumTolerance.DOWN_1, true);
|
||||
toleranceDown2 = new AlleleTolerance("toleranceDown2", EnumTolerance.DOWN_2);
|
||||
toleranceDown3 = new AlleleTolerance("toleranceDown3", EnumTolerance.DOWN_3);
|
||||
toleranceDown4 = new AlleleTolerance("toleranceDown4", EnumTolerance.DOWN_4);
|
||||
toleranceDown5 = new AlleleTolerance("toleranceDown5", EnumTolerance.DOWN_5);
|
||||
|
||||
// TREES // FERTILITY
|
||||
saplingsLowest = new AlleleFloat("saplingsLowest", 0.01f, true).setName("saplings", "lowest");
|
||||
saplingsLower = new AlleleFloat("saplingsLower", 0.025f, true).setName("saplings", "lower");
|
||||
saplingsLow = new AlleleFloat("saplingsLow", 0.035f, true).setName("saplings", "low");
|
||||
saplingsAverage = new AlleleFloat("saplingsDefault", 0.05f, true).setName("saplings", "average");
|
||||
saplingsHigh = new AlleleFloat("saplingsDouble", 0.1f, true).setName("saplings", "high");
|
||||
saplingsHigher = new AlleleFloat("saplingsTriple", 0.2f, true).setName("saplings", "higher");
|
||||
saplingsHighest = new AlleleFloat("saplingsHighest", 0.3f, true).setName("saplings", "highest");
|
||||
|
||||
// TREES // YIELD
|
||||
yieldLowest = new AlleleFloat("yieldLowest", 0.025f, true).setName("yield", "lowest");
|
||||
yieldLower = new AlleleFloat("yieldLower", 0.05f, true).setName("yield", "lower");
|
||||
yieldLow = new AlleleFloat("yieldLow", 0.1f, true).setName("yield", "low");
|
||||
yieldAverage = new AlleleFloat("yieldDefault", 0.2f, true).setName("yield", "average");
|
||||
yieldHigh = new AlleleFloat("yieldHigh", 0.3f, false).setName("yield", "high");
|
||||
yieldHigher = new AlleleFloat("yieldHigher", 0.35f, false).setName("yield", "higher");
|
||||
yieldHighest = new AlleleFloat("yieldHighest", 0.4f, false).setName("yield", "highest");
|
||||
|
||||
// TREES // SAPPINESS
|
||||
sappinessLowest = new AlleleFloat("sappinessLowest", 0.1f, true).setName("sappiness", "lowest");
|
||||
sappinessLower = new AlleleFloat("sappinessLower", 0.2f, true).setName("sappiness", "lower");
|
||||
sappinessLow = new AlleleFloat("sappinessLow", 0.3f, true).setName("sappiness", "low");
|
||||
sappinessAverage = new AlleleFloat("sappinessAverage", 0.4f, true).setName("sappiness", "average");
|
||||
sappinessHigh = new AlleleFloat("sappinessHigh", 0.6f, true).setName("sappiness", "high");
|
||||
sappinessHigher = new AlleleFloat("sappinessHigher", 0.8f, false).setName("sappiness", "higher");
|
||||
sappinessHighest = new AlleleFloat("sappinessHighest", 1.0f, false).setName("sappiness", "highest");
|
||||
|
||||
// TREES // MATURATION TIME
|
||||
maturationSlowest = new AlleleInteger("maturationSlowest", 10, true).setName("maturity", "slowest");
|
||||
maturationSlower = new AlleleInteger("maturationSlower", 7).setName("maturity", "slower");
|
||||
maturationSlow = new AlleleInteger("maturationSlow", 5, true).setName("maturity", "slow");
|
||||
maturationAverage = new AlleleInteger("maturationAverage", 4).setName("maturity", "average");
|
||||
maturationFast = new AlleleInteger("maturationFast", 3).setName("maturity", "fast");
|
||||
maturationFaster = new AlleleInteger("maturationFaster", 2).setName("maturity", "faster");
|
||||
maturationFastest = new AlleleInteger("maturationFastest", 1).setName("maturity", "fastest");
|
||||
|
||||
// BEES // FLOWER GROWTH
|
||||
floweringSlowest = new AlleleInteger("floweringSlowest", 5, true).setName("flowering", "slowest");
|
||||
floweringSlower = new AlleleInteger("floweringSlower", 10).setName("flowering", "slower");
|
||||
floweringSlow = new AlleleInteger("floweringSlow", 15).setName("flowering", "slow");
|
||||
floweringAverage = new AlleleInteger("floweringAverage", 20).setName("flowering", "average");
|
||||
floweringFast = new AlleleInteger("floweringFast", 25).setName("flowering", "fast");
|
||||
floweringFaster = new AlleleInteger("floweringFaster", 30).setName("flowering", "faster");
|
||||
floweringFastest = new AlleleInteger("floweringFastest", 35).setName("flowering", "fastest");
|
||||
floweringMaximum = new AlleleInteger("floweringMaximum", 99, true).setName("flowering", "maximum");
|
||||
|
||||
// BOTH // TERRITORY
|
||||
territoryDefault = new AlleleArea("territoryDefault", new int[]{9, 6, 9}).setName("territory", "average");
|
||||
territoryLarge = new AlleleArea("territoryLarge", new int[]{11, 8, 11}).setName("territory", "large");
|
||||
territoryLarger = new AlleleArea("territoryLarger", new int[]{13, 12, 13}).setName("territory", "larger");
|
||||
territoryLargest = new AlleleArea("territoryLargest", new int[]{15, 13, 15}).setName("territory", "largest");
|
||||
|
||||
// TREES // PLANTS
|
||||
plantTypeNone = new AllelePlantType("plantTypeNone", EnumSet.noneOf(EnumPlantType.class), true);
|
||||
plantTypePlains = new AllelePlantType("plantTypePlains", EnumPlantType.Plains);
|
||||
|
||||
plantTypeDesert = new AllelePlantType("plantTypeDesert", EnumPlantType.Desert);
|
||||
plantTypeBeach = new AllelePlantType("plantTypeBeach", EnumPlantType.Beach);
|
||||
plantTypeCave = new AllelePlantType("plantTypeCave", EnumPlantType.Cave);
|
||||
plantTypeWater = new AllelePlantType("plantTypeWater", EnumPlantType.Water);
|
||||
plantTypeNether = new AllelePlantType("plantTypeNether", EnumPlantType.Nether);
|
||||
plantTypeCrop = new AllelePlantType("plantTypeCrop", EnumPlantType.Crop);
|
||||
|
||||
fireproofFalse = new AlleleBoolean("fireproofFalse", false);
|
||||
fireproofTrue = new AlleleBoolean("fireproofTrue", true);
|
||||
public static final Allele fireproofFalse = new AlleleBoolean("fireproofFalse", false);
|
||||
public static final Allele fireproofTrue = new AlleleBoolean("fireproofTrue", true);
|
||||
|
||||
public static void setupLegacyAPI() {
|
||||
// LEGACY MAPPINGS
|
||||
ILegacyHandler legacy = (ILegacyHandler) AlleleManager.alleleRegistry;
|
||||
|
||||
@@ -703,7 +559,6 @@ public class Allele implements IAllele {
|
||||
legacy.registerLegacyMapping(1751, "forestry.territoryLarge");
|
||||
legacy.registerLegacyMapping(1752, "forestry.territoryLarger");
|
||||
legacy.registerLegacyMapping(1753, "forestry.territoryLargest");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Executable → Regular
File mode changed.
@@ -42,7 +42,7 @@ public class BlockUtil {
|
||||
if (!(tile instanceof IEnergyReceiver)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
IEnergyReceiver receptor = (IEnergyReceiver) tile;
|
||||
return receptor.canConnectEnergy(side);
|
||||
}
|
||||
|
||||
Executable → Regular
File mode changed.
Executable → Regular
File mode changed.
@@ -41,10 +41,13 @@ public abstract class ForestryPlugin {
|
||||
return EnumSet.of(PluginManager.Module.CORE);
|
||||
}
|
||||
|
||||
protected void preInit() {
|
||||
protected void setupAPI() {
|
||||
}
|
||||
|
||||
protected void disabledPreInit() {
|
||||
protected void disabledSetupAPI() {
|
||||
}
|
||||
|
||||
protected void preInit() {
|
||||
}
|
||||
|
||||
protected void doInit() {
|
||||
@@ -53,9 +56,6 @@ public abstract class ForestryPlugin {
|
||||
protected void postInit() {
|
||||
}
|
||||
|
||||
protected void disabledPostInit() {
|
||||
}
|
||||
|
||||
public boolean processIMCMessage(IMCMessage message) {
|
||||
return false;
|
||||
}
|
||||
@@ -101,6 +101,9 @@ public abstract class ForestryPlugin {
|
||||
protected void registerItems() {
|
||||
}
|
||||
|
||||
protected void registerTriggers() {
|
||||
}
|
||||
|
||||
protected void registerBackpackItems() {
|
||||
}
|
||||
|
||||
|
||||
@@ -188,12 +188,10 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
public static MachineDefinition definitionBeehouse;
|
||||
public static MachineDefinition definitionAnalyzer;
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
HiveManager.hiveRegistry = hiveRegistry = new HiveRegistry();
|
||||
HiveManager.genHelper = new HiveGenHelper();
|
||||
@@ -201,6 +199,25 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
FlowerManager.flowerRegistry = new FlowerRegistry();
|
||||
|
||||
BeeManager.villageBees = new ArrayList[]{new ArrayList<IBeeGenome>(), new ArrayList<IBeeGenome>()};
|
||||
|
||||
// Init bee interface
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginApiculture.beeInterface = new BeeHelper());
|
||||
|
||||
// Modes
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.easy);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.normal);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hard);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hardcore);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.insane);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
ForestryBlock.apiculture.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "apiculture");
|
||||
ForestryBlock.apiculture.block().setCreativeTab(Tabs.tabApiculture);
|
||||
ForestryBlock.apiculture.block().setHarvestLevel("axe", 0);
|
||||
@@ -240,10 +257,6 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
ForestryBlock.beehives.registerBlock(new BlockBeehives(), ItemForestryBlock.class, "beehives");
|
||||
|
||||
// Init bee interface
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginApiculture.beeInterface = new BeeHelper());
|
||||
BeeManager.villageBees = new ArrayList[]{new ArrayList<IBeeGenome>(), new ArrayList<IBeeGenome>()};
|
||||
|
||||
// Candles
|
||||
ForestryBlock.candle.registerBlock(new BlockCandle(), ItemCandleBlock.class, "candle");
|
||||
ForestryBlock.stump.registerBlock(new BlockStump(), ItemForestryBlock.class, "stump");
|
||||
@@ -262,13 +275,6 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
VillageHandlerApiculture.registerVillageComponents();
|
||||
}
|
||||
|
||||
// Modes
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.easy);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.normal);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hard);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hardcore);
|
||||
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.insane);
|
||||
|
||||
// Commands
|
||||
PluginCore.rootCommand.addChildCommand(new CommandBee());
|
||||
}
|
||||
@@ -428,10 +434,6 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
ForestryItem.scoop.item().setHarvestLevel("scoop", 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerCrates() {
|
||||
ICrateRegistry crateRegistry = StorageManager.crateRegistry;
|
||||
@@ -703,7 +705,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
definitionChest.register();
|
||||
}
|
||||
|
||||
public IRecipe[] createAlyzerRecipes(Block block, int meta) {
|
||||
public static IRecipe[] createAlyzerRecipes(Block block, int meta) {
|
||||
ArrayList<IRecipe> recipes = new ArrayList<IRecipe>();
|
||||
recipes.add(ShapedRecipeCustom.createShapedRecipe(new ItemStack(block, 1, meta), "XTX", " Y ", "X X", 'Y', ForestryItem.sturdyCasing, 'T', ForestryItem.beealyzer, 'X', "ingotBronze"));
|
||||
recipes.add(ShapedRecipeCustom.createShapedRecipe(new ItemStack(block, 1, meta), "XTX", " Y ", "X X", 'Y', ForestryItem.sturdyCasing, 'T', ForestryItem.treealyzer, 'X', "ingotBronze"));
|
||||
@@ -733,7 +735,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
swampDrops.add(new HiveDrop(BeeTemplates.getValiantTemplate(), new ItemStack[]{ForestryItem.beeComb.getItemStack(1, 15)}, 3));
|
||||
}
|
||||
|
||||
private void registerDungeonLoot() {
|
||||
private static void registerDungeonLoot() {
|
||||
int rarity;
|
||||
if (Config.dungeonLootRare) {
|
||||
rarity = 5;
|
||||
@@ -760,7 +762,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getBeeItemFromTemplate(BeeTemplates.getMeadowsTemplate(), EnumBeeType.PRINCESS), 1, 1, 5));
|
||||
}
|
||||
|
||||
private ItemStack getBeeItemFromTemplate(IAllele[] template, EnumBeeType beeType) {
|
||||
private static ItemStack getBeeItemFromTemplate(IAllele[] template, EnumBeeType beeType) {
|
||||
IBee bee = new Bee(PluginApiculture.beeInterface.templateAsGenome(template));
|
||||
ItemStack beeItem;
|
||||
switch (beeType) {
|
||||
@@ -810,7 +812,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
BeeManager.hiveDrops[7] = swarmDrops;
|
||||
}
|
||||
|
||||
private void createHives() {
|
||||
private static void createHives() {
|
||||
hiveRegistry.registerHive(HiveRegistry.forest, HiveDescription.FOREST);
|
||||
hiveRegistry.registerHive(HiveRegistry.meadows, HiveDescription.MEADOWS);
|
||||
hiveRegistry.registerHive(HiveRegistry.desert, HiveDescription.DESERT);
|
||||
@@ -830,7 +832,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
hiveRegistry.addDrops(HiveRegistry.swamp, swampDrops);
|
||||
}
|
||||
|
||||
private void createAlleles() {
|
||||
private static void createAlleles() {
|
||||
|
||||
IClassification hymnoptera = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.ORDER, "hymnoptera", "Hymnoptera");
|
||||
AlleleManager.alleleRegistry.getClassification("class.insecta").addMemberGroup(hymnoptera);
|
||||
|
||||
@@ -194,6 +194,21 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
ForestryBlock.fences1,
|
||||
ForestryBlock.fences2);
|
||||
|
||||
@Override
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
// Init tree interface
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginArboriculture.treeInterface = new TreeHelper());
|
||||
|
||||
// Modes
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.easy);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.normal);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hard);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hardcore);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.insane);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
@@ -290,15 +305,9 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
'Y', Blocks.chest))
|
||||
.setFaces(0, 1, 2, 3, 4, 4, 0, 7));
|
||||
|
||||
// Init tree interface
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginArboriculture.treeInterface = new TreeHelper());
|
||||
|
||||
// Init rendering
|
||||
proxy.initializeRendering();
|
||||
|
||||
// Create alleles
|
||||
createAlleles();
|
||||
|
||||
// Register vanilla and forestry fence ids
|
||||
validFences.add(ForestryBlock.fences1.block());
|
||||
validFences.add(ForestryBlock.fences2.block());
|
||||
@@ -306,15 +315,14 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
validFences.add(Blocks.fence_gate);
|
||||
validFences.add(Blocks.nether_brick_fence);
|
||||
|
||||
// Modes
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.easy);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.normal);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hard);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hardcore);
|
||||
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.insane);
|
||||
|
||||
// Commands
|
||||
PluginCore.rootCommand.addChildCommand(new CommandTree());
|
||||
|
||||
// Create alleles
|
||||
createAlleles();
|
||||
createMutations();
|
||||
registerTemplates();
|
||||
registerErsatzGenomes();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -327,10 +335,6 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
GameRegistry.registerTileEntity(TileFruitPod.class, "forestry.Pods");
|
||||
definitionChest.register();
|
||||
|
||||
createMutations();
|
||||
registerTemplates();
|
||||
registerErsatzGenomes();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandlerArboriculture());
|
||||
|
||||
if (Config.enableVillager) {
|
||||
@@ -590,7 +594,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
Proxies.common.addRecipe(ForestryItem.grafter.getItemStack(), " B", " # ", "# ", 'B', "ingotBronze", '#', Items.stick);
|
||||
}
|
||||
|
||||
private void createAlleles() {
|
||||
private static void createAlleles() {
|
||||
|
||||
// Divisions
|
||||
IClassification angiosperms = AlleleManager.alleleRegistry.createAndRegisterClassification(
|
||||
@@ -1037,7 +1041,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
|
||||
}
|
||||
|
||||
private void registerTemplates() {
|
||||
private static void registerTemplates() {
|
||||
treeInterface.registerTemplate(TreeTemplates.getOakTemplate());
|
||||
treeInterface.registerTemplate(TreeTemplates.getBirchTemplate());
|
||||
treeInterface.registerTemplate(TreeTemplates.getSpruceTemplate());
|
||||
@@ -1084,7 +1088,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
treeInterface.registerTemplate(TreeTemplates.getDateTemplate());
|
||||
}
|
||||
|
||||
private void registerErsatzGenomes() {
|
||||
private static void registerErsatzGenomes() {
|
||||
AlleleManager.ersatzSpecimen.put(new ItemStack(Blocks.leaves, 1, 0), new Tree(
|
||||
TreeTemplates.templateAsGenome(TreeTemplates.getOakTemplate())));
|
||||
AlleleManager.ersatzSpecimen.put(new ItemStack(Blocks.leaves, 1, 1), new Tree(
|
||||
@@ -1112,7 +1116,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
TreeTemplates.templateAsGenome(TreeTemplates.getDarkOakTemplate())));
|
||||
}
|
||||
|
||||
private void createMutations() {
|
||||
private static void createMutations() {
|
||||
|
||||
// Decidious
|
||||
TreeTemplates.limeA = new TreeMutation(Allele.treeBirch, Allele.treeOak,
|
||||
@@ -1213,22 +1217,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public IFuelHandler getFuelHandler() {
|
||||
return new IFuelHandler() {
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (ForestryItem.sapling.isItemEqual(fuel)) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
for (ForestryBlock slab : slabs) {
|
||||
if (slab.isItemEqual(fuel)) {
|
||||
return 150;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
return new FuelHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1250,25 +1239,25 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
return super.processIMCMessage(message);
|
||||
}
|
||||
|
||||
private void registerDungeonLoot() {
|
||||
private static void registerDungeonLoot() {
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.grafter.getItemStack(), 1, 1, 8));
|
||||
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getOakTemplate(), EnumGermlingType.SAPLING), 2, 3, 6));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getSpruceTemplate(), EnumGermlingType.SAPLING), 2, 3, 6));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getBirchTemplate(), EnumGermlingType.SAPLING), 2, 3, 6));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.SAPLING), 1, 2, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.SAPLING), 1, 2, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getOakTemplate(), EnumGermlingType.SAPLING), 2, 3, 6));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getSpruceTemplate(), EnumGermlingType.SAPLING), 2, 3, 6));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getBirchTemplate(), EnumGermlingType.SAPLING), 2, 3, 6));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.SAPLING), 1, 2, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.SAPLING), 1, 2, 4));
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getOakTemplate(), EnumGermlingType.POLLEN), 2, 3, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getSpruceTemplate(), EnumGermlingType.POLLEN), 2, 3, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getBirchTemplate(), EnumGermlingType.POLLEN), 2, 3, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.POLLEN), 1, 2, 3));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.POLLEN), 1, 2, 3));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getOakTemplate(), EnumGermlingType.POLLEN), 2, 3, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getSpruceTemplate(), EnumGermlingType.POLLEN), 2, 3, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getBirchTemplate(), EnumGermlingType.POLLEN), 2, 3, 4));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getLarchTemplate(), EnumGermlingType.POLLEN), 1, 2, 3));
|
||||
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.POLLEN), 1, 2, 3));
|
||||
}
|
||||
}
|
||||
|
||||
private ItemStack getTreeItemFromTemplate(IAllele[] template, EnumGermlingType type) {
|
||||
private static ItemStack getTreeItemFromTemplate(IAllele[] template, EnumGermlingType type) {
|
||||
ITree tree = new Tree(PluginArboriculture.treeInterface.templateAsGenome(template));
|
||||
ItemStack treeItem;
|
||||
switch (type) {
|
||||
@@ -1284,4 +1273,21 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
treeItem.setTagCompound(nbtTagCompound);
|
||||
return treeItem;
|
||||
}
|
||||
|
||||
private static class FuelHandler implements IFuelHandler {
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (ForestryItem.sapling.isItemEqual(fuel)) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
for (ForestryBlock slab : slabs) {
|
||||
if (slab.isItemEqual(fuel)) {
|
||||
return 150;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,11 +84,8 @@ public class PluginCore extends ForestryPlugin {
|
||||
public static final RootCommand rootCommand = new RootCommand();
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
rootCommand.addChildCommand(new CommandVersion());
|
||||
rootCommand.addChildCommand(new CommandPlugins());
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
ChipsetManager.solderManager = new ItemSolderingIron.SolderManager();
|
||||
|
||||
@@ -101,7 +98,15 @@ public class PluginCore extends ForestryPlugin {
|
||||
AlleleManager.climateHelper = new ClimateHelper();
|
||||
alleleRegistry.initialize();
|
||||
|
||||
Allele.initialize();
|
||||
Allele.setupLegacyAPI();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
rootCommand.addChildCommand(new CommandVersion());
|
||||
rootCommand.addChildCommand(new CommandPlugins());
|
||||
|
||||
ForestryBlock.core.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "core");
|
||||
|
||||
@@ -276,14 +281,6 @@ public class PluginCore extends ForestryPlugin {
|
||||
ForestryItem.fruits.registerItem(new ItemFruit(), "fruits");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerCrates() {
|
||||
ICrateRegistry crateRegistry = StorageManager.crateRegistry;
|
||||
@@ -450,19 +447,21 @@ public class PluginCore extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public IFuelHandler getFuelHandler() {
|
||||
return new IFuelHandler() {
|
||||
return new FuelHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.peat.item()) {
|
||||
return 2000;
|
||||
}
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.bituminousPeat.item()) {
|
||||
return 4200;
|
||||
}
|
||||
private static class FuelHandler implements IFuelHandler {
|
||||
|
||||
return 0;
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.peat.item()) {
|
||||
return 2000;
|
||||
}
|
||||
};
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.bituminousPeat.item()) {
|
||||
return 4200;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,8 +23,6 @@ import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.gadgets.BlockBase;
|
||||
import forestry.core.gadgets.MachineDefinition;
|
||||
import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import forestry.core.items.ItemForestryBlock;
|
||||
import forestry.core.utils.ShapedRecipeCustom;
|
||||
import forestry.energy.GuiHandlerEnergy;
|
||||
@@ -97,34 +95,8 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
definitionEngineClockwork.register();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerItems() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRecipes() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerCrates() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGuiHandler getGuiHandler() {
|
||||
return new GuiHandlerEnergy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISaveEventHandler getSaveEventHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOreDictionaryHandler getDictionaryHandler() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import java.util.Arrays;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -68,10 +68,25 @@ public class PluginFactory extends ForestryPlugin {
|
||||
public static MachineDefinition definitionWorktable;
|
||||
|
||||
@Override
|
||||
protected void disabledPreInit() {
|
||||
super.disabledPreInit();
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
RecipeManagers.craftingProviders = Arrays.asList(
|
||||
RecipeManagers.craftingProviders = ImmutableList.of(
|
||||
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager(),
|
||||
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager(),
|
||||
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager(),
|
||||
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager(),
|
||||
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager(),
|
||||
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager(),
|
||||
RecipeManagers.stillManager = new MachineStill.RecipeManager()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disabledSetupAPI() {
|
||||
super.disabledSetupAPI();
|
||||
|
||||
RecipeManagers.craftingProviders = ImmutableList.of(
|
||||
RecipeManagers.carpenterManager = new DummyManagers.CarpenterManager(),
|
||||
RecipeManagers.centrifugeManager = new DummyManagers.CentrifugeManager(),
|
||||
RecipeManagers.fabricatorManager = new DummyManagers.FabricatorManager(),
|
||||
@@ -86,16 +101,6 @@ public class PluginFactory extends ForestryPlugin {
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
RecipeManagers.craftingProviders = Arrays.asList(
|
||||
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager(),
|
||||
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager(),
|
||||
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager(),
|
||||
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager(),
|
||||
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager(),
|
||||
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager(),
|
||||
RecipeManagers.stillManager = new MachineStill.RecipeManager()
|
||||
);
|
||||
|
||||
ForestryBlock.factoryTESR.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "factory");
|
||||
|
||||
BlockBase factoryTESR = ((BlockBase) ForestryBlock.factoryTESR.block());
|
||||
@@ -215,11 +220,11 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'W', Blocks.crafting_table,
|
||||
'C', Blocks.chest))
|
||||
.setFaces(0, 1, 2, 3, 4, 4));
|
||||
}
|
||||
|
||||
// Triggers
|
||||
if (PluginManager.Module.BUILDCRAFT_STATEMENTS.isEnabled()) {
|
||||
FactoryTriggers.initialize();
|
||||
}
|
||||
@Override
|
||||
protected void registerTriggers() {
|
||||
FactoryTriggers.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -85,10 +85,15 @@ public class PluginFarming extends ForestryPlugin {
|
||||
public static ItemStack farmFertilizer;
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
Farmables.farmInterface = new FarmHelper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
ForestryBlock.mushroom.registerBlock(new BlockMushroom(), ItemTypedBlock.class, "mushroom");
|
||||
|
||||
@@ -130,11 +135,6 @@ public class PluginFarming extends ForestryPlugin {
|
||||
|
||||
proxy.initializeRendering();
|
||||
|
||||
// Triggers
|
||||
if (PluginManager.Module.BUILDCRAFT_STATEMENTS.isEnabled()) {
|
||||
FarmingTriggers.initialize();
|
||||
}
|
||||
|
||||
// Layouts
|
||||
ICircuitLayout layoutManaged = new CircuitLayout("farms.managed");
|
||||
ChipsetManager.circuitRegistry.registerLayout(layoutManaged);
|
||||
@@ -142,6 +142,11 @@ public class PluginFarming extends ForestryPlugin {
|
||||
ChipsetManager.circuitRegistry.registerLayout(layoutManual);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerTriggers() {
|
||||
FarmingTriggers.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doInit() {
|
||||
super.doInit();
|
||||
|
||||
@@ -36,8 +36,8 @@ import forestry.food.items.ItemInfuser;
|
||||
public class PluginFood extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
// Init seasoner
|
||||
BeverageManager.infuserManager = new ItemInfuser.MixtureManager();
|
||||
@@ -72,10 +72,6 @@ public class PluginFood extends ForestryPlugin {
|
||||
LiquidHelper.injectLiquidContainer(Fluids.SHORT_MEAD, Defaults.BUCKET_VOLUME, meadBottle, new ItemStack(Items.glass_bottle));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRecipes() {
|
||||
// INFUSER
|
||||
@@ -85,22 +81,8 @@ public class PluginFood extends ForestryPlugin {
|
||||
'X', "ingotBronze");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerCrates() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGuiHandler getGuiHandler() {
|
||||
return new GuiHandlerFood();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISaveEventHandler getSaveEventHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOreDictionaryHandler getDictionaryHandler() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -83,12 +83,18 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
public static IButterflyRoot butterflyInterface;
|
||||
public static MachineDefinition definitionChest;
|
||||
|
||||
@Override
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginLepidopterology.butterflyInterface = new ButterflyHelper());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
ForestryBlock.lepidopterology.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "lepidopterology");
|
||||
ForestryBlock.lepidopterology.block().setCreativeTab(Tabs.tabLepidopterology);
|
||||
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginLepidopterology.butterflyInterface = new ButterflyHelper());
|
||||
createAlleles();
|
||||
}
|
||||
|
||||
@@ -121,6 +127,7 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
|
||||
Utils.registerEntity(EntityButterfly.class, "butterflyGE", 0, 0x000000, 0xffffff, 50, 1, true);
|
||||
proxy.initializeRendering();
|
||||
|
||||
registerTemplates();
|
||||
|
||||
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
|
||||
@@ -159,7 +166,7 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
Items.redstone, 'D', Items.diamond);
|
||||
}
|
||||
|
||||
private void createAlleles() {
|
||||
private static void createAlleles() {
|
||||
|
||||
IClassification lepidoptera = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.ORDER, "lepidoptera", "Lepidoptera");
|
||||
AlleleManager.alleleRegistry.getClassification("class.insecta").addMemberGroup(lepidoptera);
|
||||
@@ -273,7 +280,13 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
Allele.butterflyNone = new AlleleEffectNone("bfNone", false);
|
||||
}
|
||||
|
||||
private void registerTemplates() {
|
||||
private static IClassification createButterflyBranch(IClassification family, String scientific) {
|
||||
IClassification branch = new Branch("moth." + scientific.toLowerCase(Locale.ENGLISH), scientific);
|
||||
branch.setParent(family);
|
||||
return branch;
|
||||
}
|
||||
|
||||
private static void registerTemplates() {
|
||||
butterflyInterface.registerTemplate(ButterflyTemplates.getBrimstoneMothTemplate());
|
||||
butterflyInterface.registerTemplate(ButterflyTemplates.getLatticedHeathTemplate());
|
||||
butterflyInterface.registerTemplate(ButterflyTemplates.getAtlasMothTemplate());
|
||||
@@ -319,12 +332,6 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
|
||||
}
|
||||
|
||||
private IClassification createButterflyBranch(IClassification family, String scientific) {
|
||||
IClassification branch = new Branch("moth." + scientific.toLowerCase(Locale.ENGLISH), scientific);
|
||||
branch.setParent(family);
|
||||
return branch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGuiHandler getGuiHandler() {
|
||||
return new GuiHandlerLepidopterology();
|
||||
|
||||
@@ -63,6 +63,15 @@ public class PluginMail extends ForestryPlugin {
|
||||
public static MachineDefinition definitionPhilatelist;
|
||||
public static StampInfo[] stampDefinitions;
|
||||
|
||||
@Override
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
PostManager.postRegistry = new PostRegistry();
|
||||
PostManager.postRegistry.registerCarrier(new PostalCarrier(EnumAddressee.PLAYER));
|
||||
PostManager.postRegistry.registerCarrier(new PostalCarrier(EnumAddressee.TRADER));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
@@ -71,11 +80,6 @@ public class PluginMail extends ForestryPlugin {
|
||||
|
||||
new TickHandlerMailClient();
|
||||
|
||||
// Triggers
|
||||
if (PluginManager.Module.BUILDCRAFT_STATEMENTS.isEnabled()) {
|
||||
MailTriggers.initialize();
|
||||
}
|
||||
|
||||
ForestryBlock.mail.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "mail");
|
||||
|
||||
ShapedRecipeCustom recipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.mail.getItemStack(1, Defaults.DEFINITION_MAILBOX_META),
|
||||
@@ -102,10 +106,11 @@ public class PluginMail extends ForestryPlugin {
|
||||
|
||||
definitionPhilatelist = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_PHILATELIST_META, "forestry.Philatelist", MachinePhilatelist.class)
|
||||
.setFaces(0, 1, 2, 3, 2, 2, 0, 7));
|
||||
}
|
||||
|
||||
PostManager.postRegistry = new PostRegistry();
|
||||
PostManager.postRegistry.registerCarrier(new PostalCarrier(EnumAddressee.PLAYER));
|
||||
PostManager.postRegistry.registerCarrier(new PostalCarrier(EnumAddressee.TRADER));
|
||||
@Override
|
||||
protected void registerTriggers() {
|
||||
MailTriggers.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -117,11 +122,6 @@ public class PluginMail extends ForestryPlugin {
|
||||
definitionPhilatelist.register();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
super.postInit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGuiHandler getGuiHandler() {
|
||||
return new GuiHandlerMail();
|
||||
@@ -151,14 +151,6 @@ public class PluginMail extends ForestryPlugin {
|
||||
ForestryItem.catalogue.registerItem(new ItemCatalogue(), "catalogue");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerCrates() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRecipes() {
|
||||
// Letters
|
||||
@@ -203,9 +195,4 @@ public class PluginMail extends ForestryPlugin {
|
||||
public ISaveEventHandler getSaveEventHandler() {
|
||||
return new SaveEventHandlerMail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOreDictionaryHandler getDictionaryHandler() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Executable → Regular
+101
-95
@@ -61,8 +61,7 @@ public class PluginManager {
|
||||
private static Stage stage = Stage.SETUP;
|
||||
|
||||
public enum Stage {
|
||||
|
||||
SETUP, PRE_INIT, PRE_INIT_DISABLED, INIT, POST_INIT, POST_INIT_DISABLED, FINISHED
|
||||
SETUP, SETUP_DISABLED, PRE_INIT, INIT, POST_INIT, FINISHED
|
||||
}
|
||||
|
||||
public enum Module {
|
||||
@@ -94,8 +93,7 @@ public class PluginManager {
|
||||
HARVESTCRAFT(new PluginHarvestCraft()),
|
||||
MAGICALCROPS(new PluginMagicalCrops()),
|
||||
NATURA(new PluginNatura()),
|
||||
PLANTMEGAPACK(new PluginPlantMegaPack()),
|
||||
UNDERGROUND_BIOMES(new PluginUndergroundBiomes());
|
||||
PLANTMEGAPACK(new PluginPlantMegaPack());
|
||||
|
||||
private final ForestryPlugin instance;
|
||||
private final boolean canBeDisabled;
|
||||
@@ -141,84 +139,6 @@ public class PluginManager {
|
||||
return loadedModules.contains(module);
|
||||
}
|
||||
|
||||
public static void runPreInit() {
|
||||
stage = Stage.SETUP;
|
||||
Locale locale = Locale.getDefault();
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
||||
Configuration config = new Configuration(new File(Forestry.instance.getConfigFolder(), MODULE_CONFIG_FILE_NAME));
|
||||
|
||||
config.load();
|
||||
config.addCustomCategoryComment(CATEGORY_MODULES, "Disabling these modules can greatly change how the mod functions.\n"
|
||||
+ "Your mileage may vary, please report any issues.");
|
||||
|
||||
Set<Module> toLoad = EnumSet.allOf(Module.class);
|
||||
Iterator<Module> it = toLoad.iterator();
|
||||
while (it.hasNext()) {
|
||||
Module m = it.next();
|
||||
if (!m.canBeDisabled()) {
|
||||
continue;
|
||||
}
|
||||
if (!isEnabled(config, m)) {
|
||||
it.remove();
|
||||
Proxies.log.info("Module disabled: {0}", m);
|
||||
continue;
|
||||
}
|
||||
ForestryPlugin plugin = m.instance;
|
||||
if (!plugin.isAvailable()) {
|
||||
it.remove();
|
||||
Proxies.log.info("Module {0} failed to load: {1}", plugin, plugin.getFailMessage());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
boolean changed;
|
||||
do {
|
||||
changed = false;
|
||||
it = toLoad.iterator();
|
||||
while (it.hasNext()) {
|
||||
Module m = it.next();
|
||||
Set<Module> deps = m.instance().getDependancies();
|
||||
if (!toLoad.containsAll(deps)) {
|
||||
it.remove();
|
||||
changed = true;
|
||||
Proxies.log.warning("Module {0} is missing dependencies: {1}", m, deps);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} while (changed);
|
||||
|
||||
unloadedModules.removeAll(toLoad);
|
||||
loadedModules.addAll(toLoad);
|
||||
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
|
||||
Locale.setDefault(locale);
|
||||
|
||||
stage = Stage.PRE_INIT;
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
loadPlugin(plugin);
|
||||
}
|
||||
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Pre-Init Start: {0}", plugin);
|
||||
plugin.preInit();
|
||||
plugin.registerItems();
|
||||
Proxies.log.fine("Pre-Init Complete: {0}", plugin);
|
||||
}
|
||||
|
||||
stage = Stage.PRE_INIT_DISABLED;
|
||||
for (Module m : unloadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Disabled-Pre-Init Start: {0}", plugin);
|
||||
plugin.disabledPreInit();
|
||||
Proxies.log.fine("Disabled-Pre-Init Complete: {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadPlugin(ForestryPlugin plugin) {
|
||||
Proxies.log.fine("Registering Handlers for Plugin: {0}", plugin);
|
||||
|
||||
@@ -258,17 +178,110 @@ public class PluginManager {
|
||||
}
|
||||
}
|
||||
|
||||
private static void configureModules() {
|
||||
Locale locale = Locale.getDefault();
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
|
||||
Configuration config = new Configuration(new File(Forestry.instance.getConfigFolder(), MODULE_CONFIG_FILE_NAME));
|
||||
|
||||
config.load();
|
||||
config.addCustomCategoryComment(CATEGORY_MODULES, "Disabling these modules can greatly change how the mod functions.\n"
|
||||
+ "Your mileage may vary, please report any issues.");
|
||||
|
||||
Set<Module> toLoad = EnumSet.allOf(Module.class);
|
||||
Iterator<Module> it = toLoad.iterator();
|
||||
while (it.hasNext()) {
|
||||
Module m = it.next();
|
||||
if (!m.canBeDisabled()) {
|
||||
continue;
|
||||
}
|
||||
if (!isEnabled(config, m)) {
|
||||
it.remove();
|
||||
Proxies.log.info("Module disabled: {0}", m);
|
||||
continue;
|
||||
}
|
||||
ForestryPlugin plugin = m.instance;
|
||||
if (!plugin.isAvailable()) {
|
||||
it.remove();
|
||||
Proxies.log.info("Module {0} failed to load: {1}", plugin, plugin.getFailMessage());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
boolean changed;
|
||||
do {
|
||||
changed = false;
|
||||
it = toLoad.iterator();
|
||||
while (it.hasNext()) {
|
||||
Module m = it.next();
|
||||
Set<Module> deps = m.instance().getDependancies();
|
||||
if (!toLoad.containsAll(deps)) {
|
||||
it.remove();
|
||||
changed = true;
|
||||
Proxies.log.warning("Module {0} is missing dependencies: {1}", m, deps);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} while (changed);
|
||||
|
||||
unloadedModules.removeAll(toLoad);
|
||||
loadedModules.addAll(toLoad);
|
||||
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
|
||||
Locale.setDefault(locale);
|
||||
}
|
||||
|
||||
public static void runSetup() {
|
||||
stage = Stage.SETUP;
|
||||
configureModules();
|
||||
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Setup Start: {0}", plugin);
|
||||
plugin.setupAPI();
|
||||
Proxies.log.fine("Setup Complete: {0}", plugin);
|
||||
}
|
||||
|
||||
stage = Stage.SETUP_DISABLED;
|
||||
for (Module m : unloadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Disabled-Setup Start: {0}", plugin);
|
||||
plugin.disabledSetupAPI();
|
||||
Proxies.log.fine("Disabled-Setup Complete: {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public static void runPreInit() {
|
||||
stage = Stage.PRE_INIT;
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
loadPlugin(plugin);
|
||||
}
|
||||
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Pre-Init Start: {0}", plugin);
|
||||
plugin.preInit();
|
||||
plugin.registerItems();
|
||||
if (Module.BUILDCRAFT_STATEMENTS.isEnabled()) {
|
||||
plugin.registerTriggers();
|
||||
}
|
||||
if (Module.STORAGE.isEnabled()) {
|
||||
plugin.registerBackpackItems();
|
||||
plugin.registerCrates();
|
||||
}
|
||||
Proxies.log.fine("Pre-Init Complete: {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public static void runInit() {
|
||||
stage = Stage.INIT;
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Init Start: {0}", plugin);
|
||||
|
||||
if (Module.STORAGE.isEnabled()) {
|
||||
plugin.registerBackpackItems();
|
||||
plugin.registerCrates();
|
||||
}
|
||||
|
||||
plugin.doInit();
|
||||
plugin.registerRecipes();
|
||||
Proxies.log.fine("Init Complete: {0}", plugin);
|
||||
@@ -284,13 +297,6 @@ public class PluginManager {
|
||||
Proxies.log.fine("Post-Init Complete: {0}", plugin);
|
||||
}
|
||||
|
||||
stage = Stage.POST_INIT_DISABLED;
|
||||
for (Module m : unloadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Disabled-Post-Init Start: {0}", plugin);
|
||||
plugin.disabledPostInit();
|
||||
Proxies.log.fine("Disabled-Post-Init Complete: {0}", plugin);
|
||||
}
|
||||
stage = Stage.FINISHED;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ public class PluginNatura extends ForestryPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doInit() {
|
||||
super.doInit();
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
logNatura = GameRegistry.findBlock(NATURA, "tree");
|
||||
logWillow = GameRegistry.findBlock(NATURA, "willow");
|
||||
@@ -103,44 +103,93 @@ public class PluginNatura extends ForestryPlugin {
|
||||
berryBlack = GameRegistry.findItemStack(NATURA, "berryBlack", 1);
|
||||
berryMalo = GameRegistry.findItemStack(NATURA, "berryMalo", 1);
|
||||
itemBarley = GameRegistry.findItemStack(NATURA, "barleyFood", 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerCrates() {
|
||||
super.registerCrates();
|
||||
|
||||
ICrateRegistry crateRegistry = StorageManager.crateRegistry;
|
||||
crateRegistry.registerCrate(berryBlight, "cratedNaturaBerryBlight");
|
||||
crateRegistry.registerCrate(berryDusk, "cratedNaturaBerryDusk");
|
||||
crateRegistry.registerCrate(berrySky, "cratedNaturaBerrySky");
|
||||
crateRegistry.registerCrate(berrySting, "cratedNaturaBerrySting");
|
||||
crateRegistry.registerCrate(berryRasp, "cratedNaturaBerryRasp");
|
||||
crateRegistry.registerCrate(berryBlue, "cratedNaturaBerryBlue");
|
||||
crateRegistry.registerCrate(berryBlack, "cratedNaturaBerryBlack");
|
||||
crateRegistry.registerCrate(berryMalo, "cratedNaturaBerryMalo");
|
||||
crateRegistry.registerCrate(itemBarley, "cratedNaturaBarley");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 0), "cratedNaturaSaplingRedwood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 1), "cratedNaturaSaplingEucalyptus");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 2), "cratedNaturaSaplingHopseed");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 3), "cratedNaturaSaplingSakura");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 4), "cratedNaturaSaplingGhostwood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 5), "cratedNaturaSaplingBlood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 6), "cratedNaturaSaplingDarkwood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 7), "cratedNaturaSaplingFusewood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 0), "cratedNaturaSaplingMaple");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 1), "cratedNaturaSaplingSilverbell");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 2), "cratedNaturaSaplingPurpleheart");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 3), "cratedNaturaSaplingTiger");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 4), "cratedNaturaSaplingWillow");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "Natura.netherfood"), 1, 0), "cratedNaturaPotashApple");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "Glowshroom"), 1, 0), "cratedNaturaGreenGlowshroom");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "Glowshroom"), 1, 1), "cratedNaturaPurpleGlowshroom");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "Glowshroom"), 1, 2), "cratedNaturaBlueGlowshroom");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 0), "cratedNaturaLogEucalyptus");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 1), "cratedNaturaLogSakura");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 2), "cratedNaturaLogGhostwood");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 3), "cratedNaturaLogHopseed");
|
||||
crateRegistry.registerCrate(new ItemStack(logWillow, 1, 0), "cratedNaturaLogWillow");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "bloodwood"), 1, 0), "cratedNaturaLogBloodwood");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "Dark Tree"), 1, 0), "cratedNaturaLogDarkwood");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "Dark Tree"), 1, 1), "cratedNaturaLogFusewood");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "heatsand"), 1, 0), "cratedNaturaBlockHeatsand");
|
||||
crateRegistry.registerCrate(new ItemStack(GameRegistry.findItem(NATURA, "soil.tainted"), 1, 0), "cratedNaturaBlockTainted");
|
||||
|
||||
if (berryBlight != null) {
|
||||
crateRegistry.registerCrate(berryBlight, "cratedNaturaBerryBlight");
|
||||
}
|
||||
if (berryDusk != null) {
|
||||
crateRegistry.registerCrate(berryDusk, "cratedNaturaBerryDusk");
|
||||
}
|
||||
if (berrySky != null) {
|
||||
crateRegistry.registerCrate(berrySky, "cratedNaturaBerrySky");
|
||||
}
|
||||
if (berrySting != null) {
|
||||
crateRegistry.registerCrate(berrySting, "cratedNaturaBerrySting");
|
||||
}
|
||||
if (berryRasp != null) {
|
||||
crateRegistry.registerCrate(berryRasp, "cratedNaturaBerryRasp");
|
||||
}
|
||||
if (berryBlue != null) {
|
||||
crateRegistry.registerCrate(berryBlue, "cratedNaturaBerryBlue");
|
||||
}
|
||||
if (berryBlack != null) {
|
||||
crateRegistry.registerCrate(berryBlack, "cratedNaturaBerryBlack");
|
||||
}
|
||||
if (berryMalo != null) {
|
||||
crateRegistry.registerCrate(berryMalo, "cratedNaturaBerryMalo");
|
||||
}
|
||||
if (itemBarley != null) {
|
||||
crateRegistry.registerCrate(itemBarley, "cratedNaturaBarley");
|
||||
}
|
||||
if (saplingNatura != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 0), "cratedNaturaSaplingRedwood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 1), "cratedNaturaSaplingEucalyptus");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 2), "cratedNaturaSaplingHopseed");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 3), "cratedNaturaSaplingSakura");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 4), "cratedNaturaSaplingGhostwood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 5), "cratedNaturaSaplingBlood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 6), "cratedNaturaSaplingDarkwood");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNatura, 1, 7), "cratedNaturaSaplingFusewood");
|
||||
}
|
||||
|
||||
if (saplingNaturaRare != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 0), "cratedNaturaSaplingMaple");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 1), "cratedNaturaSaplingSilverbell");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 2), "cratedNaturaSaplingPurpleheart");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 3), "cratedNaturaSaplingTiger");
|
||||
crateRegistry.registerCrate(new ItemStack(saplingNaturaRare, 1, 4), "cratedNaturaSaplingWillow");
|
||||
}
|
||||
Item potashApple = GameRegistry.findItem(NATURA, "Natura.netherfood");
|
||||
if (potashApple != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(potashApple, 1, 0), "cratedNaturaPotashApple");
|
||||
}
|
||||
Item glowShroom = GameRegistry.findItem(NATURA, "Glowshroom");
|
||||
if (glowShroom != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(glowShroom, 1, 0), "cratedNaturaGreenGlowshroom");
|
||||
crateRegistry.registerCrate(new ItemStack(glowShroom, 1, 1), "cratedNaturaPurpleGlowshroom");
|
||||
crateRegistry.registerCrate(new ItemStack(glowShroom, 1, 2), "cratedNaturaBlueGlowshroom");
|
||||
}
|
||||
if (logNatura != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 0), "cratedNaturaLogEucalyptus");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 1), "cratedNaturaLogSakura");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 2), "cratedNaturaLogGhostwood");
|
||||
crateRegistry.registerCrate(new ItemStack(logNatura, 1, 3), "cratedNaturaLogHopseed");
|
||||
crateRegistry.registerCrate(new ItemStack(logWillow, 1, 0), "cratedNaturaLogWillow");
|
||||
}
|
||||
Item bloodWood = GameRegistry.findItem(NATURA, "bloodwood");
|
||||
if (bloodWood != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(bloodWood, 1, 0), "cratedNaturaLogBloodwood");
|
||||
}
|
||||
Item darkTree = GameRegistry.findItem(NATURA, "Dark Tree");
|
||||
if (darkTree != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(darkTree, 1, 0), "cratedNaturaLogDarkwood");
|
||||
crateRegistry.registerCrate(new ItemStack(darkTree, 1, 1), "cratedNaturaLogFusewood");
|
||||
}
|
||||
Item heatSand = GameRegistry.findItem(NATURA, "heatsand");
|
||||
if (heatSand != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(heatSand, 1, 0), "cratedNaturaBlockHeatsand");
|
||||
}
|
||||
Item taintedSoil = GameRegistry.findItem(NATURA, "soil.tainted");
|
||||
if (taintedSoil != null) {
|
||||
crateRegistry.registerCrate(new ItemStack(taintedSoil, 1, 0), "cratedNaturaBlockTainted");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -204,9 +253,10 @@ public class PluginNatura extends ForestryPlugin {
|
||||
|
||||
if (itemBarley != null) {
|
||||
RecipeUtil.injectLeveledRecipe(itemBarley, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
}
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat"), " X ", "X#X", " X ", '#', Blocks.dirt, 'X', itemBarley);
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat").stackSize > 0) {
|
||||
ItemStack compostWheat = GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat");
|
||||
Proxies.common.addRecipe(compostWheat, " X ", "X#X", " X ", '#', Blocks.dirt, 'X', itemBarley);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
@@ -96,7 +97,11 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void preInit() {
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
StorageManager.crateRegistry = new CrateRegistry();
|
||||
|
||||
BackpackManager.backpackInterface = new BackpackHelper();
|
||||
|
||||
BackpackManager.backpackItems = new ArrayList[6];
|
||||
@@ -108,7 +113,35 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
BackpackManager.backpackItems[4] = adventurerItems;
|
||||
BackpackManager.backpackItems[5] = builderItems;
|
||||
|
||||
StorageManager.crateRegistry = new CrateRegistry();
|
||||
BackpackDefinition definition;
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
definition = new BackpackDefinitionApiarist("apiarist", new Color(0xc4923d).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
}
|
||||
|
||||
if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) {
|
||||
definition = new BackpackDefinitionLepidopterist("lepidopterist", new Color(0x995b31).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
}
|
||||
|
||||
definition = new BackpackDefinition("miner", new Color(0x36187d).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
|
||||
definition = new BackpackDefinition("digger", new Color(0x363cc5).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
|
||||
definition = new BackpackDefinition("forester", new Color(0x347427).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
|
||||
definition = new BackpackDefinition("hunter", new Color(0x412215).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
|
||||
definition = new BackpackDefinition("adventurer", new Color(0x7fb8c2).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
|
||||
definition = new BackpackDefinition("builder", new Color(0xdd3a3a).getRGB());
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,7 +180,7 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
}
|
||||
|
||||
public static void registerCrate(ItemCrated crate) {
|
||||
proxy.registerCrate(crate);
|
||||
proxy.registerCrateForRendering(crate);
|
||||
crates.add(crate);
|
||||
}
|
||||
|
||||
@@ -274,47 +307,41 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
ForestryItem.crate.registerItem((new ItemCrated(null, false)), "crate");
|
||||
|
||||
// BACKPACKS
|
||||
BackpackDefinition definition;
|
||||
IBackpackDefinition definition;
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
definition = new BackpackDefinitionApiarist("apiarist", 0xc4923d);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
ForestryItem.apiaristBackpack.registerItem(new ItemNaturalistBackpack(GuiId.ApiaristBackpackGUI.ordinal(), definition).setCreativeTab(Tabs.tabApiculture), "apiaristBag");
|
||||
definition = BackpackManager.definitions.get("apiarist");
|
||||
Item backpack = new ItemNaturalistBackpack(GuiId.ApiaristBackpackGUI.ordinal(), definition).setCreativeTab(Tabs.tabApiculture);
|
||||
ForestryItem.apiaristBackpack.registerItem(backpack, "apiaristBag");
|
||||
}
|
||||
|
||||
if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) {
|
||||
definition = new BackpackDefinitionLepidopterist("lepidopterist", 0x995b31);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
ForestryItem.lepidopteristBackpack.registerItem(new ItemNaturalistBackpack(GuiId.LepidopteristBackpackGUI.ordinal(), definition).setCreativeTab(Tabs.tabLepidopterology), "lepidopteristBag");
|
||||
definition = BackpackManager.definitions.get("lepidopterist");
|
||||
Item backpack = new ItemNaturalistBackpack(GuiId.LepidopteristBackpackGUI.ordinal(), definition).setCreativeTab(Tabs.tabLepidopterology);
|
||||
ForestryItem.lepidopteristBackpack.registerItem(backpack, "lepidopteristBag");
|
||||
}
|
||||
|
||||
definition = new BackpackDefinition("miner", 0x36187d);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
definition = BackpackManager.definitions.get("miner");
|
||||
ForestryItem.minerBackpack.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T1), "minerBag");
|
||||
ForestryItem.minerBackpackT2.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T2), "minerBagT2");
|
||||
|
||||
definition = new BackpackDefinition("digger", 0x363cc5);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
definition = BackpackManager.definitions.get("digger");
|
||||
ForestryItem.diggerBackpack.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T1), "diggerBag");
|
||||
ForestryItem.diggerBackpackT2.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T2), "diggerBagT2");
|
||||
|
||||
definition = new BackpackDefinition("forester", 0x347427);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
definition = BackpackManager.definitions.get("forester");
|
||||
ForestryItem.foresterBackpack.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T1), "foresterBag");
|
||||
ForestryItem.foresterBackpackT2.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T2), "foresterBagT2");
|
||||
|
||||
definition = new BackpackDefinition("hunter", 0x412215);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
definition = BackpackManager.definitions.get("hunter");
|
||||
ForestryItem.hunterBackpack.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T1), "hunterBag");
|
||||
ForestryItem.hunterBackpackT2.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T2), "hunterBagT2");
|
||||
|
||||
definition = new BackpackDefinition("adventurer", 0x7fb8c2);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
definition = BackpackManager.definitions.get("adventurer");
|
||||
ForestryItem.adventurerBackpack.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T1), "adventurerBag");
|
||||
ForestryItem.adventurerBackpackT2.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T2), "adventurerBagT2");
|
||||
|
||||
definition = new BackpackDefinition("builder", 0xdd3a3a);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
definition = BackpackManager.definitions.get("builder");
|
||||
ForestryItem.builderBackpack.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T1), "builderBag");
|
||||
ForestryItem.builderBackpackT2.registerItem(BackpackManager.backpackInterface.addBackpack(definition, EnumBackpackType.T2), "builderBagT2");
|
||||
}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* 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.plugins;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
import exterminatorJeff.undergroundBiomes.api.UBAPIHook;
|
||||
import exterminatorJeff.undergroundBiomes.api.UBOreTexturizer;
|
||||
|
||||
@Plugin(pluginID = "UndergroundBiomes", name = "UndergroundBiomes", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.undergroundBiomes.description")
|
||||
public class PluginUndergroundBiomes extends ForestryPlugin {
|
||||
|
||||
public boolean isAvailable() {
|
||||
return Proxies.common.isModLoaded("UndergroundBiomes");
|
||||
}
|
||||
|
||||
public String getFailMessage() {
|
||||
return "UndergroundBiomes is not found.";
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "UndergroundBiomes")
|
||||
@Override
|
||||
protected void preInit() {
|
||||
registerBlock(0, "apatite");
|
||||
registerBlock(1, "copper");
|
||||
registerBlock(2, "tin");
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "UndergroundBiomes")
|
||||
private void registerBlock(int meta, String textureName) {
|
||||
try {
|
||||
String blockName = ForestryBlock.resources.getItemStack(1, meta).getUnlocalizedName();
|
||||
UBAPIHook.ubAPIHook.ubOreTexturizer.requestUBOreSetup(ForestryBlock.resources.block(), meta, "forestry:ores/" + textureName + "_overlay", blockName);
|
||||
} catch (UBOreTexturizer.BlocksAreAlreadySet exception) {
|
||||
Proxies.log.severe(exception.toString());
|
||||
} catch (Throwable throwable) {
|
||||
Proxies.log.severe("Underground Biomes crashed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,17 +22,15 @@ import forestry.plugins.PluginStorage;
|
||||
|
||||
public class CrateRegistry implements ICrateRegistry {
|
||||
|
||||
private void registerCrate(ItemStack stack, String uid, boolean useOreDict) {
|
||||
if (PluginManager.getStage() != PluginManager.Stage.INIT) {
|
||||
throw new RuntimeException("Tried to make a crate outside of Init");
|
||||
}
|
||||
|
||||
private static void registerCrate(ItemStack stack, String uid, boolean useOreDict) {
|
||||
if (stack == null || stack.getItem() == null) {
|
||||
throw new RuntimeException("Tried to make a crate without an item");
|
||||
Proxies.log.severe("Tried to make a crate without an item");
|
||||
return;
|
||||
}
|
||||
|
||||
if (uid == null) {
|
||||
throw new RuntimeException("Tried to make a crate without a uid");
|
||||
Proxies.log.severe("Tried to make a crate without a uid");
|
||||
return;
|
||||
}
|
||||
|
||||
ItemCrated crate = new ItemCrated(stack, useOreDict);
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
import forestry.api.storage.IBackpackDefinition;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
import forestry.plugins.PluginLepidopterology;
|
||||
import forestry.storage.BackpackDefinition;
|
||||
@@ -47,7 +48,7 @@ public class ItemNaturalistBackpack extends ItemBackpack {
|
||||
|
||||
private final int guiId;
|
||||
|
||||
public ItemNaturalistBackpack(int guiId, BackpackDefinition definition) {
|
||||
public ItemNaturalistBackpack(int guiId, IBackpackDefinition definition) {
|
||||
super(definition, EnumBackpackType.APIARIST);
|
||||
this.guiId = guiId;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class ClientProxyStorage extends ProxyStorage {
|
||||
private static final CrateRenderingHandler crateRenderer = new CrateRenderingHandler();
|
||||
|
||||
@Override
|
||||
public void registerCrate(ItemCrated crate) {
|
||||
public void registerCrateForRendering(ItemCrated crate) {
|
||||
MinecraftForgeClient.registerItemRenderer(crate, crateRenderer);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import forestry.core.items.ItemCrated;
|
||||
|
||||
public class ProxyStorage {
|
||||
|
||||
public void registerCrate(ItemCrated crate) {
|
||||
public void registerCrateForRendering(ItemCrated crate) {
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Reference in new issue
Block a user