use of net.minecraft.world.entity.npc.VillagerData in project MyPet by xXKeyleXx.
the class EntityMyVillager method updateVisuals.
@Override
public void updateVisuals() {
this.getEntityData().set(AGE_WATCHER, getMyPet().isBaby());
String professionKey = MyVillager.Profession.values()[getMyPet().getProfession()].getKey();
VillagerProfession profession = Registry.VILLAGER_PROFESSION.get(new ResourceLocation(professionKey));
// TODO
VillagerType type = Registry.VILLAGER_TYPE.get(new ResourceLocation(getMyPet().getType().getKey()));
this.getEntityData().set(PROFESSION_WATCHER, new VillagerData(type, profession, getMyPet().getVillagerLevel()));
}
use of net.minecraft.world.entity.npc.VillagerData in project MyPet by xXKeyleXx.
the class EntityMyVillager method updateVisuals.
@Override
public void updateVisuals() {
this.getEntityData().set(AGE_WATCHER, getMyPet().isBaby());
String professionKey = MyVillager.Profession.values()[getMyPet().getProfession()].getKey();
VillagerProfession profession = Registry.VILLAGER_PROFESSION.get(new ResourceLocation(professionKey));
// TODO
VillagerType type = Registry.VILLAGER_TYPE.get(new ResourceLocation(getMyPet().getType().getKey()));
this.getEntityData().set(PROFESSION_WATCHER, new VillagerData(type, profession, getMyPet().getVillagerLevel()));
}
use of net.minecraft.world.entity.npc.VillagerData in project MyPet by xXKeyleXx.
the class EntityMyVillager method defineSynchedData.
@Override
protected void defineSynchedData() {
super.defineSynchedData();
getEntityData().define(AGE_WATCHER, false);
if (MyPetApi.getCompatUtil().isCompatible("1.14.1")) {
getEntityData().define(UNUSED_WATCHER, 0);
}
getEntityData().define(PROFESSION_WATCHER, new VillagerData(VillagerType.PLAINS, VillagerProfession.NONE, 1));
}
use of net.minecraft.world.entity.npc.VillagerData in project MyPet by xXKeyleXx.
the class EntityMyZombieVillager method defineSynchedData.
@Override
protected void defineSynchedData() {
super.defineSynchedData();
getEntityData().define(BABY_WATCHER, false);
getEntityData().define(TYPE_WATCHER, 0);
getEntityData().define(DROWN_CONVERTING, false);
getEntityData().define(SHIVER_WATCHER, false);
getEntityData().define(PROFESSION_WATCHER, new VillagerData(VillagerType.PLAINS, VillagerProfession.NONE, 1));
}
use of net.minecraft.world.entity.npc.VillagerData in project MyPet by xXKeyleXx.
the class EntityMyZombieVillager method defineSynchedData.
@Override
protected void defineSynchedData() {
super.defineSynchedData();
getEntityData().define(BABY_WATCHER, false);
getEntityData().define(TYPE_WATCHER, 0);
getEntityData().define(DROWN_CONVERTING, false);
getEntityData().define(SHIVER_WATCHER, false);
getEntityData().define(PROFESSION_WATCHER, new VillagerData(VillagerType.PLAINS, VillagerProfession.NONE, 1));
}
Aggregations