Compare commits

...
67 Commits
Author SHA1 Message Date
mezz 66fc9fbc9f Fix bees to pollinate vanilla trees again 2015-06-24 22:26:17 -07:00
mezz aa1ecd8c13 Fix #732 letter sizes 2015-06-24 21:18:36 -07:00
mezz c3453981c3 Fix #730 Crash with corrupted forestry leaves from MFR harvester 2015-06-20 20:38:19 -07:00
mezz 870eaf8725 Bump BC recipes compatible version range.
BuildcraftAPI|recipes got a breaking update in 7.0, but it only
breaks integration tables
2015-06-20 16:17:54 -07:00
mezz 2d07fea3ad Fix Analyzer block's display for trees and butterflies 2015-06-20 01:45:54 -07:00
mezz 95be941803 Fix #729 Leaves name doesn't show properly 2015-06-19 20:38:32 -07:00
mezz be16bf4491 Merge branch 'dev' into 3.6.0 2015-06-19 00:34:41 -07:00
mezz ce6aa27f44 Merge branch 'dev'
Conflicts:
	application.properties
	src/main/java/forestry/Forestry.java
	src/main/java/forestry/core/fluids/TankManager.java
	src/main/java/forestry/core/genetics/Allele.java
	src/main/java/forestry/factory/gadgets/MachineBottler.java
	src/main/java/forestry/factory/gadgets/MachineStill.java
	src/main/java/forestry/factory/gui/ContainerBottler.java
	src/main/java/forestry/plugins/PluginApiculture.java
	src/main/java/forestry/plugins/PluginCore.java
	src/main/java/forestry/plugins/PluginManager.java
	src/main/java/forestry/storage/items/ItemNaturalistBackpack.java
2015-05-21 00:48:20 -07:00
mezz bf179c91d9 Bump patch version to 3.5.6 2015-05-09 17:55:08 -07:00
Nirek-K 5fc1b10298 Add meta checking to flower weight adjustment
(cherry picked from commit 49deb75278)
2015-05-09 17:54:44 -07:00
Nirek-K 23b8f8b892 #Fix 646 Move plantables registration to not be smashed by acceptable.
(cherry picked from commit c705486472)
2015-05-09 17:52:54 -07:00
Nirek-K 1598946632 Fix #650 Fix logic errors in bee planting
(cherry picked from commit d29f4c0b79)
2015-05-09 17:52:34 -07:00
mezz aad6dbaa3f Bump patch version to 3.5.5 2015-05-09 17:41:13 -07:00
mezz ca6cc89015 Fix #652 Bottler liquid dupe bug on server
(cherry picked from commit d5296fbc60)
2015-05-09 17:39:52 -07:00
Nirek-K 7a22f1d939 Fix #644 Make Clockwork engine recipe OreDictionary aware. 2015-05-09 00:15:28 -07:00
mezz feda84fbc6 bump patch version 2015-04-18 13:13:39 -07:00
mezz f7b36e11d1 Fix compatibility with Forge 10.13.3.x fluid changes 2015-04-18 13:08:25 -07:00
mezz cfbab6b988 Fix #597 Crash from Butterfly Genome.getActiveAllele 2015-04-06 21:20:03 -07:00
mezz 3978a068d1 Bump minor patch version 2015-04-05 21:15:14 -07:00
mezz 9d2d0af432 Fix #594 Crash in Natura plugin
(cherry picked from commit 689adab411)
2015-04-05 21:14:56 -07:00
mezz d451309170 bump patch version to 3.5.1 2015-04-05 20:28:27 -07:00
mezz c82dd0fbfb Fix #592 Some Crates are missing a recipe 2015-04-05 20:22:21 -07:00
mezz 803911e10a Fix #588 crash on crate registry with disabled storage module and natura
(cherry picked from commit 536254af42)
2015-04-05 20:20:40 -07:00
Nirek-K 29eedf9011 Fix #588 Bulletproof null checks for Natura Plugin
(cherry picked from commit 3f6f12f7cc)
2015-04-05 20:15:05 -07:00
mezz 882848a00f Revert "Close #441 Add Underground Biomes Constructs integration"
This reverts commit b3b1a6a415.

Conflicts:
	lang
	src/main/java/forestry/Forestry.java
	src/main/java/forestry/plugins/PluginManager.java

(cherry picked from commit 1ca041a29f)

Conflicts:
	src/main/java/forestry/plugins/PluginManager.java
