public class VillageCollection extends WorldSavedData
Modifier and Type | Field and Description |
---|---|
private java.util.List<VillageDoorInfo> |
newDoors |
private int |
tickCounter |
private java.util.List<Village> |
villageList |
private java.util.List<BlockPos> |
villagerPositionsList |
private World |
world |
mapName
Constructor and Description |
---|
VillageCollection(java.lang.String name) |
VillageCollection(World worldIn) |
Modifier and Type | Method and Description |
---|---|
private void |
addDoorsAround(BlockPos central) |
private void |
addNewDoorsToVillageOrCreateVillage() |
private void |
addToNewDoorsList(BlockPos doorBlock) |
void |
addToVillagerPositionList(BlockPos pos) |
private VillageDoorInfo |
checkDoorExistence(BlockPos doorBlock) |
private int |
countBlocksCanSeeSky(BlockPos centerPos,
EnumFacing direction,
int limitation) |
private void |
dropOldestVillagerPosition() |
static java.lang.String |
fileNameForProvider(WorldProvider provider) |
Village |
getNearestVillage(BlockPos doorBlock,
int radius) |
java.util.List<Village> |
getVillageList() |
private boolean |
isWoodDoor(BlockPos doorPos) |
private boolean |
positionInList(BlockPos pos) |
void |
readFromNBT(NBTTagCompound nbt) |
private void |
removeAnnihilatedVillages() |
void |
setWorldsForAll(World worldIn) |
void |
tick() |
NBTTagCompound |
writeToNBT(NBTTagCompound compound) |
deserializeNBT, isDirty, markDirty, serializeNBT, setDirty
private World world
private final java.util.List<BlockPos> villagerPositionsList
private final java.util.List<VillageDoorInfo> newDoors
private final java.util.List<Village> villageList
private int tickCounter
public VillageCollection(java.lang.String name)
public VillageCollection(World worldIn)
public void setWorldsForAll(World worldIn)
public void addToVillagerPositionList(BlockPos pos)
public void tick()
private void removeAnnihilatedVillages()
public java.util.List<Village> getVillageList()
private void dropOldestVillagerPosition()
private void addNewDoorsToVillageOrCreateVillage()
private void addDoorsAround(BlockPos central)
@Nullable private VillageDoorInfo checkDoorExistence(BlockPos doorBlock)
private void addToNewDoorsList(BlockPos doorBlock)
private int countBlocksCanSeeSky(BlockPos centerPos, EnumFacing direction, int limitation)
private boolean positionInList(BlockPos pos)
private boolean isWoodDoor(BlockPos doorPos)
public void readFromNBT(NBTTagCompound nbt)
readFromNBT
in class WorldSavedData
public NBTTagCompound writeToNBT(NBTTagCompound compound)
writeToNBT
in class WorldSavedData
public static java.lang.String fileNameForProvider(WorldProvider provider)