Wow, thank you soo much!! I ended up managing to create my mob, register it, render it, create its egg etc etc.
I was going to open another thread but since we are here (and the topic fits) I would like to ask how could you
find non-living entities. I know you can get the nearest living entity like this:
this.mob.level.getNearestEntity(this.mob.level.getEntitiesOfClass(this.targetType, this.getTargetSearchArea(this.getFollowDistance()), (e) -> {return true;}), this.targetConditions, this.mob, this.mob.getX(), this.mob.getEyeY(), this.mob.getZ()));
But thats only for living creatures.
The mob (Animated Armor) should be a "floating armor" that attacks players if they are close and if not, then return to their armor standing. If its armor standing is destroyed, it should find the nearest armor standing.
Also...
The armor layer should be "bigger" than the skin, but for some reason (maybe the copy paste from piglins code), mine isnt.
public class AnimatedArmorRenderer extends HumanoidMobRenderer<AnimatedArmor, AnimatedArmorModel> {
private static final ResourceLocation TEXTURE = new ResourceLocation(Rift.MODID, "textures/entity/animated_armor.png");
public AnimatedArmorRenderer (EntityRendererProvider.Context context)
{
super(context, new AnimatedArmorModel(context.bakeLayer(AnimatedArmorModel.ANIMATED_ARMOR_LAYER)), 0f);
this.addLayer(new HumanoidArmorLayer<>(this, new HumanoidModel(context.bakeLayer(AnimatedArmorModel.ANIMATED_ARMOR_LAYER)), new HumanoidModel(context.bakeLayer(AnimatedArmorModel.ANIMATED_ARMOR_LAYER))));
}
@Nonnull
@Override
public ResourceLocation getTextureLocation (AnimatedArmor entity)
{
return TEXTURE;
}
}
As I said I dont like asking people for code, but god... I have spent maaaaanyy hours looking for documentation, comparing vanilla code, etc... and not much progress was done.
One last question, where did you learn all that? Experience I guess (?)