Skip to content

Commit

Permalink
Use getters to avoid NPEs
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 1, 2025
1 parent 84b79e0 commit b7af2f9
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ private void configVillager(Villager v) {
*/
public void configureEntity(Entity e) {
// Set the general states
e.setGlowing(glowing);
e.setGravity(gravity);
e.setVisualFire(visualFire);
e.setSilent(silent);
e.setInvulnerable(invulnerable);
e.setFireTicks(fireTicks);
e.setGlowing(isGlowing());
e.setGravity(isGravity());
e.setVisualFire(isVisualFire());
e.setSilent(isSilent());
e.setInvulnerable(isInvulnerable());
e.setFireTicks(getFireTicks());

if (e instanceof Villager villager) {
setVillager(villager);
Expand Down

0 comments on commit b7af2f9

Please sign in to comment.