Merge pull request #77 from Maeyanie/master
Config option: Fillers destroy blocks
This commit is contained in:
commit
5458dde84f
3 changed files with 13 additions and 1 deletions
|
@ -80,6 +80,7 @@ public class BuildCraftBuilders {
|
|||
public static BlockBlueprintLibrary libraryBlock;
|
||||
public static ItemBptTemplate templateItem;
|
||||
public static ItemBptBluePrint blueprintItem;
|
||||
public static boolean fillerDestroy;
|
||||
|
||||
private static boolean initialized = false;
|
||||
|
||||
|
@ -124,6 +125,11 @@ public class BuildCraftBuilders {
|
|||
Property libraryId = BuildCraftCore.mainConfiguration.getOrCreateBlockIdProperty("blueprintLibrary.id",
|
||||
DefaultProps.BLUEPRINT_LIBRARY_ID);
|
||||
|
||||
Property fillerDestroyProp = BuildCraftCore.mainConfiguration.getOrCreateBooleanProperty("filler.destroy",
|
||||
Configuration.CATEGORY_GENERAL, DefaultProps.FILLER_DESTROY);
|
||||
fillerDestroyProp.comment = "If true, Filler will destroy blocks instead of breaking them.";
|
||||
fillerDestroy = Boolean.parseBoolean(fillerDestroyProp.value);
|
||||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
templateItem = new ItemBptTemplate(Integer.parseInt(templateItemId.value));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package net.minecraft.src.buildcraft.builders;
|
||||
|
||||
import net.minecraft.src.BuildCraftBlockUtil;
|
||||
import net.minecraft.src.BuildCraftBuilders;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraft.src.World;
|
||||
|
@ -95,8 +96,12 @@ public abstract class FillerPattern implements IFillerPattern {
|
|||
}
|
||||
|
||||
if (lastX != Integer.MAX_VALUE) {
|
||||
if (BuildCraftBuilders.fillerDestroy) {
|
||||
world.setBlockWithNotify(lastX, lastY, lastZ, 0);
|
||||
} else {
|
||||
BuildCraftBlockUtil.breakBlock(world, lastX, lastY, lastZ);
|
||||
}
|
||||
}
|
||||
|
||||
return lastX == Integer.MAX_VALUE;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ public class DefaultProps {
|
|||
|
||||
public static boolean CURRENT_CONTINUOUS = false;
|
||||
public static boolean PIPES_ALWAYS_CONNECT = false;
|
||||
public static boolean FILLER_DESTROY = false;
|
||||
|
||||
public static int TRIGGER_REDSTONE_ACTIVE = 1;
|
||||
public static int TRIGGER_REDSTONE_INACTIVE = 2;
|
||||
|
|
Loading…
Reference in a new issue