Chen Liang
Chen Liang
@ST-DDT forge mods do not check flags. They only set flags they need. Sponge plugins will enable flags with entity update event listeners.
So the revamped flag class is: ```java public interface AITaskOccupiedFlag { } ``` the flag set: ```java public interface AITaskOccupiedFlagSet { boolean has(AITaskOccupiedFlag flag); AITaskOccupiedFlagSet set(AITaskOccupiedFlag flag); AITaskOccupiedFlagSet inverse(); AITaskOccupiedFlagSet...
we can recognize those bits with hooks in the method where goals set their available bits and where ai tasks set their mutex bits.
@ST-DDT 1. Mods do not need custom implementations. They need to do zero thing. We use transformer to add extra hook in the methods where the bits are set! 2....
@ST-DDT I believe you have trouble understanding some of my ideas: We can detect with injections in `EntityAIBase#setMutexBits`,`EntityAITasks#enableControlFlag`, and `EntityAITasks#disableControlFlag` We will also fetch the agent type in context to...
By the way, the new system I propose may supersede #1014
We can use another tracking system for sponge-added flags besides the existing mutex. Inverse should be all other flags set to true.
For your performance concerns, we can require all plugin-based ai flags to be added before a loading stage to allow putting flags in something backed by a bitset, etc.
If you fear sponge cannot spawn mobs, in fact, sponge can (by iterating over the entity registry and spawning in a dummy world)
I'd keep my ai flag set class so that people are not silly enough to feed an array-based set or something similar to the method.