Всем привет,как сделать чтобы такой ентити
имел урон не 6,а 5-6,чтобы с шансом наносился либо 5 либо 6
Java:
public class EntityM extends EntityThrowable {
public EntityM(World world) {
super(world);
}
public EntityM(World world, EntityLivingBase entity) {
super(world, entity);
}
@Override
public void onImpact(MovingObjectPosition mop) {
switch(mop.typeOfHit) {
case ENTITY:
if (mop.entityHit != null)
mop.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 6.0F);
break;
default:break;
}
this.setDead();
}
}