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)); }
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)); } }
public override void GetBlockInfo(IPlayer forPlayer, StringBuilder dsc) { dsc.Append(BlockEntityShelf.PerishableInfoCompact(Api, inv[0], 0)); }