Restore config option to make filler/builder drop blocks, fixes #2692
This commit is contained in:
parent
adaab2ed3c
commit
c686cf7e8d
4 changed files with 20 additions and 1 deletions
|
@ -78,6 +78,7 @@ color.yellow=Yellow
|
|||
config.general=General
|
||||
config.general.pipes=Pipes
|
||||
config.blueprints=Blueprints
|
||||
config.builders=Builders
|
||||
config.power=Power Usage
|
||||
config.experimental=Experimental
|
||||
config.display=Display
|
||||
|
@ -89,6 +90,8 @@ config.blueprints.clientDatabaseDirectory=Client directory
|
|||
config.blueprints.excludedMods=Excluded mods
|
||||
config.blueprints.excludedBlocks=Excluded blocks
|
||||
|
||||
config.builders.dropBrokenBlocks=Drop broken blocks
|
||||
|
||||
config.display.colorBlindMode=Colorblind mode
|
||||
config.display.hideFluidValues=Hide fluid numbers
|
||||
config.display.hidePowerValues=Hide power numbers
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
Additions:
|
||||
|
||||
* [#2692] Restore config option to make filler/builder drop blocks (hea3ven)
|
||||
|
||||
Bugs fixed:
|
||||
|
||||
* [#2730] Fix integration table using energy when it has an invalid recipe (hea3ven)
|
||||
|
|
|
@ -239,6 +239,8 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
BuildCraftCore.mainConfigManager.register("general.quarry.oneTimeUse", false, "Should the quarry only be usable once after placing?", ConfigManager.RestartRequirement.NONE);
|
||||
BuildCraftCore.mainConfigManager.register("general.quarry.doChunkLoading", true, "Should the quarry keep the chunks it is working on loaded?", ConfigManager.RestartRequirement.NONE);
|
||||
|
||||
BuildCraftCore.mainConfigManager.register("builders.dropBrokenBlocks", false, "Should the builder and filler drop the cleared blocks?", ConfigManager.RestartRequirement.NONE);
|
||||
|
||||
BuildCraftCore.mainConfigManager.get("blueprints.serverDatabaseDirectory").setShowInGui(false);
|
||||
BuildCraftCore.mainConfigManager.get("general.markerRange").setMinValue(8).setMaxValue(64);
|
||||
|
||||
|
@ -278,6 +280,8 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
|
||||
DefaultProps.MARKER_RANGE = BuildCraftCore.mainConfigManager.get("general.markerRange").getInt();
|
||||
|
||||
dropBrokenBlocks = BuildCraftCore.mainConfigManager.get("builders.dropBrokenBlocks").getBoolean();
|
||||
|
||||
if (BuildCraftCore.mainConfiguration.hasChanged()) {
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
}
|
||||
|
|
|
@ -16,8 +16,11 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.blueprints.BuildingPermission;
|
||||
import buildcraft.api.blueprints.IBuilderContext;
|
||||
import buildcraft.api.blueprints.MappingNotFoundException;
|
||||
|
@ -29,6 +32,7 @@ import buildcraft.api.blueprints.SchematicMask;
|
|||
import buildcraft.api.core.BCLog;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.core.lib.inventory.StackHelper;
|
||||
import buildcraft.core.lib.utils.BlockUtils;
|
||||
|
||||
public class BuildingSlotBlock extends BuildingSlot {
|
||||
|
||||
|
@ -56,7 +60,11 @@ public class BuildingSlotBlock extends BuildingSlot {
|
|||
public void writeToWorld(IBuilderContext context) {
|
||||
if (mode == Mode.ClearIfInvalid) {
|
||||
if (!getSchematic().isAlreadyBuilt(context, x, y, z)) {
|
||||
context.world().setBlockToAir(x, y, z);
|
||||
if (BuildCraftBuilders.dropBrokenBlocks) {
|
||||
BlockUtils.breakBlock((WorldServer) context.world(), x, y, z);
|
||||
} else {
|
||||
context.world().setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue