This commit is contained in:
Adrian 2015-08-08 16:14:55 +02:00
parent a5e61ad767
commit d5f75bd23e
13 changed files with 37 additions and 30 deletions

View file

@ -1,5 +1,6 @@
Improvements:
* Flood Gates now have configurable sides. No idea when I fixed that, but it works now. (asie)
* Lists
* Lists now accept empty Lists for sorting (asie)
* Minor GUI tweaks (asie)

View file

@ -230,10 +230,6 @@ public class BuildCraftBuilders extends BuildCraftMod {
reloadConfig(ConfigManager.RestartRequirement.GAME);
// TODO
//Property dropBlock = BuildCraftCore.mainConfiguration.get("general", "builder.dropBrokenBlocks", false, "set to true to force the builder to drop broken blocks");
//dropBrokenBlocks = dropBlock.getBoolean(false);
Property printSchematicList = BuildCraftCore.mainConfiguration.get("debug", "printBlueprintSchematicList", false);
debugPrintSchematicList = printSchematicList.getBoolean();
}

View file

@ -123,7 +123,6 @@ public class BuildCraftEnergy extends BuildCraftMod {
BuildcraftFuelRegistry.fuel = FuelManager.INSTANCE;
BuildcraftFuelRegistry.coolant = CoolantManager.INSTANCE;
// TODO: Reload configs without having to close the game
int oilDesertBiomeId = BuildCraftCore.mainConfigManager.register("worldgen.biomes",
"biomeOilDesert", DefaultProps.BIOME_OIL_DESERT, "The id for the Oil Desert biome",
RestartRequirement.GAME).getInt();

View file

@ -77,9 +77,11 @@ import buildcraft.transport.ItemFacade;
import buildcraft.transport.ItemGateCopier;
import buildcraft.transport.ItemPipe;
import buildcraft.transport.ItemPipeWire;
import buildcraft.transport.LensFilterHandler;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeActionProvider;
import buildcraft.transport.PipeColoringRecipe;
import buildcraft.transport.PipeEventBus;
import buildcraft.transport.PipeIconProvider;
import buildcraft.transport.PipeTriggerProvider;
import buildcraft.transport.TileFilteredBuffer;
@ -480,6 +482,8 @@ public class BuildCraftTransport extends BuildCraftMod {
}
}
PipeEventBus.registerGlobalHandler(new LensFilterHandler());
BCCreativeTab.get("pipes").setIcon(new ItemStack(BuildCraftTransport.pipeItemsDiamond, 1));
BCCreativeTab.get("facades").setIcon(facadeItem.getFacadeForBlock(Blocks.brick_block, 0));
if (Loader.isModLoaded("BuildCraft|Silicon")) {

View file

@ -44,6 +44,8 @@ import buildcraft.core.lib.utils.NetworkUtils;
import buildcraft.core.lib.utils.Utils;
public class TileArchitect extends TileBuildCraft implements IInventory, IBoxProvider, ICommandReceiver, ILEDProvider {
public enum Mode {
EDIT, COPY
}
@ -66,6 +68,11 @@ public class TileArchitect extends TileBuildCraft implements IInventory, IBoxPro
box.kind = Kind.BLUE_STRIPES;
}
public void storeBlueprintStack(ItemStack blueprintStack) {
setInventorySlotContents(1, blueprintStack);
decrStackSize(0, 1);
}
@Override
public void updateEntity() {
super.updateEntity();

View file

@ -23,9 +23,7 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.WorldSettings.GameType;
import cpw.mods.fml.relauncher.Side;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
@ -47,7 +45,6 @@ import buildcraft.builders.blueprints.RecursiveBlueprintBuilder;
import buildcraft.core.Box;
import buildcraft.core.Box.Kind;
import buildcraft.core.LaserData;
import buildcraft.core.TilePathMarker;
import buildcraft.core.blueprints.Blueprint;
import buildcraft.core.blueprints.BlueprintBase;
import buildcraft.core.blueprints.BptBuilderBase;
@ -254,18 +251,7 @@ public class TileBuilder extends TileAbstractBuilder implements IHasWork, IFluid
if (tile instanceof IPathProvider) {
path = ((IPathProvider) tile).getPath();
// TODO (7.1): Add API method for IPathProviders to remove
// themselves from world like IAreaProviders.
if (tile instanceof TilePathMarker) {
for (BlockIndex b : path) {
BuildCraftCore.pathMarkerBlock.dropBlockAsItem(
worldObj, b.x, b.y, b.z,
0, 0);
worldObj.setBlockToAir(b.x, b.y, b.z);
}
}
((IPathProvider) tile).removeFromWorld();
break;
}

View file

@ -213,10 +213,7 @@ public class RecursiveBlueprintReader {
BuildCraftBuilders.serverDB.add(writingBlueprint.id, nbt);
if (parentBlueprint == null) {
// TODO: This is hacky, should probably be done in the architect
// itself.
architect.setInventorySlotContents(1, writingBlueprint.getStack());
architect.setInventorySlotContents(0, null);
architect.storeBlueprintStack(writingBlueprint.getStack());
}
}

View file

@ -11,6 +11,7 @@ package buildcraft.core;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import io.netty.buffer.ByteBuf;
@ -18,6 +19,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import buildcraft.BuildCraftCore;
import buildcraft.api.core.BlockIndex;
import buildcraft.api.core.IPathProvider;
import buildcraft.api.core.Position;
@ -326,4 +328,16 @@ public class TilePathMarker extends TileMarker implements IPathProvider {
lasers[1].writeData(data);
}
}
@Override
public void removeFromWorld() {
List<BlockIndex> path = getPath();
for (BlockIndex b : path) {
BuildCraftCore.pathMarkerBlock.dropBlockAsItem(
worldObj, b.x, b.y, b.z,
0, 0);
worldObj.setBlockToAir(b.x, b.y, b.z);
}
}
}

