private ItemStack[] getMatchingStacks(WorldInteraction wi, BlockSelection blockSelection, EntitySelection entitySelection) { BlockEntityBloomery beb = api.World.BlockAccessor.GetBlockEntity(blockSelection.Position) as BlockEntityBloomery; if (beb == null || wi.Itemstacks.Length == 0) { return(null); } List <ItemStack> matchStacks = new List <ItemStack>(); foreach (ItemStack stack in wi.Itemstacks) { if (beb.CanAdd(stack)) { matchStacks.Add(stack); } } return(matchStacks.ToArray()); }
static void Postfix(ref WorldInteraction wi, EnumMouseButton __state) { // Restore original state wi.MouseButton = __state; }
void OnEnable() { instance = this; }
void Awake() { instance = this; hitMask = Settings.Instance().worldInteractionMask; }
protected GameObject interactText; // Shows message to start interaction void Awake() { playerTransform = GameObject.FindGameObjectWithTag("Player").transform; worldInteraction = playerTransform.GetComponent <WorldInteraction>(); interactText = transform.Find("InteractText").gameObject; }
private void Awake() { levelEventHandler = FindObjectOfType <GameManager>(); worldInteraction = GetComponent <WorldInteraction>(); leftClickInWorld = GetComponent <LeftClickInWorld>(); }