Example #1
0
 public virtual void OnDestroy(Chunk chunk, BlockPos pos, Block block)
 {
     if (BlockOverride.GetBlockOverride(block.type) != null)
     {
         BlockOverride.GetBlockOverride(block.type).OnDestroy(chunk, pos, block);
     }
 }
Example #2
0
 public virtual void ScheduledUpdate(Chunk chunk, BlockPos pos, Block block)
 {
     if (BlockOverride.GetBlockOverride(block.type) != null)
     {
         BlockOverride.GetBlockOverride(block.type).ScheduledUpdate(chunk, pos, block);
     }
 }
Example #3
0
 public virtual void PostRender(Chunk chunk, BlockPos pos, Block block)
 {
     if (BlockOverride.GetBlockOverride(block.type) != null)
     {
         BlockOverride.GetBlockOverride(block.type).PostRender(chunk, pos, block);
     }
 }
Example #4
0
        public virtual Block OnCreate(Chunk chunk, BlockPos pos, Block block)
        {
            if (BlockOverride.GetBlockOverride(block.type) == null)
            {
                return(block);
            }

            return(BlockOverride.GetBlockOverride(block.type).OnCreate(chunk, pos, block));
        }
Example #5
0
        public virtual T GetFlagOrOverride <T>(Object key, Chunk chunk, BlockPos pos, Block block) where T : new()
        {
            if (BlockOverride.GetBlockOverride(block.type) != null)
            {
                System.Object overridenReturn = BlockOverride.GetBlockOverride(block.type).GetFlagIntercept(key, chunk, pos, block);
                if (overridenReturn != null)
                {
                    return((T)overridenReturn);
                }
            }

            return(GetFlag <T>(key));
        }