001/* 002 * Trident - A Multithreaded Server Alternative 003 * Copyright 2014 The TridentSDK Team 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package net.tridentsdk.server.entity.living; 018 019import net.tridentsdk.base.Position; 020import net.tridentsdk.entity.living.Player; 021import net.tridentsdk.entity.living.Villager; 022import net.tridentsdk.entity.types.EntityType; 023import net.tridentsdk.entity.types.VillagerCareer; 024import net.tridentsdk.entity.types.VillagerProfession; 025import net.tridentsdk.event.entity.EntityDamageEvent; 026import net.tridentsdk.inventory.trade.Trade; 027import net.tridentsdk.server.entity.TridentLivingEntity; 028 029import java.util.Collection; 030import java.util.UUID; 031 032/** 033 * Represents a Villager 034 * 035 * @author The TridentSDK Team 036 */ 037public class TridentVillager extends TridentLivingEntity implements Villager { 038 private volatile VillagerCareer career; 039 private volatile VillagerProfession role; 040 041 public TridentVillager(UUID uuid, Position spawnPosition, VillagerCareer career, VillagerProfession role) { 042 super(uuid, spawnPosition); 043 this.career = career; 044 this.role = role; 045 } 046 047 @Override 048 public VillagerProfession profession() { 049 return role; 050 } 051 052 @Override 053 public void setProfession(VillagerProfession profession) { 054 this.role = profession; 055 } 056 057 @Override 058 public VillagerCareer career() { 059 return career; 060 } 061 062 @Override 063 public void setCareer(VillagerCareer career) { 064 this.career = career; 065 } 066 067 @Override 068 public int careerLevel() { 069 return 0; 070 } 071 072 @Override 073 public int age() { 074 return 0; 075 } 076 077 @Override 078 public void setAge(int ticks) { 079 080 } 081 082 @Override 083 public boolean canBreed() { 084 return false; 085 } 086 087 @Override 088 public boolean isInLove() { 089 return false; 090 } 091 092 @Override 093 public EntityDamageEvent lastDamageEvent() { 094 return null; 095 } 096 097 @Override 098 public Player lastPlayerDamager() { 099 return null; 100 } 101 102 @Override 103 public Collection<Trade> trades() { 104 return null; 105 } 106 107 @Override 108 public EntityType type() { 109 return EntityType.VILLAGER; 110 } 111}