-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f6fbf2
commit 28b6307
Showing
5 changed files
with
52 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ava/net/ccbluex/liquidbounce/features/module/modules/movement/jesus/other/NoFluidJesus.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,34 @@ | ||
package net.ccbluex.liquidbounce.features.module.modules.movement.jesus.other | ||
|
||
import net.ccbluex.liquidbounce.event.EventTarget | ||
import net.ccbluex.liquidbounce.event.UpdateEvent | ||
import net.ccbluex.liquidbounce.features.module.modules.movement.jesus.JesusMode | ||
import net.ccbluex.liquidbounce.features.value.BoolValue | ||
import net.ccbluex.liquidbounce.utils.PacketUtils | ||
import net.ccbluex.liquidbounce.utils.block.BlockUtils | ||
import net.minecraft.init.Blocks.lava | ||
import net.minecraft.init.Blocks.water | ||
import net.minecraft.network.play.client.C07PacketPlayerDigging | ||
import net.minecraft.util.EnumFacing | ||
|
||
class NoFluidJesus : JesusMode("NoFluid") { | ||
private val grim = BoolValue("Grim", false) | ||
|
||
@EventTarget | ||
override fun onUpdate(event: UpdateEvent) { | ||
if (grim.get()) { | ||
val searchBlocks = BlockUtils.searchBlocks(2, setOf(water, lava)) | ||
for (block in searchBlocks) { | ||
val blockpos = block.key | ||
//TODO:only do this for blocks that player touched | ||
PacketUtils.sendPacket( | ||
C07PacketPlayerDigging( | ||
C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK, | ||
blockpos, | ||
EnumFacing.DOWN | ||
) | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters