Skip to content

Commit

Permalink
Merge pull request #1821 from Axionize/fix-complex-fence-boxes
Browse files Browse the repository at this point in the history
Fix CCB constructor for DynamicHitboxFence
  • Loading branch information
SamB440 authored Nov 24, 2024
2 parents 954eb8b + 9bd5c2d commit 1ef4b4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.github.retrooper.packetevents.protocol.world.states.type.StateType;
import com.github.retrooper.packetevents.protocol.world.states.type.StateTypes;


public class DynamicHitboxFence extends DynamicConnecting implements HitBoxFactory {
private static final CollisionBox[] MODERN_HITBOXES = makeShapes(2.0F, 2.0F, 24.0F, 0.0F, 24.0F, true, 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public ComplexCollisionBox(int maxIndex) {

public ComplexCollisionBox(int maxIndex, SimpleCollisionBox... boxes) {
this.boxes = new SimpleCollisionBox[maxIndex];
System.arraycopy(boxes, 0, this.boxes, 0, Math.min(maxIndex, boxes.length));
currentLength = boxes.length;
currentLength = Math.min(maxIndex, boxes.length);
System.arraycopy(boxes, 0, this.boxes, 0, this.currentLength);
}

public boolean add(SimpleCollisionBox collisionBox) {
Expand Down

0 comments on commit 1ef4b4e

Please sign in to comment.