Package net.minecraft.entity.passive

Examples of net.minecraft.entity.passive.EntityVillager.writeEntityToNBT()


                    if(entity instanceof EntityVillager) {
                        EntityVillager villager = (EntityVillager)entity;
                        if(villager.getProfession() != Config.villagerMechanicID) {
                            villager.setProfession(Config.villagerMechanicID);
                            NBTTagCompound tag = new NBTTagCompound();
                            villager.writeEntityToNBT(tag);
                            if(tag.hasKey("Offers")) {//reset the trade list
                                tag.removeTag("Offers");
                                villager.readEntityFromNBT(tag);
                            }
                        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.