Skip to content

Commit

Permalink
fix laser again ?
Browse files Browse the repository at this point in the history
  • Loading branch information
Leclowndu93150 committed Sep 7, 2024
1 parent 4fa36e6 commit e28f95b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiB
Object2IntMap<Direction> laserDistances = blockEntity.getLaserDistances();
for (Direction direction : blockEntity.getLaserOutputs()) {
int laserDistance = laserDistances.getOrDefault(direction, 0);
BlockPos targetPos = originPos.relative(direction, laserDistance-2);
BlockPos targetPos = originPos.relative(direction, laserDistance-1);
if(laserDistance != 0){
LaserRendererHelper.renderOuterBeam(blockEntity, originPos, targetPos, direction, poseStack, bufferSource, partialTick);
}
Expand All @@ -43,7 +43,7 @@ public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiB
}
if(laserDistance != 0){
LaserRendererHelper.renderInnerBeam(poseStack, bufferSource, partialTick, blockEntity.getLevel().getGameTime(),
0, laserDistance-1, FastColor.ARGB32.color(202, 214, 224));
0, laserDistance, FastColor.ARGB32.color(202, 214, 224));
}
}
poseStack.popPose();
Expand Down

0 comments on commit e28f95b

Please sign in to comment.