Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
matsu1213 committed Jun 21, 2024
1 parent e0c5f15 commit c28b0fa
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void onShoot(WeaponShootEvent e){
Class<Entity> clazz = Entity.class;
Field f = clazz.getDeclaredField("size");
f.setAccessible(true);
f.set(pj, new EntitySize((float) data.projectileSizeXZ - 1.0f, (float) data.projectileSizeY - 1.0f, false));
f.set(pj, new EntitySize((float) data.projectileSizeXZ, (float) data.projectileSizeY, true));
pj.setPosition(pj.locX(), pj.locY(), pj.locZ());
e.getPlayer().sendMessage(pj.getBoundingBox().toString());
}catch (Exception ex){
Expand All @@ -33,11 +33,4 @@ public void onShoot(WeaponShootEvent e){
}
}

@EventHandler
public void onDamage(WeaponDamageEntityEvent e){
if(e.getDamager() instanceof Projectile){
e.getPlayer().sendMessage(((CraftProjectile)e.getDamager()).getHandle().getBoundingBox().toString());
}
}

}

0 comments on commit c28b0fa

Please sign in to comment.