Skip to content

Commit

Permalink
Prevented Thermoregulator from spawning particles if the face in fron…
Browse files Browse the repository at this point in the history
…t of it is solid
  • Loading branch information
Forstride committed Jan 8, 2024
1 parent e50ba87 commit 589c08a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,17 @@ public void animateTick(BlockState p_221253_, Level p_221254_, BlockPos p_221255
boolean cooling = p_221253_.getValue(COOLING);
boolean heating = p_221253_.getValue(HEATING);

if (cooling || heating)
Direction direction = p_221253_.getValue(FACING);
Direction.Axis direction$axis = direction.getAxis();
BlockPos blockpos = p_221255_.relative(direction);
BlockState blockstate = p_221254_.getBlockState(blockpos);

if ((cooling || heating) && !isFaceFull(blockstate.getCollisionShape(p_221254_, blockpos), direction.getOpposite()))
{
double d0 = (double)p_221255_.getX() + 0.5D;
double d1 = (double)p_221255_.getY() + 0.5D;
double d2 = (double)p_221255_.getZ() + 0.5D;

Direction direction = p_221253_.getValue(FACING);
Direction.Axis direction$axis = direction.getAxis();
double d4 = (p_221256_.nextDouble() * 0.3D) - (p_221256_.nextDouble() * 0.3D);
double d5 = direction$axis == Direction.Axis.X ? (double)direction.getStepX() * 0.55D : d4;
double d6 = direction$axis == Direction.Axis.Z ? (double)direction.getStepZ() * 0.55D : d4;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 589c08a

Please sign in to comment.