View file

@ -96,7 +96,6 @@ public class CoreProxyClient extends CoreProxy {
RenderingRegistry.registerBlockHandler(BuildCraftCore.complexBlockModel, new RenderBlockComplex());
ClientRegistry.bindTileEntitySpecialRenderer(TilePathMarker.class, new RenderPathMarker());
//TODO Update me to grab differing trunk textures
ClientRegistry.bindTileEntitySpecialRenderer(TileEngineBase.class, new RenderEngine());
for (int i = 0; i < BuildCraftCore.engineBlock.getEngineCount(); i++) {
RenderingEntityBlocks.blockByEntityRenders.put(new RenderingEntityBlocks.EntityRenderIndex(BuildCraftCore.engineBlock, i), new RenderEngine((TileEngineBase) BuildCraftCore.engineBlock.createTileEntity(null, i)));

View file

@ -256,19 +256,23 @@ public class TileFloodGate extends TileBuildCraft implements IFluidHandler {
}
}
// TODO: fit in single byte
@Override
public void readData(ByteBuf stream) {
byte flags = stream.readByte();
for (int i = 0; i < 6; i++) {
blockedSides[i] = stream.readBoolean();
blockedSides[i] = (flags & (1 << i)) != 0;
}
}
@Override
public void writeData(ByteBuf stream) {
byte flags = 0;
for (int i = 0; i < 6; i++) {
stream.writeBoolean(blockedSides[i]);
if (blockedSides[i]) {
flags |= 1 << i;
}
}
stream.writeByte(flags);
}
public void switchSide(ForgeDirection side) {

View file

@ -10,6 +10,7 @@ package buildcraft.robotics;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.WeakHashMap;

View file

@ -66,6 +66,7 @@ public class AIRobotBreak extends AIRobot {
hardness = block.getBlockHardness(robot.worldObj, blockToBreak.x, blockToBreak.y, blockToBreak.z);
speed = getBreakSpeed(robot, robot.getHeldItem(), block, meta);
}
if (block.isAir(robot.worldObj, blockToBreak.x, blockToBreak.y, blockToBreak.z)) {
setSuccess(false);
terminate();

View file

@ -62,8 +62,6 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
this.item = item;
eventBus.registerHandler(this);
// TODO: Move to globalHandlers once a priority system is in place
eventBus.registerHandler(new LensFilterHandler());
}
public void setTile(TileEntity tile) {