Hitbox Mixin Return Value Override
Minecraft Gameplay Impact
Hooks Entity.getBoundingBox() or Entity.getTargetingMargin() via Mixin annotations (@ModifyReturnValue, @Inject) to return an inflated bounding box, making players clickable and attackable far beyond their visible character model.
Functions & APIs Analyzed
Entity.getBoundingBox
Core bounding box getter (method_5829) used in raycasting and collision.
Entity.getTargetingMargin
Collision margin getter (method_5871) added to hitboxes during raycast picking.
ModifyReturnValue / ModifyExpressionValue
Mixin annotations altering method return values.
Mod Implementation (Dev Source / Mapped)
// Developer Source (Fabric / Yarn mappings)
@Mixin(Entity.class)
public class HitboxMixin {
@ModifyReturnValue(method = "getTargetingMargin", at = @At("RETURN"))
private float expandMargin(float original) {
return original + 0.4f;
}
}
Decompiled Representation (Vineflower View)
// Decompiled with Vineflower 1.12 (Intermediary mappings)
@Mixin({class_1297.class})
public class HitboxMixin {
@ModifyReturnValue(method = {"method_5871"}, at = @At("RETURN"))
private float expandMargin(float original) {
return original + 0.4F;
}
}
Bytecode Signature & Static Detection
Detects Mixin injection annotations targeting getBoundingBox (method_5829), getTargetingMargin (method_5871), or getDimensions (method_18376).