Use getters to avoid NPEs

This commit is contained in:
tastybento 2024-12-31 21:10:35 -08:00
parent 84b79e0111
commit b7af2f9008

View File

@ -223,12 +223,12 @@ public class BlueprintEntity {
*/ */
public void configureEntity(Entity e) { public void configureEntity(Entity e) {
// Set the general states // Set the general states
e.setGlowing(glowing); e.setGlowing(isGlowing());
e.setGravity(gravity); e.setGravity(isGravity());
e.setVisualFire(visualFire); e.setVisualFire(isVisualFire());
e.setSilent(silent); e.setSilent(isSilent());
e.setInvulnerable(invulnerable); e.setInvulnerable(isInvulnerable());
e.setFireTicks(fireTicks); e.setFireTicks(getFireTicks());
if (e instanceof Villager villager) { if (e instanceof Villager villager) {
setVillager(villager); setVillager(villager);