Ejemplo n.º 1
0
        public override Task OnActivateAsync()
        {
            SlotAreas.Add(new CraftingSlotArea(3, this, GrainFactory));
            SlotAreas.Add(new InventorySlotArea(this, GrainFactory));
            SlotAreas.Add(new HotbarSlotArea(this, GrainFactory));

            return(base.OnActivateAsync());
        }
Ejemplo n.º 2
0
        public Task SetEntity(IBlockEntity furnaceEntity)
        {
            SlotAreas.Clear();
            _properties.Clear();

            SlotAreas.Add(new FurnaceSlotArea(furnaceEntity, this, GrainFactory));
            SlotAreas.Add(new InventorySlotArea(this, GrainFactory));
            SlotAreas.Add(new HotbarSlotArea(this, GrainFactory));
            _furnaceEntity = furnaceEntity;
            return(Task.CompletedTask);
        }
Ejemplo n.º 3
0
        public Task SetEntities(Immutable <IDependencyObject[]> entities)
        {
            SlotAreas.Clear();

            foreach (var entity in entities.Value)
            {
                SlotAreas.Add(new ChestSlotArea(entity, this, GrainFactory));
            }
            SlotAreas.Add(new InventorySlotArea(this, GrainFactory));
            SlotAreas.Add(new HotbarSlotArea(this, GrainFactory));

            if (entities.Value.Length < 2)
            {
                _title = new Chat("Chest");
            }
            else
            {
                _title = new Chat("Large chest");
            }
            return(Task.CompletedTask);
        }