Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoLeggedCat committed Jan 1, 2022
1 parent d4137ca commit e853423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/me/twoleggedcat/bettercats/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onInventoryOpen(InventoryOpenEvent e) {
if (inv.getType() == InventoryType.CHEST) {
Collection<Entity> entities = e.getPlayer().getWorld().getNearbyEntities(e.getPlayer().getLocation(), 10, 10, 10);
for (Entity entity : entities) {
if (Math.random() < 0.15 && entity instanceof Cat cat) {
if (entity instanceof Cat cat && Math.random() < 0.15) {
if (!cat.hasLineOfSight(inv.getLocation()))
return;
cat.lookAt(inv.getLocation());
Expand Down

0 comments on commit e853423

Please sign in to comment.