···155155 env.addExtension:
156156 new CastingEnvironmentComponent with CastingEnvironmentComponent.PostExecution:
157157 override def getKey: CastingEnvironmentComponent.Key[?] = key
158158-159158 override def onPostExecution(result: CastResult): Unit =
160159 result.getSideEffects.collectFirst:
161160 case m: OperatorSideEffect.DoMishap =>
···244243extension (p: ServerPlayerEntity) def gimmeIota(iota: Iota): Unit =
245244 val m = p.getComponent(HexCardinalComponents.STAFFCAST_IMAGE)
246245 m.setImage(m.getVM(Hand.MAIN_HAND).getImage.withStack(_ ++ Vector(iota)))
246246+247247+private[phlib] trait AllocationTracked:
248248+ private[phlib] val phlib$createdAt: Exception
249249+250250+package mixin:
251251+ import net.minecraft.block.Block
252252+ import net.minecraft.item.Item
253253+ import org.spongepowered.asm.mixin.injection.{At, Inject}
254254+ import org.spongepowered.asm.mixin.Mixin
255255+ @Mixin(value = Array(classOf[Item], classOf[Block]))
256256+ private[phlib] class AllocationTrackerMixin() extends AnyRef with AllocationTracked:
257257+ private[phlib] val phlib$createdAt: Exception = new RuntimeException(s"unregistered $this ($getClass) created")
247258248259// this is out-of-scope for phlib but I have no idea where else to put it
249260def init() =