Ejemplo n.º 1
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.º 2
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);
        }