Object entityHandle = getHandle(entity); Object aabb = class_Entity_getBoundingBox.invoke(entityHandle); if (aabb == null) {
private void showEntityInfo(CommandSender sender, Entity entity, String label, NumberFormat formatter) { BoundingBox hitbox = HitboxUtils.getHitbox(entity); Vector size = hitbox.size(); String message = ChatColor.BLACK + label + ": " + ChatColor.AQUA + formatter.format(size.getX()) + ChatColor.DARK_GRAY + "x" + ChatColor.AQUA + formatter.format(size.getY()) + ChatColor.DARK_GRAY + "x" + ChatColor.AQUA + formatter.format(size.getZ()); if (entity instanceof LivingEntity) { LivingEntity li = (LivingEntity)entity; message += ChatColor.DARK_GRAY + ", " + ChatColor.GREEN + ((int)CompatibilityUtils.getMaxHealth(li)) + "hp"; } sender.sendMessage(message); }
HitboxUtils.setHitboxScale(properties.getDouble("hitbox_scale", 1.0)); HitboxUtils.setHitboxScaleY(properties.getDouble("hitbox_scale_y", 1.0)); HitboxUtils.setHitboxSneakScaleY(properties.getDouble("hitbox_sneaking_scale_y", 0.75)); if (properties.contains("hitboxes")) HitboxUtils.configureHitboxes(properties.getConfigurationSection("hitboxes")); HitboxUtils.configureHeadSizes(properties.getConfigurationSection("head_sizes")); HitboxUtils.configureMaxHeights(properties.getConfigurationSection("max_height"));
actionContext.playEffects("hit_entity"); if (hasActions("headshot") && HitboxUtils.isHeadshot(hitEntity, targetLocation)) { actionContext.getMage().sendDebugMessage(ChatColor.GOLD + " Projectile headshot", 3); return headshot();
if (entity != null) hitbox = HitboxUtils.getHitbox(entity);