Whiteboards - Lyinginbedmon/TricksyFoxes GitHub Wiki
Whiteboards are where mobs keep all the information they need to do what they need to do. Every Tricksy mob has their own personal whiteboard and can also access the whiteboard of their master (aka the global whiteboard, with each player having their own). Additionally, there is a third whiteboard accessible by all mobs which contains important constant values, like cardinal directions and useful lists of entities.
Every value in a whiteboard has a specific identifier, containing its name, data type, and the whiteboard it comes from (aka its whiteboard reference). This allows the mobs to retrieve it regardless of where it actually is. Some objects can even be treated as objects of a different data type, such as treating entities as positions for the purposes of determining a destination (which comes in handy when you want to mur- I mean, aggressively proselytise at them).
Whilst all whiteboards of all types start with a selection of values already available, such as the mob's health, attack target, and closest master, players can also add static values to either the global whiteboard or that of a specific mob using the Prescient Scroll. The scroll also allows the player to create a singular value containing a set of values of the same type, such as points on a patrol route or a herd of livestock to breed. These values can be deleted from a mob's whiteboard if necessary using it's UI.
There are currently 5 main types of whiteboard object:
Number
A simple number ranging from 0 to [functionally infinite], such as the current total armour of a fox.
Boolean
A simple yes/no value, such as whether the fox has its hands full or is on the ground.
Position
A point in 3D block space in the world, such as the world spawn point. This value also includes the face of the specified block, such as the top of a hopper or the Western face of a furnace.
Entity
A creature in the world, such as whatever the fox is currently attacking or its master. These values are slightly less reliable than the others as the specified entity must be loaded in order for the value to be useful. Entity values can also be treated as positions, specifying the block the entity is located in.
Item
An item or stack of items, like the fox's helmet or sword. Item values can be treated as numbers, specifying how many items are in the stack.
Region
A special coordinate value, combining two positions to define a cubic space within the world. Note: In order to limit lag, regions greater in size than 256x256x256 are treated as only that large when performing a search, and such searches can only return 256 values at most.