Skip to content

Commit

Permalink
Fix CCB constructor for DynamicHitboxFence
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Nov 24, 2024
1 parent 5f7d296 commit 9bd5c2d
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 9bd5c2d

Please sign in to comment.