public abstract class BreedingTracker extends net.minecraft.world.storage.WorldSavedData implements IBreedingTracker
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_KEY |
| Modifier | Constructor and Description |
|---|---|
protected |
BreedingTracker(java.lang.String s,
java.lang.String defaultModeName) |
| Modifier and Type | Method and Description |
|---|---|
void |
decodeFromNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound) |
void |
encodeToNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound) |
protected abstract IBreedingTracker |
getBreedingTracker(net.minecraft.entity.player.EntityPlayer player)
Returns the common tracker
|
java.util.Set<java.lang.String> |
getDiscoveredSpecies() |
java.lang.String |
getModeName() |
int |
getSpeciesBred() |
boolean |
isDiscovered(IAlleleSpecies species)
Queries the tracker for discovered species.
|
boolean |
isDiscovered(IMutation mutation)
Queries the tracker for discovered species.
|
boolean |
isResearched(IMutation mutation) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound) |
void |
registerBirth(IIndividual individual)
Register the birth of an individual.
|
void |
registerMutation(IMutation mutation)
Register a successful mutation.
|
void |
registerSpecies(IAlleleSpecies species)
Marks a species as discovered.
|
void |
researchMutation(IMutation mutation)
Register a successfully researched mutation.
|
void |
setModeName(java.lang.String name)
Set the current
IBeekeepingMode. |
void |
setUsername(com.mojang.authlib.GameProfile username) |
void |
setWorld(net.minecraft.world.World world) |
protected abstract java.lang.String |
speciesRootUID()
Tag stored in NBT to identify the type of the tracker being synced
|
void |
synchToPlayer(net.minecraft.entity.player.EntityPlayer player)
Synchronizes the tracker to the client side.
|
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound) |
deserializeNBT, isDirty, markDirty, serializeNBT, setDirtyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterPickuppublic static final java.lang.String TYPE_KEY
protected BreedingTracker(java.lang.String s,
java.lang.String defaultModeName)
public void setUsername(@Nullable
com.mojang.authlib.GameProfile username)
public void setWorld(@Nullable
net.minecraft.world.World world)
public java.lang.String getModeName()
getModeName in interface IBreedingTrackerIBeekeepingMode.public void setModeName(java.lang.String name)
IBreedingTrackerIBeekeepingMode.setModeName in interface IBreedingTrackerprotected abstract IBreedingTracker getBreedingTracker(net.minecraft.entity.player.EntityPlayer player)
player - used to get worldprotected abstract java.lang.String speciesRootUID()
public void synchToPlayer(net.minecraft.entity.player.EntityPlayer player)
IBreedingTrackersynchToPlayer in interface IBreedingTrackerpublic void decodeFromNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound)
decodeFromNBT in interface IBreedingTrackerpublic void encodeToNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound)
encodeToNBT in interface IBreedingTrackerpublic void readFromNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound)
readFromNBT in class net.minecraft.world.storage.WorldSavedDatapublic net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound nbttagcompound)
writeToNBT in class net.minecraft.world.storage.WorldSavedDatapublic void registerMutation(IMutation mutation)
IBreedingTrackerregisterMutation in interface IBreedingTrackerpublic boolean isDiscovered(IMutation mutation)
IBreedingTrackerisDiscovered in interface IBreedingTrackermutation - Mutation to query for.public boolean isDiscovered(IAlleleSpecies species)
IBreedingTrackerisDiscovered in interface IBreedingTrackerspecies - Species to check.public java.util.Set<java.lang.String> getDiscoveredSpecies()
getDiscoveredSpecies in interface IBreedingTrackerIAllele.getUID()s of all discovered species.public int getSpeciesBred()
getSpeciesBred in interface IBreedingTrackerpublic void registerBirth(IIndividual individual)
IBreedingTrackerregisterBirth in interface IBreedingTrackerpublic void registerSpecies(IAlleleSpecies species)
IBreedingTrackerregisterSpecies in interface IBreedingTrackerpublic void researchMutation(IMutation mutation)
IBreedingTrackerresearchMutation in interface IBreedingTrackerpublic boolean isResearched(IMutation mutation)
isResearched in interface IBreedingTracker