Skip to content

Commit

Permalink
Quote movement code
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Nov 6, 2024
1 parent 685af97 commit f578f36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static TickResult getRequiredMiningTicks(
// If this value adds up over all ticks to 1, the block is fully mined
var damage = getBlockDamagePerTick(tagsState, entity, onGround, itemStack, blockType);

var creativeMode = entity != null && entity.abilities().instabuild();
var creativeMode = entity != null && entity.abilitiesData().instabuild();
var willDropUsableBlockItem = correctToolUsed && !creativeMode && BlockTypeHelper.isUsableBlockItem(blockType);

// Insta mine
Expand All @@ -159,7 +159,7 @@ private static float getBlockDamagePerTick(TagsState tagsState,
boolean onGround,
@Nullable SFItemStack itemStack,
BlockType blockType) {
if (entity != null && entity.abilities().instabuild()) {
if (entity != null && entity.abilitiesData().instabuild()) {
// We instantly break any block in creative mode
return 1.0F;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public PathConstraint(BotConnection botConnection) {
}

public boolean doUsableBlocksDecreaseWhenPlaced() {
return entity == null || !entity.abilities().instabuild();
return entity == null || !entity.abilitiesData().instabuild();
}

public boolean isPlaceable(SFItemStack item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ private void playerTick() {
private void livingEntityTick() {
super.tick();

this.aiStep();
// this.aiStep();

if (this.isFallFlying()) {
this.fallFlyTicks++;
} else {
this.fallFlyTicks = 0;
}
// if (this.isFallFlying()) {
// this.fallFlyTicks++;
// else {
// this.fallFlyTicks = 0;
// }

if (this.isSleeping()) {
this.xRot(0.0F);
Expand Down Expand Up @@ -238,10 +238,6 @@ private void sendIsSprintingIfNeeded() {
}
}

public AbilitiesData abilities() {
return dataManager.abilitiesData();
}

public void jump() {
jumpTriggerTime = 7;
}
Expand Down

0 comments on commit f578f36

Please sign in to comment.