Package net.citizensnpcs.npc.ai.speech
Class CitizensSpeechFactory
java.lang.Object
net.citizensnpcs.npc.ai.speech.CitizensSpeechFactory
- All Implemented Interfaces:
SpeechFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetVocalChord(Class<? extends VocalChord> clazz) Creates a new instance of a VocalChordgetVocalChord(String name) Creates a new instance of aVocalChordgetVocalChordName(Class<? extends VocalChord> clazz) Returns the registered name of aVocalChordclassbooleanisRegistered(String name) Checks whether the suppliedVocalChordname is registered.newTalkableEntity(Entity entity) Creates a new Talkable entity and returns itnewTalkableEntity(LivingEntity entity) Creates a new Talkable entity and returns itvoidregister(Class<? extends VocalChord> clazz, String name) Registers aVocalChordclass with the SpeechController, making it available for use within.
-
Constructor Details
-
CitizensSpeechFactory
public CitizensSpeechFactory()
-
-
Method Details
-
getVocalChord
Description copied from interface:SpeechFactoryCreates a new instance of a VocalChord- Specified by:
getVocalChordin interfaceSpeechFactory- Parameters:
clazz- The class of the desired VocalChord- Returns:
- a new instance of this VocalChord
-
getVocalChord
Description copied from interface:SpeechFactoryCreates a new instance of aVocalChord- Specified by:
getVocalChordin interfaceSpeechFactory- Parameters:
name- The name of the desired VocalChord- Returns:
- a new instance of this VocalChord, ornull if a VocalChord is not registered with this name
-
getVocalChordName
Description copied from interface:SpeechFactoryReturns the registered name of aVocalChordclass- Specified by:
getVocalChordNamein interfaceSpeechFactory- Parameters:
clazz- The VocalChord class- Returns:
- the registered name, null if not registered
-
isRegistered
Description copied from interface:SpeechFactoryChecks whether the suppliedVocalChordname is registered.- Specified by:
isRegisteredin interfaceSpeechFactory- Parameters:
name- The name of the VocalChord to check- Returns:
- true if the VocalChord name is registered
-
newTalkableEntity
Description copied from interface:SpeechFactoryCreates a new Talkable entity and returns it- Specified by:
newTalkableEntityin interfaceSpeechFactory- Parameters:
entity- the entity to use- Returns:
- a Talkable entity
-
newTalkableEntity
Description copied from interface:SpeechFactoryCreates a new Talkable entity and returns it- Specified by:
newTalkableEntityin interfaceSpeechFactory- Parameters:
entity- the livingEntity to use- Returns:
- a Talkable entity
-
register
Description copied from interface:SpeechFactoryRegisters aVocalChordclass with the SpeechController, making it available for use within. Requires a 'name', which should generally describe the intent of the VocalChord.- Specified by:
registerin interfaceSpeechFactory- Parameters:
clazz- The VocalChord classname- The name of the VocalChord
-