mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 16:39:49 +00:00
Added MarkovNameGenerator, Added Disable Body Part Feature
Two New Features >> + Added Markov Name Generate + Corrected Hide Body Parts
This commit is contained in:
1 parent
f155ef2481
commit
3a36be0ae4
47 files changed
+14517
-93
No files matched your search
@@ -0,0 +1,46 @@
|
||||
package nikedemos.markovnames.generators;
|
||||
|
||||
import nikedemos.markovnames.MarkovDictionary;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MarkovGenerator {
|
||||
|
||||
public MarkovDictionary markov;
|
||||
public Random rng;
|
||||
public String name;
|
||||
public String symbol;
|
||||
|
||||
public MarkovGenerator(int seqlen, Random rng)
|
||||
{
|
||||
this.rng = rng;
|
||||
}
|
||||
|
||||
public MarkovGenerator(int seqlen)
|
||||
{
|
||||
this(seqlen, new Random());
|
||||
}
|
||||
|
||||
public MarkovGenerator()
|
||||
{
|
||||
this(3, new Random());
|
||||
}
|
||||
|
||||
public String fetch(int gender) {
|
||||
return stylize(markov.generateWord());
|
||||
}
|
||||
|
||||
public String fetch()
|
||||
{
|
||||
return fetch(0); //0 = random gender, 1 = male, 2 = female
|
||||
}
|
||||
|
||||
public String stylize(String str)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
|
||||
public String feminize(String element, boolean flag) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user