2015-04-04 19:44:15 -07:00
mezz 4d253e1dd6 Merge branch 'dev' into release_3.5
Conflicts:
	src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java
2015-03-26 23:02:38 -07:00
mezz 4d7988ee0f Merge branch 'dev' into release_3.4
Conflicts:
	application.properties
	src/main/java/forestry/apiculture/gadgets/TileSwarm.java
	src/main/java/forestry/apiculture/genetics/Bee.java
	src/main/java/forestry/arboriculture/gadgets/ForestryBlockLeaves.java
	src/main/java/forestry/core/config/Config.java
	src/main/java/forestry/core/gui/widgets/ReservoirWidget.java
	src/main/java/forestry/core/utils/BlockUtil.java
	src/main/java/forestry/energy/EnergyManager.java
	src/main/java/forestry/factory/gadgets/MachineCarpenter.java
	src/main/java/forestry/mail/gui/GuiCatalogue.java
	src/main/java/forestry/plugins/PluginArboriculture.java
2015-02-16 15:00:16 -08:00
CovertJaguar fcad67a1c2 Update lang 2015-01-29 14:45:38 -08:00
mezz 1bd3b61df9 Fix #480 Increase hive spawn rate 25%, add config option for spawn rate
(cherry picked from commit 56dfae034d)

Conflicts:
	src/main/java/forestry/apiculture/worldgen/HiveDecorator.java
2015-01-29 00:11:35 -08:00
mezz 060ca1eb80 Fix #479 Try to make sure hives are always glowing
(cherry picked from commit 636201ce5a)
2015-01-29 00:09:47 -08:00
mezz 98a2d9c65e Fix bee biome temperature check for nether biomes
(cherry picked from commit c3f37a379a)
2015-01-25 22:26:39 -08:00
mezz eb010094ca Fix crash from missing block when a plugin mod is uninstalled
(cherry picked from commit 5a7bd9f57a)
2015-01-25 22:25:36 -08:00
mezz e6cbced8a2 #457 Add config option for village generation (forgot lumberjack) 2015-01-24 00:25:50 -08:00
mezz d300078227 Close #457 Add config option for village generation
(cherry picked from commit dab217eab0)
2015-01-24 00:21:56 -08:00
mezz 65c7f0242c Fix #470 Engines don't output to other mods' machines
(cherry picked from commit dffa845851)
2015-01-23 23:27:46 -08:00
mezz c4140ef9c3 Fix #472 Crash with Thaumic Tinkerer Ichorium Axe
(cherry picked from commit 1aefd5863e)
2015-01-23 23:26:54 -08:00
mezz 389e5e01e7 Fix #467 Carpenter automation
(cherry picked from commit c6dae0318c)
2015-01-23 22:34:21 -08:00
mezz a55b2645b7 Fix #465 crash after closing catalogue and opening another item gui
(cherry picked from commit dc1449855e)
2015-01-23 22:33:46 -08:00
mezz 9a36381ce0 Fix possible reservoir crash from thermionic fabricator
(cherry picked from commit 195c8fc524)
2015-01-23 22:32:37 -08:00
CovertJaguar 2565eea5ba Set version to 3.4 2015-01-17 20:44:55 -08:00
CovertJaguar 13ae9ece47 Fix submodule issues 2015-01-17 20:36:25 -08:00
CovertJaguar d3e87b1aaf Merge branch 'dev' into release_3.4
Conflicts:
	application.properties
	src/main/java/forestry/apiculture/gadgets/TileAlvearyHygroregulator.java
	src/main/java/forestry/apiculture/gadgets/TileAlvearyPlain.java
	src/main/java/forestry/apiculture/gadgets/TileAlvearySwarmer.java
	src/main/java/forestry/apiculture/worldgen/HiveDecorator.java
	src/main/java/forestry/apiculture/worldgen/HiveForest.java
	src/main/java/forestry/apiculture/worldgen/HiveGen.java
	src/main/java/forestry/apiculture/worldgen/HiveGenHelper.java
	src/main/java/forestry/apiculture/worldgen/HiveMeadows.java
	src/main/java/forestry/apiculture/worldgen/HiveSnow.java
	src/main/java/forestry/apiculture/worldgen/HiveSwamp.java
	src/main/java/forestry/apiculture/worldgen/HiveSwarmer.java
	src/main/java/forestry/core/gui/ContainerForestry.java
	src/main/java/forestry/core/utils/RecipeUtil.java
	src/main/java/forestry/factory/gadgets/TileWorktable.java
	src/main/java/forestry/factory/gui/ContainerFabricator.java
	src/main/java/forestry/factory/gui/ContainerWorktable.java
	src/main/java/forestry/factory/recipes/RecipeMemory.java
