Skip to content

Commit

Permalink
Fixed drill head particles position
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Mendes committed Jan 3, 2024
1 parent ea2ea0e commit 4e9d36d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.

- Fixed item collector and reinforcement builder blocks placement.
- Fixed empty bucket not returned after lava bucket consumed.
- Fixed drill head particles position.

### Updated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,16 @@ public static void updateDrillingState(Level level, BlockPos pos, BlockState sta

@Override
public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) {
if (state.getValue(PART) == DrillHeadPart.BASE &&
state.getValue(DRILLING) &&
CaterpillarConfig.useParticles
if (state.getValue(PART) == DrillHeadPart.BIT_MIDDLE &&
state.getValue(DRILLING) &&
CaterpillarConfig.useParticles
) {
Direction direction = level.getBlockEntity(pos).getBlockState().getValue(DrillHeadBlock.FACING);
Direction.Axis direction$axis = direction.getAxis();

double x = direction$axis == Direction.Axis.X ? pos.getX() - 0.44D : pos.getX();
double x = direction$axis == Direction.Axis.X ? pos.getX() + 0.44D : pos.getX();
double y = pos.getY();
double z = direction$axis == Direction.Axis.Z ? pos.getZ() - 0.44D : pos.getZ();
double z = direction$axis == Direction.Axis.Z ? pos.getZ() + 0.44D : pos.getZ();

for (int i = 0; i < 10; i++) {
double randomDefault = level.getRandom().nextDouble() * (2.0D + 1.0D) - 1.0D;
Expand Down

0 comments on commit 4e9d36d

Please sign in to comment.