Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void createPet(Player p, EntityType pets) {
- Entity pet = p.getWorld().spawnEntity(getPetLoc(p), pets);
- if(pet instanceof Animals){
- ((Animals) pet).setBaby();
- ((Animals) pet).setAI(false);
- ((Animals) pet).setCanPickupItems(false);
- ((Animals) pet).setCollidable(false);
- pet.setSilent(true);
- }
- if(pet instanceof Monster){
- ((Ageable) pet).setBaby();
- ((Monster) pet).setAI(false);
- ((Monster) pet).setCanPickupItems(false);
- ((Monster) pet).setCollidable(false);
- pet.setSilent(true);
- }
- if(pet instanceof ArmorStand){
- ((ArmorStand) pet).setArms(false);
- ((ArmorStand) pet).setBasePlate(false);
- ((ArmorStand) pet).setSmall(true);
- ((ArmorStand) pet).setCanPickupItems(false);
- ((ArmorStand) pet).setCollidable(false);
- ((ArmorStand) pet).setVisible(true);
- }
- pet.setInvulnerable(true);
- pet.setGravity(false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement