Skip to content

Commit

Permalink
KillAura Improvements (#3085)
Browse files Browse the repository at this point in the history
  • Loading branch information
machiecodes authored Dec 21, 2022
1 parent d31695d commit 8722ef5
Show file tree
Hide file tree
Showing 2 changed files with 163 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public class CrystalAura extends Module {
.build()
);

private final Setting<Integer> placeDelay = sgPlace.add(new IntSetting.Builder()
public final Setting<Integer> placeDelay = sgPlace.add(new IntSetting.Builder()
.name("place-delay")
.description("The delay in ticks to wait to place a crystal after it's exploded.")
.defaultValue(0)
Expand Down Expand Up @@ -464,6 +464,7 @@ public class CrystalAura extends Module {
private final IntSet placedCrystals = new IntOpenHashSet();
private boolean placing;
private int placingTimer;
public int kaTimer;
private final BlockPos.Mutable placingCrystalBlockPos = new BlockPos.Mutable();

private final IntSet removed = new IntOpenHashSet();
Expand Down Expand Up @@ -502,6 +503,7 @@ public void onActivate() {

placing = false;
placingTimer = 0;
kaTimer = 0;

attacks = 0;

Expand Down Expand Up @@ -546,6 +548,8 @@ private void onPreTick(TickEvent.Pre event) {
else placing = false;
}

if (kaTimer > 0) kaTimer--;

if (ticksPassed < 20) ticksPassed++;
else {
ticksPassed = 0;
Expand Down Expand Up @@ -921,6 +925,7 @@ private void placeCrystal(BlockHitResult result, double damage, BlockPos support

placing = true;
placingTimer = 4;
kaTimer = 8;
placingCrystalBlockPos.set(result.getBlockPos()).move(0, 1, 0);

renderTimer = renderTime.get();
Expand Down
Loading

0 comments on commit 8722ef5

Please sign in to comment.