InteractionProxy.Break.BreakBlockResult
com.jsmacrosce.jsmacros.client.api.classes.InteractionProxy.Break.BreakBlockResult
Carries an outcome reason and optional block position reported by the breaking override.
These are proxy-reported results, not proof of server acceptance. Scripts receive them through the interaction manager's break callback:
js
const interactions = Player.getInteractionManager();
if (interactions !== null) {
interactions.breakBlockAsync(JavaWrapper.methodToJava(function (result) {
if (result !== null) Chat.log(result.reason);
}));
}Nested type declared in InteractionProxy.Break.
Constructors
new InteractionProxy.Break.BreakBlockResult
new InteractionProxy.Break.BreakBlockResult(String reason, BlockPosHelper pos)#Stores the supplied nullable outcome reason and position without validation or copying.
Parameters:
reason: diagnostic outcome reason, or nullpos: optional block position, or null
Fields
pos
Position reported with the result, or null when none was supplied. Proxy callbacks supply a position for
SUCCESS; manually constructed results may supply any position or null.reason
Outcome reported for a block-break override. Proxy callbacks use
SUCCESS, NOT_BREAKING, RESET, NO_OVERRIDE, IS_AIR, NO_TARGET, TARGET_LOST, or TARGET_CHANGE. SUCCESS includes the broken position; other callback results have no position. The static UNAVAILABLE value is a sentinel with no position, not a callback outcome. A null reason is possible when constructed outside the proxy.UNAVAILABLE
Sentinel returned by the helper's immediate check when the interaction manager is absent; its reason is
UNAVAILABLE and position is null. Not a proxy callback outcome.Methods
toString
Returns a diagnostic representation containing the reason and position representations. The output is not guaranteed to be valid JSON or a stable parse format; a non-null reason is quoted without escaping. Null reason or position references are printed as
null. This method does not run a break callback.Returns: diagnostic text containing the reason and position representations