Beispiel #1
0
        public override bool OnBlockInteractStart(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            BlockEntityShelf beshelf = world.BlockAccessor.GetBlockEntity(blockSel.Position) as BlockEntityShelf;

            if (beshelf != null)
            {
                return(beshelf.OnInteract(byPlayer, blockSel));
            }


            return(base.OnBlockInteractStart(world, byPlayer, blockSel));
        }
Beispiel #2
0
        public override void GetBlockInfo(IPlayer forPlayer, StringBuilder dsc)
        {
            bool isRotten = MealMeshCache.ContentsRotten(inv);

            if (isRotten)
            {
                dsc.Append(Lang.Get("Rotten"));
            }
            else
            {
                dsc.Append(BlockEntityShelf.PerishableInfoCompact(Api, inv[0], 0, false));
            }
        }
Beispiel #3
0
 public override void GetBlockInfo(IPlayer forPlayer, StringBuilder dsc)
 {
     dsc.Append(BlockEntityShelf.PerishableInfoCompact(Api, inv[0], 0));
 }