Merge branch '6.4.x' of github.com:BuildCraft/BuildCraft into 6.5.x
Conflicts: build.gradle
This commit is contained in:
commit
cef844212d
9 changed files with 75 additions and 56 deletions
5
buildcraft_resources/changelog/6.4.5
Normal file
5
buildcraft_resources/changelog/6.4.5
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Bugfixes:
|
||||||
|
* [#2585] Dupe bug with Thermal Expansion (asie)
|
||||||
|
* [#2582] Laser rendering not working properly with solid blocks on front (davboecki)
|
||||||
|
* (Fix attempt) [#2584] Filler lag when out of blocks (asie)
|
||||||
|
* Massive FPS lag with filler/builder effects (asie)
|
|
@ -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.4
|
1.7.10:BuildCraft:6.4.5
|
||||||
|
|
|
@ -8,10 +8,7 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.core.blueprints;
|
package buildcraft.core.blueprints;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
|
@ -30,8 +30,9 @@ import buildcraft.core.lib.utils.BlockUtils;
|
||||||
|
|
||||||
public class BptBuilderTemplate extends BptBuilderBase {
|
public class BptBuilderTemplate extends BptBuilderBase {
|
||||||
|
|
||||||
|
private LinkedList<BuildingSlotBlock> clearList = new LinkedList<BuildingSlotBlock>();
|
||||||
private LinkedList<BuildingSlotBlock> buildList = new LinkedList<BuildingSlotBlock>();
|
private LinkedList<BuildingSlotBlock> buildList = new LinkedList<BuildingSlotBlock>();
|
||||||
private BuildingSlotIterator iterator;
|
private BuildingSlotIterator iteratorBuild, iteratorClear;
|
||||||
|
|
||||||
public BptBuilderTemplate(BlueprintBase bluePrint, World world, int x, int y, int z) {
|
public BptBuilderTemplate(BlueprintBase bluePrint, World world, int x, int y, int z) {
|
||||||
super(bluePrint, world, x, y, z);
|
super(bluePrint, world, x, y, z);
|
||||||
|
@ -65,7 +66,7 @@ public class BptBuilderTemplate extends BptBuilderBase {
|
||||||
b.mode = Mode.ClearIfInvalid;
|
b.mode = Mode.ClearIfInvalid;
|
||||||
b.buildStage = 0;
|
b.buildStage = 0;
|
||||||
|
|
||||||
buildList.add(b);
|
clearList.add(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,11 +103,12 @@ public class BptBuilderTemplate extends BptBuilderBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator = new BuildingSlotIterator(buildList);
|
iteratorBuild = new BuildingSlotIterator(buildList);
|
||||||
|
iteratorClear = new BuildingSlotIterator(clearList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkDone() {
|
private void checkDone() {
|
||||||
if (buildList.size() == 0) {
|
if (buildList.size() == 0 && clearList.size() == 0) {
|
||||||
done = true;
|
done = true;
|
||||||
} else {
|
} else {
|
||||||
done = false;
|
done = false;
|
||||||
|
@ -120,7 +122,7 @@ public class BptBuilderTemplate extends BptBuilderBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BuildingSlot getNextBlock(World world, TileAbstractBuilder inv) {
|
public BuildingSlot getNextBlock(World world, TileAbstractBuilder inv) {
|
||||||
if (buildList.size() != 0) {
|
if (buildList.size() != 0 || clearList.size() != 0) {
|
||||||
BuildingSlotBlock slot = internalGetNextBlock(world, inv);
|
BuildingSlotBlock slot = internalGetNextBlock(world, inv);
|
||||||
checkDone();
|
checkDone();
|
||||||
|
|
||||||
|
@ -152,57 +154,66 @@ public class BptBuilderTemplate extends BptBuilderBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator.startIteration();
|
// Step 1: Check the cleared
|
||||||
|
iteratorClear.startIteration();
|
||||||
|
while (iteratorClear.hasNext()) {
|
||||||
|
BuildingSlotBlock slot = iteratorClear.next();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
if (slot.buildStage > clearList.getFirst().buildStage) {
|
||||||
BuildingSlotBlock slot = iterator.next();
|
iteratorClear.reset();
|
||||||
|
break;
|
||||||
if (slot.buildStage > buildList.getFirst().buildStage) {
|
|
||||||
iterator.reset ();
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BlockUtils.isUnbreakableBlock(world, slot.x, slot.y, slot.z)
|
if (BlockUtils.isUnbreakableBlock(world, slot.x, slot.y, slot.z)
|
||||||
|| isBlockBreakCanceled(world, slot.x, slot.y, slot.z)) {
|
|| isBlockBreakCanceled(world, slot.x, slot.y, slot.z)
|
||||||
iterator.remove();
|
|| BuildCraftAPI.isSoftBlock(world, slot.x, slot.y, slot.z)) {
|
||||||
if (slot.mode == Mode.ClearIfInvalid) {
|
iteratorClear.remove();
|
||||||
clearedLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
clearedLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
||||||
} else {
|
} else if (canDestroy(builder, context, slot)) {
|
||||||
builtLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
|
||||||
}
|
|
||||||
} else if (slot.mode == Mode.ClearIfInvalid) {
|
|
||||||
if (BuildCraftAPI.isSoftBlock(world, slot.x, slot.y, slot.z)) {
|
|
||||||
iterator.remove();
|
|
||||||
clearedLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
|
||||||
} else {
|
|
||||||
if (canDestroy(builder, context, slot)) {
|
|
||||||
consumeEnergyToDestroy(builder, slot);
|
consumeEnergyToDestroy(builder, slot);
|
||||||
createDestroyItems(slot);
|
createDestroyItems(slot);
|
||||||
|
|
||||||
result = slot;
|
result = slot;
|
||||||
iterator.remove();
|
iteratorClear.remove();
|
||||||
clearedLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
clearedLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (slot.mode == Mode.Build) {
|
|
||||||
if (!BuildCraftAPI.isSoftBlock(world, slot.x, slot.y, slot.z)
|
if (result != null) {
|
||||||
|| isBlockPlaceCanceled(world, x, y, z, slot.schematic)) {
|
return result;
|
||||||
iterator.remove();
|
}
|
||||||
|
|
||||||
|
// Step 2: Check the built, but only if we have anything to place and enough energy
|
||||||
|
if (firstSlotToConsume == null || builder.getBattery().getEnergyStored() < BuilderAPI.BUILD_ENERGY) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
iteratorBuild.startIteration();
|
||||||
|
|
||||||
|
while (iteratorBuild.hasNext()) {
|
||||||
|
BuildingSlotBlock slot = iteratorBuild.next();
|
||||||
|
|
||||||
|
if (slot.buildStage > buildList.getFirst().buildStage) {
|
||||||
|
iteratorBuild.reset();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BlockUtils.isUnbreakableBlock(world, slot.x, slot.y, slot.z)
|
||||||
|
|| isBlockPlaceCanceled(world, x, y, z, slot.schematic)
|
||||||
|
|| !BuildCraftAPI.isSoftBlock(world, slot.x, slot.y, slot.z)) {
|
||||||
|
iteratorBuild.remove();
|
||||||
builtLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
builtLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
||||||
} else {
|
} else if (builder.consumeEnergy(BuilderAPI.BUILD_ENERGY)) {
|
||||||
if (builder.consumeEnergy(BuilderAPI.BUILD_ENERGY) && firstSlotToConsume != null) {
|
|
||||||
slot.addStackConsumed(firstSlotToConsume.decreaseStackInSlot(1));
|
slot.addStackConsumed(firstSlotToConsume.decreaseStackInSlot(1));
|
||||||
result = slot;
|
result = slot;
|
||||||
iterator.remove();
|
iteratorBuild.remove();
|
||||||
builtLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
builtLocations.add(new BlockIndex(slot.x, slot.y, slot.z));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.core.builders;
|
package buildcraft.core.builders;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
public interface IBuildingItemsProvider {
|
public interface IBuildingItemsProvider {
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.core.builders;
|
package buildcraft.core.builders;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
|
@ -170,15 +170,14 @@ public class RenderEngine extends TileEntitySpecialRenderer implements IInventor
|
||||||
bindTexture(chamberTexture);
|
bindTexture(chamberTexture);
|
||||||
|
|
||||||
float chamberf = 2F / 16F;
|
float chamberf = 2F / 16F;
|
||||||
|
int chamberc = ((int) step + 2) / 2;
|
||||||
|
|
||||||
for (int i = 0; i <= step + 2; i += 2) {
|
for (int i = 0; i <= step + 2; i += 2) {
|
||||||
chamber.render(factor);
|
chamber.render(factor);
|
||||||
GL11.glTranslatef(translate[0] * chamberf, translate[1] * chamberf, translate[2] * chamberf);
|
GL11.glTranslatef(translate[0] * chamberf, translate[1] * chamberf, translate[2] * chamberf);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i <= step + 2; i += 2) {
|
GL11.glTranslatef(-translate[0] * chamberf * chamberc, -translate[1] * chamberf * chamberc, -translate[2] * chamberf * chamberc);
|
||||||
GL11.glTranslatef(-translate[0] * chamberf, -translate[1] * chamberf, -translate[2] * chamberf);
|
|
||||||
}
|
|
||||||
|
|
||||||
bindTexture(trunkTexture);
|
bindTexture(trunkTexture);
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,10 @@ public class BlockTank extends BlockBuildCraft {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (current.getItem() instanceof IFluidContainerItem) {
|
} else if (current.getItem() instanceof IFluidContainerItem) {
|
||||||
|
if (current.stackSize != 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
IFluidContainerItem container = (IFluidContainerItem) current.getItem();
|
IFluidContainerItem container = (IFluidContainerItem) current.getItem();
|
||||||
FluidStack liquid = container.getFluid(current);
|
FluidStack liquid = container.getFluid(current);
|
||||||
|
|
|
@ -147,4 +147,9 @@ public class BlockLaser extends BlockBuildCraft implements ICustomHighlight {
|
||||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue