Merge branch '6.4.x' of github.com:BuildCraft/BuildCraft into 6.5.x

This commit is contained in:
asiekierka 2015-04-22 16:26:50 +02:00
commit 7f03a920bb
14 changed files with 91 additions and 14 deletions

View file

@ -329,6 +329,7 @@ public class MappingRegistry {
BCLog.logger.log(Level.WARN, "Can't load an item - corrupt blueprint!"); BCLog.logger.log(Level.WARN, "Can't load an item - corrupt blueprint!");
continue; continue;
} }
String name = sub.getString("name"); String name = sub.getString("name");
Item item = null; Item item = null;

View file

@ -7,7 +7,6 @@
* as "LICENSE.API" in the BuildCraft source code distribution. * as "LICENSE.API" in the BuildCraft source code distribution.
*/ */
package buildcraft.api.statements; package buildcraft.api.statements;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -32,6 +31,8 @@ public class StatementParameterItemStack implements IStatementParameter {
if (stack != null) { if (stack != null) {
this.stack = stack.copy(); this.stack = stack.copy();
this.stack.stackSize = 1; this.stack.stackSize = 1;
} else {
this.stack = null;
} }
} }

View file

@ -0,0 +1,13 @@
Improvements:
* [#2632] Filters on gates can be cleared by a mere click (asie)
Bugs fixed:
* [#2650] Server crash with Horizon pattern (asie)
* [#2649] Server crash with Oil in Nether (asie)
* [#2639] Dupe bug with finite liquids (asie)
* [#2638] Wooden pipes massive power usage (asie)
* [#2629] Stripes pipes cannot place blocks properly (asie)
* Miscellanous builder/blueprint issues (asie)
* Pump entity spam on the client side (asie)

View file

@ -1,3 +1,3 @@
1.6.4:BuildCraft:4.2.2 1.6.4:BuildCraft:4.2.2
1.7.2:BuildCraft:6.0.16 1.7.2:BuildCraft:6.0.16
1.7.10:BuildCraft:6.4.11 1.7.10:BuildCraft:6.4.12

View file

@ -33,7 +33,7 @@ public class PatternHorizon extends FillerPattern {
Template bpt = new Template(box.sizeX(), yMax - yMin + 1, box.sizeZ()); Template bpt = new Template(box.sizeX(), yMax - yMin + 1, box.sizeZ());
if (box.pMin().y > 0) { if (box.sizeY() > 0) {
for (int x = xMin; x <= xMax; ++x) { for (int x = xMin; x <= xMax; ++x) {
for (int z = zMin; z <= zMax; ++z) { for (int z = zMin; z <= zMax; ++z) {
bpt.contents[x - xMin][0][z - zMin] = new SchematicMask(true); bpt.contents[x - xMin][0][z - zMin] = new SchematicMask(true);

View file

@ -63,8 +63,8 @@ public class BlockBuildCraftFluid extends BlockFluidClassic {
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
super.onNeighborBlockChange(world, x, y, z, block); super.onNeighborBlockChange(world, x, y, z, block);
if (flammable && world.provider.dimensionId == -1) { if (flammable && world.provider.dimensionId == -1) {
world.newExplosion(null, x, y, z, 4F, true, true);
world.setBlockToAir(x, y, z); world.setBlockToAir(x, y, z);
world.newExplosion(null, x, y, z, 4F, true, true);
} }
} }

View file

@ -179,18 +179,22 @@ public final class BlockUtils {
int meta = world.getBlockMetadata(x, y, z); int meta = world.getBlockMetadata(x, y, z);
if (block instanceof IFluidBlock) { if (block instanceof IFluidBlock) {
if (!((IFluidBlock) block).canDrain(world, x, y, z)) { IFluidBlock fluidBlock = (IFluidBlock) block;
if (!fluidBlock.canDrain(world, x, y, z)) {
return null;
}
return fluidBlock.drain(world, x, y, z, doDrain);
} else {
if (meta != 0) {
return null; return null;
} }
} else if (meta != 0) {
return null;
}
if (doDrain) { if (doDrain) {
world.setBlockToAir(x, y, z); world.setBlockToAir(x, y, z);
} }
return new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME); return new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME);
}
} else { } else {
return null; return null;
} }

View file

@ -428,6 +428,15 @@ public class TilePump extends TileBuildCraft implements IHasWork, IFluidHandler,
} }
} }
@Override
public void onChunkUnload() {
super.onChunkUnload();
if (tube != null) {
CoreProxy.proxy.removeEntity(tube);
tube = null;
}
}
@Override @Override
public void validate() { public void validate() {
super.validate(); super.validate();

View file

@ -0,0 +1,34 @@
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.transport.gates;
import net.minecraft.tileentity.TileEntity;
import buildcraft.api.gates.GateExpansionController;
import buildcraft.api.gates.IGateExpansion;
public final class GateExpansionNote extends GateExpansionBuildcraft implements IGateExpansion {
public static GateExpansionNote INSTANCE = new GateExpansionNote();
private GateExpansionNote() {
super("note");
}
@Override
public GateExpansionController makeController(TileEntity pipeTile) {
return new GateExpansionControllerNote(pipeTile);
}
private class GateExpansionControllerNote extends GateExpansionController {
public GateExpansionControllerNote(TileEntity pipeTile) {
super(GateExpansionNote.this, pipeTile);
}
}
}

View file

@ -161,7 +161,7 @@ public class PipeFluidsWood extends Pipe<PipeTransportFluids> implements IEnergy
} }
int maxToReceive = (1000 - liquidToExtract) / ENERGY_MULTIPLIER; int maxToReceive = (1000 - liquidToExtract) / ENERGY_MULTIPLIER;
int received = Math.max(maxReceive, maxToReceive); int received = Math.min(maxReceive, maxToReceive);
if (!simulate) { if (!simulate) {
liquidToExtract += ENERGY_MULTIPLIER * received; liquidToExtract += ENERGY_MULTIPLIER * received;
} }

View file

@ -8,7 +8,9 @@
*/ */
package buildcraft.transport.statements; package buildcraft.transport.statements;
import java.util.Collections;
import java.util.Locale; import java.util.Locale;
import org.objectweb.asm.tree.MethodNode;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import buildcraft.api.gates.IGate; import buildcraft.api.gates.IGate;
import buildcraft.api.statements.IStatementContainer; import buildcraft.api.statements.IStatementContainer;

View file

@ -13,6 +13,7 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.core.Position; import buildcraft.api.core.Position;
import buildcraft.api.transport.IStripesActivator; import buildcraft.api.transport.IStripesActivator;
import buildcraft.api.transport.IStripesHandler; import buildcraft.api.transport.IStripesHandler;
@ -45,5 +46,4 @@ public class StripesHandlerPlaceBlock implements IStripesHandler {
} }
return false; return false;
} }
} }

View file

@ -8,6 +8,9 @@
*/ */
package buildcraft.transport.utils; package buildcraft.transport.utils;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
@ -15,6 +18,16 @@ public class ConnectionMatrix {
private int mask = 0; private int mask = 0;
private boolean dirty = false; private boolean dirty = false;
private Set s;
public ConnectionMatrix() {
s = getSet();
}
public static Set getSet() {
return null;
}
public boolean isConnected(ForgeDirection direction) { public boolean isConnected(ForgeDirection direction) {
// test if the direction.ordinal()'th bit of mask is set // test if the direction.ordinal()'th bit of mask is set
return (mask & (1 << direction.ordinal())) != 0; return (mask & (1 << direction.ordinal())) != 0;

BIN
common/com.zip Normal file

Binary file not shown.