Added DespawnableAnimal

This commit is contained in:
Frank 2021-11-28 21:58:38 +01:00
parent cdbeede9f4
commit 0e31f9b22e

View file

@ -0,0 +1,16 @@
package ru.bclib.entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.level.Level;
public abstract class DespawnableAnimal extends Animal {
protected DespawnableAnimal(EntityType<? extends Animal> entityType, Level level) {
super(entityType, level);
}
@Override
public boolean removeWhenFarAway(double d) {
return !this.hasCustomName();
}
}