2015-01-17 20:33:15 -08:00
CovertJaguar 990d4990db Fix lang 2014-12-14 21:39:45 -08:00
mezz ce232e808e Fix Alveary Swarmer and Swarm Hive
(cherry picked from commit 2577ee9c930cdc91bdf3d207cbeaaebbe1141257)

Conflicts:
	src/main/java/forestry/apiculture/gadgets/TileAlvearySwarmer.java
2014-12-09 01:08:14 -08:00
mezz 31574a9c6e Cleanup
(cherry picked from commit 4f95ceab29)
2014-12-09 01:03:05 -08:00
mezz cd9a4110ee Refactor out worktable canCraftRecipe logic to RecipeUtil 2014-12-08 20:26:51 -08:00
mezz 6b35ff2ba1 Improve null safety of memorized recipe isValid check
(cherry picked from commit 23ffb78ab3)
2014-12-07 16:25:01 -08:00
mezz 5133e721cc Add blacklist to worktable memory, blacklist non-empty maps
(cherry picked from commit 2cb1959421)
2014-12-07 16:18:23 -08:00
mezz 09ced92f5b Support left click drag on Worktable
(cherry picked from commit 029604222c)
2014-12-07 16:18:17 -08:00
mezz 12477a7711 Fix crash when crafting with a Map on a Worktable 2014-12-07 16:17:21 -08:00
mezz b7dc4d9144 Fix #359 Crafting with a worktable does not trigger achievements.
(cherry picked from commit c010977a0b)
2014-12-07 16:16:24 -08:00
mezz da48d317ff Fix #362 Missing Analyzer Crafting recipe
(cherry picked from commit 7ffb9d5c1d)
2014-12-07 15:32:02 -08:00
mezz 5bfb11e952 Fix #353 Alveary heater/fan energy consumption, animation
(cherry picked from commit 475d99eae8)
2014-12-07 15:30:30 -08:00
mezz 4dffb9f352 Fix biome error in Alveary
(cherry picked from commit d0244ece32)
2014-12-07 15:30:20 -08:00
mezz beadb47539 Fix #356 Worktable using the wrong wood with Shift-use all
(cherry picked from commit 0105f36668)
2014-12-07 15:30:08 -08:00
mezz 6301d3c193 Fix #357 Forestry stained glass not silk touchable
(cherry picked from commit ab3ba0c4db)
2014-12-07 15:30:02 -08:00
mezz 883863e047 Safety check for IC2 Plugin. #351
(cherry picked from commit 38009bb32a)
2014-12-07 15:29:42 -08:00
mezz 2c14f02151 Fix #352 Backpack deletion/duplication bug
(cherry picked from commit d827a0f132)
2014-12-07 15:29:07 -08:00
CovertJaguar 00771b1a42 Bump version 2014-11-30 17:22:40 -08:00
CovertJaguar 46ec2f2740 Merge branch 'dev' into release_3.3 2014-11-30 17:21:03 -08:00
mezz ac653d46c1 Fix #326 decorative leaves should not pollinate 2014-11-15 04:15:20 -08:00
mezz 63d9935d01 Minor code cleanup 2014-11-15 04:15:14 -08:00
mezz ba695b977d Fix #325 Centrifuge dupe bug 2014-11-15 04:13:46 -08:00
CovertJaguar 6b1dfb1596 Set submodules 2014-11-15 04:12:44 -08:00
CovertJaguar fff02be71d Bump version to 3.2 2014-11-08 21:40:45 -08:00
CovertJaguar 0e5b9e4957 Merge branch 'dev' into release_3.2
Conflicts:
	src/main/resources/assets/forestry/textures/blocks/storage/apatite.png
	src/main/resources/assets/forestry/textures/blocks/storage/bronze.png
	src/main/resources/assets/forestry/textures/blocks/storage/copper.png
	src/main/resources/assets/forestry/textures/blocks/storage/tin.png
2014-11-08 21:39:26 -08:00
MysteriousAges 3415030fbf Revert "Storage block textures - Apatite, Bronze, Copper, Tin."
This reverts commit c8fd93873a.
2014-10-24 20:18:30 -07:00
21 changed files with 116 additions and 115 deletions

No files matched your search

