mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 01:24:59 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b5eafc42a | ||
|
|
59ca1d2082 | ||
|
|
0df88973c0 | ||
|
|
e54bb5d4ea | ||
|
|
824f155804 | ||
|
|
24e2cf668e | ||
|
|
f260099bfa | ||
|
|
855d359b02 | ||
|
|
abcb180689 | ||
|
|
507adb1b3f | ||
|
|
23c4e4ed91 | ||
|
|
e5057788a8 | ||
|
|
a5045bfc0f | ||
|
|
bfd678c63e | ||
|
|
320ea99090 | ||
|
|
08f16ba26d | ||
|
|
9419dc82de | ||
|
|
2d1f64c5f6 | ||
|
|
cd9f82001c | ||
|
|
f7b8435d28 | ||
|
|
013806f158 | ||
|
|
062b5ee75f | ||
|
|
56adc25fdf | ||
|
|
df375b1b30 | ||
|
|
789da29af0 | ||
|
|
e0df2f84a0 | ||
|
|
01656f13a6 |
No files matched your search
+1
-1
@@ -3,7 +3,7 @@
|
||||
url = https://github.com/ForestryMC/Forestry-Localization.git
|
||||
[submodule "api/redstoneflux"]
|
||||
path = api/redstoneflux
|
||||
url = https://github.com/CoFH/RedstoneFlux-API.git
|
||||
url = https://github.com/Texasjake95/RedstoneFlux-API.git
|
||||
[submodule "api/forestry"]
|
||||
path = api/forestry
|
||||
url = https://github.com/ForestryMC/ForestryAPI.git
|
||||
+1
-1
Submodule api/redstoneflux updated: 10e10af214...b5771e4ef8.
+13
-11
@@ -35,8 +35,10 @@ ext.apiForestry = "./api/forestry"
|
||||
ext.apiRedstoneFlux = "./api/redstoneflux"
|
||||
|
||||
// java version
|
||||
sourceCompatibility = 1.7
|
||||
targetCompatibility = 1.7
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
minecraft {
|
||||
version = mcversion + "-" + forgeversion
|
||||
@@ -82,8 +84,8 @@ repositories {
|
||||
configurations {
|
||||
api
|
||||
compile.extendsFrom api
|
||||
shade
|
||||
compile.extendsFrom shade
|
||||
//shade
|
||||
//compile.extendsFrom shade
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -99,7 +101,7 @@ dependencies {
|
||||
compile "codechicken:NotEnoughItems:1.7.10-1.0.5.111:src"
|
||||
|
||||
// http://maven.tterrag.com/
|
||||
shade "chylex.javacheck:JavaChecker:v1.2-b1"
|
||||
//shade "chylex.javacheck:JavaChecker:v1.2-b1"
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
@@ -158,11 +160,11 @@ jar {
|
||||
from "./src/main/java/invtweaks/LICENSE.txt"
|
||||
}
|
||||
|
||||
configurations.shade.each{ dep ->
|
||||
from(project.zipTree(dep)){
|
||||
exclude 'META-INF', 'META-INF/**', 'mcmod.info'
|
||||
}
|
||||
}
|
||||
//configurations.shade.each{ dep ->
|
||||
// from(project.zipTree(dep)){
|
||||
// exclude 'META-INF', 'META-INF/**', 'mcmod.info'
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
task mainJar(type: Jar, dependsOn: 'reobf') {
|
||||
@@ -177,7 +179,7 @@ task mainJar(type: Jar, dependsOn: 'reobf') {
|
||||
includeEmptyDirs = false
|
||||
|
||||
manifest{
|
||||
attributes 'TweakClass': 'forestry.shade.javacheck.Java7Checker'
|
||||
//attributes 'TweakClass': 'forestry.shade.javacheck.Java7Checker'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
mcversion=1.7.10
|
||||
forgeversion=10.13.4.1566-1.7.10
|
||||
forgeversion=10.13.4.1614-1.7.10
|
||||
version_major=4
|
||||
version_minor=2
|
||||
version_patch=12
|
||||
version_patch=20
|
||||
+1
-1
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
|
||||
+1
-1
Submodule lang updated: b5ac4e0d6c...4cfdcf1595.
@@ -116,9 +116,13 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
|
||||
hasFlowersCache.writeToNBT(nbttagcompound);
|
||||
|
||||
Stack<ItemStack> spawnCopy = new Stack<>();
|
||||
spawnCopy.addAll(spawn);
|
||||
if (spawn.size()<128)
|
||||
spawnCopy.addAll(spawn);
|
||||
else
|
||||
for (byte b=0;b<128;++b)
|
||||
spawnCopy.add(spawn.get(b));
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
while (!spawnCopy.isEmpty()) {
|
||||
while (!spawnCopy.isEmpty() && spawnCopy.size()<=128) {
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
spawnCopy.pop().writeToNBT(nbttagcompound1);
|
||||
nbttaglist.appendTag(nbttagcompound1);
|
||||
|
||||
@@ -283,7 +283,7 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
|
||||
// / Check for the sky, except if in hell
|
||||
if (biome != null && !BiomeHelper.isBiomeHellish(biome)) {
|
||||
if (!world.provider.hasNoSky) {
|
||||
if (!housing.canBlockSeeTheSky() && !canWorkUnderground(beeModifier)) {
|
||||
errorStates.add(EnumErrorCode.NO_SKY);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.apiculture.genetics;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -33,9 +34,17 @@ public class JubilanceRequiresResource implements IJubilanceProvider {
|
||||
public boolean isJubilant(IAlleleBeeSpecies species, IBeeGenome genome, IBeeHousing housing) {
|
||||
World world = housing.getWorld();
|
||||
ChunkCoordinates housingCoords = housing.getCoordinates();
|
||||
Block block;
|
||||
TileEntity tile;
|
||||
int meta;
|
||||
int i = 1;
|
||||
do {
|
||||
block = world.getBlock(housingCoords.posX, housingCoords.posY - i, housingCoords.posZ);
|
||||
meta = world.getBlockMetadata(housingCoords.posX, housingCoords.posY - i, housingCoords.posZ);
|
||||
tile = world.getTileEntity(housingCoords.posX, housingCoords.posY - i, housingCoords.posZ);
|
||||
i++;
|
||||
} while (tile instanceof IBeeHousing);
|
||||
|
||||
Block block = world.getBlock(housingCoords.posX, housingCoords.posY - 1, housingCoords.posZ);
|
||||
int meta = world.getBlockMetadata(housingCoords.posX, housingCoords.posY - 1, housingCoords.posZ);
|
||||
return ItemStackUtil.equals(block, meta, blockRequired);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import forestry.api.core.BiomeHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -53,7 +54,6 @@ public class AlvearyController extends RectangularMultiblockControllerBase imple
|
||||
private final InventoryBeeHousing inventory;
|
||||
private final IBeekeepingLogic beekeepingLogic;
|
||||
|
||||
private BiomeGenBase cachedBiome;
|
||||
private float tempChange = 0.0f;
|
||||
private float humidChange = 0.0f;
|
||||
|
||||
@@ -290,7 +290,6 @@ public class AlvearyController extends RectangularMultiblockControllerBase imple
|
||||
|
||||
data.setFloat("TempChange", tempChange);
|
||||
data.setFloat("HumidChange", humidChange);
|
||||
|
||||
beekeepingLogic.writeToNBT(data);
|
||||
inventory.writeToNBT(data);
|
||||
}
|
||||
@@ -359,8 +358,11 @@ public class AlvearyController extends RectangularMultiblockControllerBase imple
|
||||
@Override
|
||||
public EnumTemperature getTemperature() {
|
||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(this);
|
||||
if (beeModifier.isHellish() && tempChange >= 0) {
|
||||
return EnumTemperature.HELLISH;
|
||||
BiomeGenBase biome = getBiome();
|
||||
if (beeModifier.isHellish() || BiomeHelper.isBiomeHellish(biome)) {
|
||||
if (tempChange >= 0) {
|
||||
return EnumTemperature.HELLISH;
|
||||
}
|
||||
}
|
||||
|
||||
return EnumTemperature.getFromValue(getExactTemperature());
|
||||
@@ -383,11 +385,8 @@ public class AlvearyController extends RectangularMultiblockControllerBase imple
|
||||
|
||||
@Override
|
||||
public BiomeGenBase getBiome() {
|
||||
if (cachedBiome == null) {
|
||||
ChunkCoordinates coords = getReferenceCoord();
|
||||
cachedBiome = worldObj.getBiomeGenForCoords(coords.posX, coords.posZ);
|
||||
}
|
||||
return cachedBiome;
|
||||
ChunkCoordinates coords = getReferenceCoord();
|
||||
return worldObj.getBiomeGenForCoords(coords.posX, coords.posZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,7 +35,6 @@ import forestry.core.tiles.TileBase;
|
||||
|
||||
public abstract class TileBeeHousingBase extends TileBase implements IBeeHousing, IClimatised, IGuiBeeHousingInventory, IStreamableGui {
|
||||
private final IBeekeepingLogic beeLogic;
|
||||
private BiomeGenBase cachedBiome;
|
||||
|
||||
// CLIENT
|
||||
private int breedingProgressPercent = 0;
|
||||
@@ -142,10 +141,7 @@ public abstract class TileBeeHousingBase extends TileBase implements IBeeHousing
|
||||
// / IBEEHOUSING
|
||||
@Override
|
||||
public BiomeGenBase getBiome() {
|
||||
if (cachedBiome == null) {
|
||||
cachedBiome = worldObj.getBiomeGenForCoordsBody(xCoord, zCoord);
|
||||
}
|
||||
return cachedBiome;
|
||||
return worldObj.getBiomeGenForCoordsBody(xCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import forestry.api.arboriculture.EnumFruitFamily;
|
||||
@@ -458,7 +459,7 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
|
||||
|
||||
@Override
|
||||
protected void registerMutations() {
|
||||
// only available by rare villager trade
|
||||
registerMutation(Sequioa,Baobab,1).requireNight().restrictBiomeType(BiomeDictionary.Type.FOREST);
|
||||
}
|
||||
},
|
||||
Jungle(TreeBranchDefinition.TROPICAL, "jungle", "tectona", false, EnumLeafType.JUNGLE, new Color(4764952), new Color(0x658917), 3, new ItemStack(Blocks.log, 1, 3)) {
|
||||
|
||||
@@ -184,17 +184,13 @@ public class ItemGermlingGE extends ItemGE implements IVariableFermentable {
|
||||
|
||||
ICheckPollinatable checkPollinatable = GeneticsUtil.getCheckPollinatable(world, x, y, z);
|
||||
|
||||
if (checkPollinatable == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!checkPollinatable.canMateWith(tree)) {
|
||||
if (checkPollinatable == null || !checkPollinatable.canMateWith(tree)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IPollinatable pollinatable = GeneticsUtil.getOrCreatePollinatable(player.getGameProfile(), world, x, y, z);
|
||||
|
||||
if (!pollinatable.canMateWith(tree)) {
|
||||
if (pollinatable == null || !pollinatable.canMateWith(tree)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -12,6 +12,7 @@ package forestry.core.genetics.mutations;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
@@ -32,13 +33,15 @@ public class MutationConditionRequiresResource implements IMutationCondition {
|
||||
@Override
|
||||
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
|
||||
Block block;
|
||||
TileEntity tile;
|
||||
int meta;
|
||||
int i = 1;
|
||||
do {
|
||||
block = world.getBlock(x, y - i, z);
|
||||
meta = world.getBlockMetadata(x, y - i, z);
|
||||
tile = world.getTileEntity(x, y - i, z);
|
||||
i++;
|
||||
} while (block instanceof IBeeHousing);
|
||||
} while (tile instanceof IBeeHousing);
|
||||
|
||||
return ItemStackUtil.equals(block, meta, blockRequired) ? 1 : 0;
|
||||
}
|
||||
|
||||
+4
-1
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -44,12 +45,14 @@ public class MutationConditionRequiresResourceOreDict implements IMutationCondit
|
||||
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
|
||||
Block block;
|
||||
int meta;
|
||||
TileEntity tile;
|
||||
int i = 1;
|
||||
do {
|
||||
block = world.getBlock(x, y - i, z);
|
||||
meta = world.getBlockMetadata(x, y - i, z);
|
||||
tile = world.getTileEntity(x, y-i, z);
|
||||
i++;
|
||||
} while (block instanceof IBeeHousing);
|
||||
} while (tile instanceof IBeeHousing);
|
||||
|
||||
int[] oreIds = OreDictionary.getOreIDs(new ItemStack(block, 1, meta));
|
||||
for (int oreId : oreIds) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SlotWorking extends SlotForestry {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getHasStack() {
|
||||
public boolean canTakeStack(EntityPlayer stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,13 @@ public abstract class ItemStackUtil {
|
||||
* Counts how many full sets are contained in the passed stock
|
||||
*/
|
||||
public static int containsSets(ItemStack[] set, ItemStack[] stock, boolean oreDictionary, boolean craftingTools) {
|
||||
return containsSets(set, stock, oreDictionary, craftingTools, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts how many full sets are contained in the passed stock
|
||||
*/
|
||||
public static int containsSets(ItemStack[] set, ItemStack[] stock, boolean oreDictionary, boolean craftingTools, boolean matchTags) {
|
||||
int totalSets = 0;
|
||||
|
||||
ItemStack[] condensedRequired = ItemStackUtil.condenseStacks(set);
|
||||
@@ -150,7 +157,7 @@ public abstract class ItemStackUtil {
|
||||
|
||||
int reqCount = 0;
|
||||
for (ItemStack offer : condensedOffered) {
|
||||
if (isCraftingEquivalent(req, offer, oreDictionary, craftingTools)) {
|
||||
if (isCraftingEquivalent(req, offer, oreDictionary, craftingTools) && (matchTags ? ItemStack.areItemStackTagsEqual(req, offer) : true)) {
|
||||
int stackCount = (int) Math.floor(offer.stackSize / req.stackSize);
|
||||
reqCount = Math.max(reqCount, stackCount);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.farming.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -47,6 +48,7 @@ public class CropBasicAgriCraft extends Crop {
|
||||
harvest.remove(0);
|
||||
Proxies.common.addBlockDestroyEffects(world, pos.x, pos.y, pos.z, Blocks.melon_block, 0);
|
||||
world.setBlockMetadataWithNotify(pos.x, pos.y, pos.z, 0, Constants.FLAG_BLOCK_SYNCH);
|
||||
harvest.removeAll(Collections.singleton(null)); //sanatize nulls that get thru from Agricraft+Harvestcraft (sesameseed)
|
||||
return harvest;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,10 @@ public class InventoryFarm extends InventoryAdapterRestricted implements IFarmIn
|
||||
|
||||
public void stowHarvest(Iterable<ItemStack> harvested, Stack<ItemStack> pendingProduce) {
|
||||
for (ItemStack harvest : harvested) {
|
||||
|
||||
if (harvest == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (acceptsAsGermling(harvest)) {
|
||||
harvest.stackSize -= InventoryUtil.addStack(germlingsInventory, harvest, true);
|
||||
}
|
||||
@@ -253,4 +256,4 @@ public class InventoryFarm extends InventoryAdapterRestricted implements IFarmIn
|
||||
decrStackSize(SLOT_FERTILIZER, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve
|
||||
return EnumStationState.INSUFFICIENT_PAPER;
|
||||
}
|
||||
|
||||
int ordersToFillCount = ItemStackUtil.containsSets(InventoryUtil.getStacks(inventory, SLOT_EXCHANGE_1, SLOT_EXCHANGE_COUNT), letter.getAttachments());
|
||||
int ordersToFillCount = ItemStackUtil.containsSets(InventoryUtil.getStacks(inventory, SLOT_EXCHANGE_1, SLOT_EXCHANGE_COUNT), letter.getAttachments(), false, false, true);
|
||||
|
||||
// Not a single match.
|
||||
if (ordersToFillCount <= 0) {
|
||||
@@ -523,6 +523,9 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve
|
||||
if (!pol.isItemEqual(req)) {
|
||||
continue;
|
||||
}
|
||||
if (!ItemStack.areItemStackTagsEqual(req, pol)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (req.stackSize >= pol.stackSize) {
|
||||
req.stackSize -= pol.stackSize;
|
||||
|
||||
@@ -258,15 +258,14 @@ public class PluginFactory extends ForestryPlugin {
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
ItemRegistryApiculture beeItems = PluginApiculture.items;
|
||||
FluidStack liquidGlass = Fluids.GLASS.getFluid(Constants.BUCKET_VOLUME);
|
||||
FluidStack liquidGlassX4 = Fluids.GLASS.getFluid(Constants.BUCKET_VOLUME * 4);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlass, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{
|
||||
RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlassX4, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{
|
||||
"#", "X",
|
||||
'#', dyes[i],
|
||||
'X', beeItems.propolis.getWildcard()});
|
||||
}
|
||||
RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlassX4, new ItemStack(Blocks.glass, 1, 0), new Object[]{
|
||||
RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlassX4, new ItemStack(Blocks.glass, 4, 0), new Object[]{
|
||||
"#", "X",
|
||||
'X', beeItems.propolis.getWildcard()});
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ import forestry.plugins.compat.PluginHarvestCraft;
|
||||
import forestry.plugins.compat.PluginIC2;
|
||||
import forestry.plugins.compat.PluginImmersiveEngineering;
|
||||
import forestry.plugins.compat.PluginMagicalCrops;
|
||||
import forestry.plugins.compat.PluginMineFactoryReloaded;
|
||||
import forestry.plugins.compat.PluginNatura;
|
||||
import forestry.plugins.compat.PluginPlantMegaPack;
|
||||
import forestry.plugins.compat.PluginRotaryCraft;
|
||||
@@ -115,6 +116,7 @@ public class PluginManager {
|
||||
IMMERSIVEENGINEERING(new PluginImmersiveEngineering()),
|
||||
INDUSTRIALCRAFT(new PluginIC2()),
|
||||
MAGICALCROPS(new PluginMagicalCrops()),
|
||||
MINEFACTORYRELOADED(new PluginMineFactoryReloaded()),
|
||||
NATURA(new PluginNatura()),
|
||||
PLANTMEGAPACK(new PluginPlantMegaPack()),
|
||||
ROTARYCRAFT(new PluginRotaryCraft()),
|
||||
|
||||
@@ -89,7 +89,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
"persimmon",
|
||||
"avocado",
|
||||
"coconut",
|
||||
"durian"
|
||||
"durian",
|
||||
"gooseberry"
|
||||
);
|
||||
|
||||
ImmutableList<String> trees = ImmutableList.of(
|
||||
@@ -112,7 +113,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
|
||||
ImmutableList<String> spices = ImmutableList.of(
|
||||
"ginger",
|
||||
"spiceleaf"
|
||||
"spiceleaf",
|
||||
"curryleaf"
|
||||
//"mustardseed" Mustard is inconsistent and annoying.
|
||||
);
|
||||
|
||||
@@ -149,7 +151,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
"wintersquash",
|
||||
"zucchini",
|
||||
"bambooshoot",
|
||||
"spinach"
|
||||
"spinach",
|
||||
"waterchestnut"
|
||||
);
|
||||
|
||||
ImmutableList<String> grains = ImmutableList.of(
|
||||
@@ -159,7 +162,8 @@ public class PluginHarvestCraft extends ForestryPlugin {
|
||||
);
|
||||
|
||||
ImmutableList<String> cropNuts = ImmutableList.of(
|
||||
"peanut"
|
||||
"peanut",
|
||||
"sesameseeds"
|
||||
);
|
||||
|
||||
ImmutableList<String> nuts = ImmutableList.of(
|
||||
|
||||
@@ -400,7 +400,13 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
public ArrayList<ItemStack> getCropDrops(TileEntity tileEntity) {
|
||||
if (isIC2Crop(tileEntity)) {
|
||||
ICropTile crop = (ICropTile)tileEntity;
|
||||
ItemStack[] cropDrops = crop.harvest_automated(true);
|
||||
if (crop == null || crop.getCrop() == null)
|
||||
return null;
|
||||
ItemStack[] cropDrops;
|
||||
if ((crop.getCrop().canGrow(crop) && crop.getSize() < crop.getCrop().getOptimalHavestSize(crop)) || crop.getSize() == crop.getCrop().getOptimalHavestSize(crop))
|
||||
cropDrops = crop.harvest_automated(true);
|
||||
else
|
||||
cropDrops = crop.harvest_automated(false);
|
||||
if (cropDrops != null) {
|
||||
return new ArrayList<>(Arrays.asList(cropDrops));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/*******************************************************************************
|
||||
* 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.compat;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.apiculture.items.EnumPropolis;
|
||||
import forestry.apiculture.items.ItemRegistryApiculture;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.core.utils.ModUtil;
|
||||
import forestry.plugins.ForestryPlugin;
|
||||
import forestry.plugins.Plugin;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
import forestry.plugins.PluginManager;
|
||||
|
||||
@Plugin(pluginID = "MinefactoryReloaded", name = "MineFactoryReloaded", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.minefactoryreloaded.description")
|
||||
public class PluginMineFactoryReloaded extends ForestryPlugin {
|
||||
|
||||
private static final String MFR = "MineFactoryReloaded";
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return ModUtil.isModLoaded(MFR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFailMessage() {
|
||||
return "MineFactoryReloaded not found";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRecipes() {
|
||||
Block rubbersapling = GameRegistry.findBlock(MFR, "rubberwood.sapling");
|
||||
Item saplingItem = GameRegistry.findItem(MFR, "rubberwood.sapling");
|
||||
ItemStack saplingStack = new ItemStack(saplingItem, 1, 0);
|
||||
ItemStack rubberRaw = GameRegistry.findItemStack(MFR,"rubber.raw", 1);
|
||||
GameRegistry.findItemStack(MFR,"rubber.raw", 1);
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled() && !PluginManager.Module.INDUSTRIALCRAFT.isEnabled()) {
|
||||
if (rubberRaw != null) {
|
||||
ItemRegistryApiculture beeItems = PluginApiculture.items;
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, beeItems.propolis.get(EnumPropolis.NORMAL, 1), ImmutableMap.of(rubberRaw, 1.0f));
|
||||
}
|
||||
}
|
||||
if (rubbersapling != null && rubberRaw != null) {
|
||||
RecipeUtil.addFermenterRecipes(saplingStack, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
|
||||
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
|
||||
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class PluginWitchery extends ForestryPlugin {
|
||||
|
||||
Item saplingItem = GameRegistry.findItem(Witch, "witchsapling");
|
||||
ItemStack saplingStack = new ItemStack(saplingItem, 1, OreDictionary.WILDCARD_VALUE);
|
||||
RecipeUtil.addFermenterRecipes(saplingStack, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
RecipeUtil.addFermenterRecipes(saplingStack, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
|
||||
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
|
||||
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
|
||||
|
||||
|
||||
Reference in new issue
Block a user