BuildCraft 7.0.5

This commit is contained in:
Adrian 2015-05-26 15:32:51 +02:00
parent 439f97a6df
commit 00562c5adb
10 changed files with 64 additions and 22 deletions

View file

@ -8,10 +8,13 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class CropManager {
public final class CropManager {
private static List<ICropHandler> handlers = new ArrayList<ICropHandler>();
private CropManager() {
}
public static void registerHandler(ICropHandler cropHandler) {
handlers.add(cropHandler);
}
@ -27,8 +30,9 @@ public class CropManager {
public static boolean canSustainPlant(World world, ItemStack seed, int x, int y, int z) {
for (ICropHandler cropHandler : handlers) {
if (cropHandler.isSeed(seed) && cropHandler.canSustainPlant(world, seed, x, y, z))
if (cropHandler.isSeed(seed) && cropHandler.canSustainPlant(world, seed, x, y, z)) {
return true;
}
}
return false;
}

View file

@ -0,0 +1,12 @@
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "1.0", owner = "BuildCraftAPI|Core", provides = "BuildCraftAPI|crops")
package buildcraft.api.crops;
import cpw.mods.fml.common.API;

View file

@ -22,7 +22,7 @@ apply plugin: 'forge' // adds the forge dependency
apply plugin: 'maven' // for uploading to a maven repo
apply plugin: 'checkstyle'
version = "7.0.4"
version = "7.0.5"
group= "com.mod-buildcraft"
archivesBaseName = "buildcraft" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension]

View file

@ -0,0 +1,22 @@
Additions:
* Smooth robot animations (hea3ven)
* New pipe plug/structure pipe/robot station textures (CyanideX, asie)
* EXPERIMENTAL: Option to enable BC 3.6.0-esque (IC2-esque) power loss over distance for kinesis pipes (asie)
Improvements:
* Improved helmet support for robots (hea3ven)
* Tons of little optimizations to gate and lens rendering (asie)
Removed:
* Crafter robot (hea3ven, decided by asie)
Bugs fixed:
* [#2710] Weird render for non 3d colored items in pipes (asie)
* Lists only using the first stack per line (hea3ven)
* Planter robot not being able to plant cactus (hea3ven)
* Robots not having delay when equiping tools (hea3ven)
* Robots destroying items when they fail to use them (hea3ven)

View file

@ -261,7 +261,7 @@ public class BuildCraftTransport extends BuildCraftMod {
public static IActionInternal[] actionValve = new IActionInternal[4];
public static boolean debugPrintFacadeList = false;
public static boolean usePipeLoss = true;
public static boolean usePipeLoss = false;
public static float gateCostMultiplier = 1.0F;
@ -288,6 +288,8 @@ public class BuildCraftTransport extends BuildCraftMod {
}
try {
BuildCraftCore.mainConfigManager.register("experimental.kinesisPowerLossOnTravel", false, "Should kinesis pipes lose power over distance (think IC2 or BC pre-3.7)?", ConfigManager.RestartRequirement.WORLD);
BuildCraftCore.mainConfigManager.register("general.pipes.hardness", DefaultProps.PIPES_DURABILITY, "How hard to break should a pipe be?", ConfigManager.RestartRequirement.NONE);
BuildCraftCore.mainConfigManager.register("general.pipes.baseFluidRate", DefaultProps.PIPES_FLUIDS_BASE_FLOW_RATE, "What should the base flow rate of a fluid pipe be?", ConfigManager.RestartRequirement.GAME)
.setMinValue(1).setMaxValue(40);
@ -552,6 +554,8 @@ public class BuildCraftTransport extends BuildCraftMod {
reloadConfig(ConfigManager.RestartRequirement.WORLD);
} else if (restartType == ConfigManager.RestartRequirement.WORLD) {
usePipeLoss = BuildCraftCore.mainConfigManager.get("experimental.kinesisPowerLossOnTravel").getBoolean();
reloadConfig(ConfigManager.RestartRequirement.NONE);
} else {
pipeDurability = (float) BuildCraftCore.mainConfigManager.get("general.pipes.hardness").getDouble();

View file

@ -20,9 +20,8 @@ import buildcraft.core.lib.utils.MatrixTranformations;
import buildcraft.transport.render.FacadeRenderHelper;
public class FacadePluggable extends PipePluggable implements IFacadePluggable {
public static class FacadePluggableRenderer implements IPipePluggableRenderer {
public static final class FacadePluggableRenderer implements IPipePluggableRenderer {
public static final IPipePluggableRenderer INSTANCE = new FacadePluggableRenderer();
private static final float zFightOffset = 1 / 4096.0F;
private FacadePluggableRenderer() {

View file

@ -369,8 +369,9 @@ public class PipeTransportPower extends PipeTransport implements IDebuggable {
* All power input MUST go through designated input pipes, such as Wooden
* Power Pipes or a subclass thereof.
*/
public double receiveEnergy(ForgeDirection from, double val) {
public double receiveEnergy(ForgeDirection from, double tVal) {
int side = from.ordinal();
double val = tVal;
step();

View file

@ -351,18 +351,6 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
@Override
public void updateEntity() {
if (attachPluggables) {
attachPluggables = false;
// Attach callback
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
if (sideProperties.pluggables[i] != null) {
pipe.eventBus.registerHandler(sideProperties.pluggables[i]);
sideProperties.pluggables[i].onAttachedPipe(this, ForgeDirection.getOrientation(i));
}
}
notifyBlockChanged();
}
if (!worldObj.isRemote) {
if (deletePipe) {
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
@ -377,6 +365,18 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
}
}
if (attachPluggables) {
attachPluggables = false;
// Attach callback
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
if (sideProperties.pluggables[i] != null) {
pipe.eventBus.registerHandler(sideProperties.pluggables[i]);
sideProperties.pluggables[i].onAttachedPipe(this, ForgeDirection.getOrientation(i));
}
}
notifyBlockChanged();
}
if (!BlockGenericPipe.isValid(pipe)) {
return;
}

View file

@ -28,7 +28,7 @@ import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.render.PipeRendererTESR;
public class GatePluggable extends PipePluggable {
private static class GatePluggableRenderer implements IPipePluggableRenderer, IPipePluggableDynamicRenderer {
private static final class GatePluggableRenderer implements IPipePluggableRenderer, IPipePluggableDynamicRenderer {
public static final GatePluggableRenderer INSTANCE = new GatePluggableRenderer();
private GatePluggableRenderer() {

View file

@ -28,7 +28,7 @@ public class LensPluggable extends PipePluggable {
protected IPipeTile container;
private ForgeDirection side;
private static class LensPluggableRenderer implements IPipePluggableRenderer {
private static final class LensPluggableRenderer implements IPipePluggableRenderer {
public static final IPipePluggableRenderer INSTANCE = new LensPluggableRenderer();
private static final float zFightOffset = 1 / 4096.0F;