diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java index b4c8243d6..d1d150456 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigBoolValues.java @@ -49,7 +49,8 @@ public enum ConfigBoolValues{ LASER_RELAY_LOSS("Laser Relay Energy Loss", ConfigCategories.MACHINE_VALUES, true, "If Energy Laser Relays should have energy loss"), - SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)"); + SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)"), + ENABLE_DRILL_DIGGING_PACKET("Drill Digging Packet", ConfigCategories.OTHER, false, "If this is set to true, breaking a block with the Drill will send an additional packet to the server notifying that the block is being broken. This reduces the amount of ghost blocks being created, however it results in a higher connection load and it could also change the behavior of some blocks being broken."); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 46172671c..54dc63ad9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.util; import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; @@ -405,8 +406,10 @@ public final class WorldUtil{ player.setHeldItem(EnumHand.MAIN_HAND, null); } - Minecraft mc = Minecraft.getMinecraft(); - mc.getConnection().sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.STOP_DESTROY_BLOCK, pos, mc.objectMouseOver.sideHit)); + if(ConfigBoolValues.ENABLE_DRILL_DIGGING_PACKET.isEnabled()){ + Minecraft mc = Minecraft.getMinecraft(); + mc.getConnection().sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.STOP_DESTROY_BLOCK, pos, mc.objectMouseOver.sideHit)); + } return true; }