Files
CustomNPC-Plus/src/main/java/noppes/npcs/scripted/roles/ScriptJobBard.java
T
Luis C.M e9a8f8cebc Added several more functions to pre-existing classes:
-Spawner, Transport, Healer, Guard, Bard jobs received more functions.
-Added more functions to the transporter role.
-IRole: Added getNpc() function.
-IAnimal, IEntityLiving, and IEntityLivingBase received more functions from their MC counterparts.
-Nearly every function with that takes position/vector parameters now has an equivalent with IPos as a parameter instead.
2022-11-05 20:19:14 -05:00

80 lines
1.6 KiB
Java

package noppes.npcs.scripted.roles;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.roles.JobBard;
import noppes.npcs.scripted.constants.JobType;
import noppes.npcs.scripted.interfaces.jobs.IJobBard;
public class ScriptJobBard extends ScriptJobInterface implements IJobBard {
private JobBard job;
public ScriptJobBard(EntityNPCInterface npc){
super(npc);
this.job = (JobBard) npc.jobInterface;
}
@Override
public int getType(){
return JobType.BARD;
}
/**
* @return The song the bard is playing
*/
public String getSong(){
return job.song;
}
/**
* @param song The song you want the bard to play
*/
public void setSong(String song){
job.song = song;
npc.script.clientNeedsUpdate = true;
}
/**
*
* @param i The id of the instrument. IDs:
* 0 - None,
* 1 - Banjo,
* 2 - Violin,
* 3 - Guitar,
* 4 - Harp,
* 5 - FrenchHorn
*/
public void setInstrument(int i) {
this.job.setInstrument(i);
}
public int getInstrumentId() {
return this.job.getInstrument().ordinal();
}
public void setMinRange(int range) {
this.job.minRange = range;
}
public int getMinRange() {
return this.job.minRange;
}
public void setMaxRange(int range) {
this.job.maxRange = range;
}
public int getMaxRange() {
return this.job.maxRange;
}
public void setStreaming(boolean streaming) {
this.job.isStreamer = streaming;
}
public boolean getStreaming() {
return this.job.isStreamer;
}
public void hasOffRange(boolean value) {
this.job.hasOffRange = value;
}
public boolean hasOffRange() {
return this.job.hasOffRange;
}
}