fix funnies

This commit is contained in:
Jess H 2024-06-01 02:17:13 +01:00 committed by TudbuT
parent 293e7fddc1
commit 1a852a06a3
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 10 additions and 1 deletions

View file

@ -19,7 +19,10 @@ public class FastBreak extends Feature {
}
@Config("Mode")
Mode mode = Mode.Damage;
public Mode mode = Mode.Damage;
@Config("NoBreakDelay")
public boolean noBreakDelay;
enum Mode {
Damage,
@ -39,6 +42,9 @@ public class FastBreak extends Feature {
public void damageBlock(DamageBlockEvent event) {
if(noBreakDelay) {
((IPlayerControllerMP) (mc.playerController)).setBlockHitDelay(0);
}
if (mode == Mode.Packet) {
mc.player.swingArm(EnumHand.MAIN_HAND);
mc.player.connection.sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, event.getBlockPos(), event.getEnumFacing()));

View file

@ -11,4 +11,7 @@ public interface IPlayerControllerMP {
@Accessor("curBlockDamageMP")
void setDamage(float damage);
@Accessor("blockHitDelay")
void setBlockHitDelay(int delay);
}