cn.nukkit.entity.data.FloatEntityData Maven / Gradle / Ivy
package cn.nukkit.entity.data;
import cn.nukkit.entity.Entity;
/**
* @author MagicDroidX (Nukkit Project)
*/
public class FloatEntityData extends EntityData {
public float data;
public FloatEntityData(int id, float data) {
super(id);
this.data = data;
}
@Override
public Float getData() {
return data;
}
@Override
public void setData(Float data) {
if (data == null) {
this.data = 0;
} else {
this.data = data;
}
}
@Override
public int getType() {
return Entity.DATA_TYPE_FLOAT;
}
@Override
public String toString() {
return data + "f";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy