
net.minecraft.server.EntityComplexPart Maven / Gradle / Ivy
package net.minecraft.server;
import org.bukkit.entity.ComplexEntityPart;
import org.jetbrains.annotations.NotNull;
public class EntityComplexPart extends Entity {
public final IComplex owner;
public final String b;
public EntityComplexPart(IComplex icomplex, String s, float f, float f1) {
super(icomplex.a());
this.setSize(f, f1);
this.owner = icomplex;
this.b = s;
}
@NotNull
@Override
public ComplexEntityPart getEntityBukkit() {
return (ComplexEntityPart) super.getEntityBukkit();
}
protected void entityInit() {
}
protected void loadEntityData(NBTTagCompound tag) {
}
protected void saveEntityData(NBTTagCompound tag) {
}
public boolean canBeCollidedWith() {
return true;
}
public boolean damageEntity(DamageSource damagesource, float f) {
return !this.isInvulnerable(damagesource) && this.owner.a(this, damagesource, f);
}
public boolean isEntityEqual(Entity entity) {
return this == entity || this.owner == entity;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy