mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 01:24:59 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4708ba94a8 | ||
|
|
141a1493a8 | ||
|
|
b6c93ef188 |
No files matched your search
@@ -2,4 +2,4 @@ mcversion=1.7.10
|
||||
forgeversion=10.13.3.1370-1.7.10
|
||||
version_major=3
|
||||
version_minor=6
|
||||
version_patch=10
|
||||
version_patch=11
|
||||
@@ -122,7 +122,7 @@ public class BlockArbStairs extends BlockStairs {
|
||||
TileStairs stairs = getStairTile(world, x, y, z);
|
||||
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
if (stairs == null || stairs.getWoodType() == null) {
|
||||
if (stairs == null) {
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public class BlockArbStairs extends BlockStairs {
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileStairs stairs = getStairTile(world, x, y, z);
|
||||
if (stairs != null && stairs.getWoodType() != null) {
|
||||
if (stairs != null) {
|
||||
return stairs.getWoodType().getPlankIcon();
|
||||
} else {
|
||||
return WoodType.LARCH.getPlankIcon();
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.arboriculture.gadgets;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -25,13 +26,15 @@ import forestry.core.proxy.Proxies;
|
||||
|
||||
public class TileStairs extends TileEntity implements IStreamable {
|
||||
|
||||
private WoodType woodType;
|
||||
@Nonnull
|
||||
private WoodType woodType = WoodType.LARCH;
|
||||
|
||||
@Nonnull
|
||||
public WoodType getWoodType() {
|
||||
return this.woodType;
|
||||
}
|
||||
|
||||
public void setWoodType(WoodType woodType) {
|
||||
public void setWoodType(@Nonnull WoodType woodType) {
|
||||
this.woodType = woodType;
|
||||
sendNetworkUpdate();
|
||||
}
|
||||
@@ -49,10 +52,7 @@ public class TileStairs extends TileEntity implements IStreamable {
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
super.writeToNBT(nbttagcompound);
|
||||
|
||||
if (woodType != null) {
|
||||
nbttagcompound.setShort("WT", (short) woodType.ordinal());
|
||||
}
|
||||
nbttagcompound.setShort("WT", (short) woodType.ordinal());
|
||||
}
|
||||
|
||||
/* UPDATING */
|
||||
|
||||
Executable → Regular
+14
-4
@@ -51,6 +51,8 @@ import forestry.core.network.PacketItemStackDisplay;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.GeneticsUtil;
|
||||
import forestry.core.utils.GuiUtil;
|
||||
import forestry.plugins.PluginArboriculture;
|
||||
import forestry.plugins.PluginManager;
|
||||
|
||||
public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiquidTankContainer, IItemStackDisplay {
|
||||
|
||||
@@ -159,7 +161,7 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
|
||||
}
|
||||
}
|
||||
|
||||
// Look for bees in input slots.
|
||||
// Look for specimens in input slots.
|
||||
IInvSlot slot = getInputSlot();
|
||||
|
||||
boolean noInput = (slot == null);
|
||||
@@ -169,11 +171,19 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
|
||||
}
|
||||
|
||||
ItemStack inputStack = slot.getStackInSlot();
|
||||
ItemStack ersatz = GeneticsUtil.convertSaplingToGeneticEquivalent(inputStack);
|
||||
if (ersatz != null) {
|
||||
inputStack = ersatz;
|
||||
|
||||
if (PluginManager.Module.ARBORICULTURE.isEnabled() && !PluginArboriculture.treeInterface.isMember(inputStack)) {
|
||||
ItemStack ersatz = GeneticsUtil.convertSaplingToGeneticEquivalent(inputStack);
|
||||
if (ersatz != null) {
|
||||
inputStack = ersatz;
|
||||
}
|
||||
}
|
||||
|
||||
IIndividual individual = AlleleManager.alleleRegistry.getIndividual(inputStack);
|
||||
if (individual == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!individual.isAnalyzed()) {
|
||||
boolean hasHoney = resourceTank.getFluidAmount() >= HONEY_REQUIRED;
|
||||
setErrorCondition(!hasHoney, EnumErrorCode.NORESOURCE);
|
||||
|
||||
Reference in new issue
Block a user