+5 -1
View File
@@ -70,6 +70,10 @@ repositories {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
}
configurations {
@@ -79,7 +83,7 @@ configurations {
dependencies {
api 'net.industrial-craft:industrialcraft-2:2.2.713-experimental:api'
api 'com.mod-buildcraft:buildcraft:6.4.10:dev'
api name: "buildcraft", version: "6.4.10", classifier: "dev"
}
processResources {
View File
File mode changed.
View File
File mode changed.
View File
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;
}
}
@@ -328,7 +328,11 @@ public class TileLeaves extends TileTreeContainer implements IPollinatable, IFru
}
public String getUnlocalizedName() {
return getTree().getGenome().getPrimary().getUnlocalizedName();
ITree tree = getTree();
if (tree == null) {
return "for.leaves.corrupted";
}
return tree.getGenome().getPrimary().getUnlocalizedName();
}
/* NETWORK */
@@ -3,6 +3,7 @@ package forestry.arboriculture.items;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import forestry.arboriculture.gadgets.TileLeaves;
@@ -35,7 +36,7 @@ public class ItemLeavesBlock extends ItemForestryBlock {
}
String grammar = StringUtil.localize("trees.grammar.leaves");
String localizedName = StringUtil.localize(unlocalizedName);
String localizedName = StatCollector.translateToLocal(unlocalizedName);
return grammar.replaceAll("%SPECIES", localizedName).replaceAll("%TYPE", type);
}
+1 -1
View File
@@ -113,7 +113,7 @@ public class Config {
public static float getBeehivesRate() {
return generateBeehivesRate;
}
public static boolean isExUtilEnderLilyEnabled() {
return ExUtilEnderLily;
}
@@ -27,11 +27,9 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import forestry.api.apiculture.BeeManager;
import forestry.api.core.ForestryAPI;
import forestry.api.core.IErrorState;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IIndividual;
import forestry.core.EnumErrorCode;
import forestry.core.config.Defaults;
@@ -39,6 +37,7 @@ import forestry.core.fluids.FluidHelper;
import forestry.core.fluids.Fluids;
import forestry.core.fluids.TankManager;
import forestry.core.fluids.tanks.FilteredTank;
import forestry.core.interfaces.IItemStackDisplay;
import forestry.core.interfaces.ILiquidTankContainer;
import forestry.core.inventory.InvTools;
import forestry.core.inventory.TileInventoryAdapter;
@@ -48,10 +47,12 @@ import forestry.core.inventory.wrappers.InventoryMapper;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.GuiId;
import forestry.core.network.PacketItemStackDisplay;
import forestry.core.proxy.Proxies;
import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.GuiUtil;
public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiquidTankContainer {
public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiquidTankContainer, IItemStackDisplay {
/* CONSTANTS */
public static final int TIME_TO_ANALYZE = 125;
@@ -148,7 +149,8 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
if (added) {
setInventorySlotContents(SLOT_ANALYZE, null);
setNeedsNetworkUpdate();
PacketItemStackDisplay packet = new PacketItemStackDisplay(this, getIndividualOnDisplay());
Proxies.net.sendNetworkPacket(packet);
}
setErrorCondition(!added, EnumErrorCode.NOSPACE);
@@ -183,7 +185,8 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
}
setInventorySlotContents(SLOT_ANALYZE, inputStack);
slot.setStackInSlot(null);
setNeedsNetworkUpdate();
PacketItemStackDisplay packet = new PacketItemStackDisplay(this, getIndividualOnDisplay());
Proxies.net.sendNetworkPacket(packet);
return true;
}
@@ -202,39 +205,19 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
public void writeData(DataOutputStreamForestry data) throws IOException {
super.writeData(data);
ItemStack displayStack = getIndividualOnDisplay();
if (displayStack == null) {
data.writeBoolean(false);
} else {
data.writeBoolean(true);
IIndividual displayIndividual = AlleleManager.alleleRegistry.getIndividual(displayStack);
int type = BeeManager.beeRoot.getType(displayStack).ordinal();
data.writeUTF(displayIndividual.getIdent());
data.writeShort(type);
data.writeShort(displayStack.stackSize);
}
data.writeItemStack(displayStack);
}
@Override
public void readData(DataInputStreamForestry data) throws IOException {
super.readData(data);
individualOnDisplayClient = data.readItemStack();
}
ItemStack newIndividualOnDisplay = null;
if (data.readBoolean()) {
String individualUID = data.readUTF();
int type = data.readShort();
int stackSize = data.readShort();
IAllele[] template = BeeManager.beeRoot.getTemplate(individualUID);
IIndividual individual = BeeManager.beeRoot.templateAsIndividual(template);
newIndividualOnDisplay = BeeManager.beeRoot.getMemberStack(individual, type);
newIndividualOnDisplay.stackSize = stackSize;
}
if (!ItemStack.areItemStacksEqual(newIndividualOnDisplay, individualOnDisplayClient)) {
individualOnDisplayClient = newIndividualOnDisplay;
@Override
public void handleItemStackForDisplay(ItemStack itemStack) {
if (!ItemStack.areItemStacksEqual(itemStack, individualOnDisplayClient)) {
individualOnDisplayClient = itemStack;
worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
}
View File
File mode changed.
@@ -42,7 +42,7 @@ public class BlockUtil {
if (!(tile instanceof IEnergyReceiver)) {
return false;
}
IEnergyReceiver receptor = (IEnergyReceiver) tile;
return receptor.canConnectEnergy(side);
}
@@ -41,23 +41,23 @@ import forestry.plugins.PluginArboriculture;
public class GeneticsUtil {
private static Set<Material> ersatzSpecimenMaterials;
private static Set<Block> ersatzSpecimenBlocks;
private static Set<Material> getErsatzSpecimenMaterials() {
if (ersatzSpecimenMaterials == null) {
ersatzSpecimenMaterials = new HashSet<Material>();
private static Set<Block> getErsatzBlocks() {
if (ersatzSpecimenBlocks == null) {
ersatzSpecimenBlocks = new HashSet<Block>();
for (ItemStack ersatzSpecimen : AlleleManager.ersatzSpecimen.keySet()) {
Block ersatzBlock = StackUtils.getBlock(ersatzSpecimen);
if (ersatzBlock != null) {
ersatzSpecimenMaterials.add(ersatzBlock.getMaterial());
ersatzSpecimenBlocks.add(ersatzBlock);
}
}
}
return ersatzSpecimenMaterials;
return ersatzSpecimenBlocks;
}
private static boolean isErsatzMaterial(Block block) {
return block != null && getErsatzSpecimenMaterials().contains(block.getMaterial());
private static boolean isErsatzBlock(Block block) {
return block != null && getErsatzBlocks().contains(block);
}
public static boolean hasNaturalistEye(EntityPlayer player) {
@@ -127,7 +127,7 @@ public class GeneticsUtil {
public static ITree getErsatzPollen(World world, final int x, final int y, final int z) {
Block block = world.getBlock(x, y, z);
if (!isErsatzMaterial(block)) {
if (!isErsatzBlock(block)) {
return null;
}
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
View File
File mode changed.
@@ -111,12 +111,20 @@ public class ItemLetter extends ItemInventoried {
public static LetterState getState(int meta) {
int ordinal = meta & 0x0f;
return LetterState.values()[ordinal];
LetterState[] values = LetterState.values();
if (ordinal >= values.length) {
ordinal = 0;
}
return values[ordinal];
}
public static LetterSize getSize(int meta) {
int ordinal = meta >> 4;
return LetterSize.values()[ordinal];
LetterSize[] values = LetterSize.values();
if (ordinal >= values.length) {
ordinal = 0;
}
return values[ordinal];
}
public static LetterSize getSize(ILetter letter) {
@@ -167,23 +175,24 @@ public class ItemLetter extends ItemInventoried {
switch (state) {
case OPENED:
if (letter.countAttachments() <= 0) {
int meta = encodeMeta(LetterState.EMPTIED, size);
parent.setItemDamage(meta);
state = LetterState.EMPTIED;
}
break;
case FRESH:
case STAMPED:
if (letter.isMailable() && letter.isPostPaid()) {
int meta = encodeMeta(LetterState.STAMPED, size);
parent.setItemDamage(meta);
state = LetterState.STAMPED;
} else {
int meta = encodeMeta(LetterState.FRESH, size);
parent.setItemDamage(meta);
state = LetterState.FRESH;
}
size = getSize(letter);
break;
case EMPTIED:
}
int meta = encodeMeta(state, size);
parent.setItemDamage(meta);
letter.writeToNBT(parent.getTagCompound());
}
@@ -23,7 +23,7 @@ public class PluginBuildCraftRecipes extends ForestryPlugin {
@Override
public boolean isAvailable() {
return Proxies.common.isAPILoaded("buildcraft.api.recipes", "[2.0, 3.0)");
return Proxies.common.isAPILoaded("buildcraft.api.recipes", "[2.0, 4.0)");
}
@Override
View File
File mode changed.