You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, GameRuleType.allOf generates a rule that enforces all of the given rule types. This works fine until you want to set up a case where you override the general rule type with a more specific one.
For example, with the INTERACTION and USE_BLOCKS rules. INTERACTION implies USE_BLOCKS, but setting USE_BLOCKS should override INTERACTION. Currently, this does not work: all rules that are set to allow return ActionResultType.PASS from their events. This is such that returning ActionResultType.SUCCESS does not end up cancelling vanilla logic, because we want that to run. The problem here, however, is that returning PASS continues processing for other events. This means a set-up with USE_BLOCKS allowed will return PASS, causing the INTERACTION rule to still apply and not be overridden.
The solution for this would ideally involve having a result type that can represent "pass to vanilla logic, but don't continue processing events", but this may be a significant breaking change to Stimuli. Potentially the best we can do is manage colliding rule results internally in the rule handler to avoid issues such as this.
The text was updated successfully, but these errors were encountered:
Currently,
GameRuleType.allOf
generates a rule that enforces all of the given rule types. This works fine until you want to set up a case where you override the general rule type with a more specific one.For example, with the
INTERACTION
andUSE_BLOCKS
rules.INTERACTION
impliesUSE_BLOCKS
, but settingUSE_BLOCKS
should overrideINTERACTION
. Currently, this does not work: all rules that are set toallow
returnActionResultType.PASS
from their events. This is such that returningActionResultType.SUCCESS
does not end up cancelling vanilla logic, because we want that to run. The problem here, however, is that returningPASS
continues processing for other events. This means a set-up withUSE_BLOCKS
allowed will returnPASS
, causing theINTERACTION
rule to still apply and not be overridden.The solution for this would ideally involve having a result type that can represent "pass to vanilla logic, but don't continue processing events", but this may be a significant breaking change to Stimuli. Potentially the best we can do is manage colliding rule results internally in the rule handler to avoid issues such as this.
The text was updated successfully, but these errors were encountered: