Update EntityValue.java

This commit is contained in:
ch-yx authored and gnembon committed 2022-08-28 18:59:11 +02:00
1 parent d1cfe79fdd
commit f93bd36199
1 file changed
+4 -4
@@ -524,13 +524,13 @@ public class EntityValue extends Value
put("age", (e, a) -> new NumericValue(e.tickCount));
put("breeding_age", (e, a) -> e instanceof AgeableMob?new NumericValue(((AgeableMob) e).getAge()):Value.NULL);
put("despawn_timer", (e, a) -> e instanceof LivingEntity?new NumericValue(((LivingEntity) e).getNoActionTime()):Value.NULL);
put("skull_dangerous",(e,a)->{
put("blue_skull",(e,a)->{
if (e instanceof WitherSkull w){
return BooleanValue.of(w.isDangerous());
}
return Value.NULL;
});
put("offer_flower",(e,a)->{
put("offering_flower",(e,a)->{
if (e instanceof IronGolem ig){
return BooleanValue.of(ig.getOfferFlowerTick()>0);
}
@@ -1688,13 +1688,13 @@ public class EntityValue extends Value
}
});
put("skull_dangerous",(e,v)->{
put("blue_skull",(e,v)->{
if (e instanceof WitherSkull w){
w.setDangerous(v.getBoolean());
}
});
put("offer_flower",(e,v)->{
put("offering_flower",(e,v)->{
if (e instanceof IronGolem ig){
ig.offerFlower(v.getBoolean());
}