Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.01 KB | None | 0 0
  1. @Override
  2.     public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
  3.     {
  4.        
  5.         IBlockState block = worldIn.getBlockState(pos);
  6.         IBlockState north = worldIn.getBlockState(pos.north());
  7.         IBlockState south = worldIn.getBlockState(pos.south());
  8.         IBlockState east = worldIn.getBlockState(pos.east());
  9.         IBlockState west = worldIn.getBlockState(pos.west());
  10.         IBlockState up = worldIn.getBlockState(pos.up());
  11.         IBlockState down = worldIn.getBlockState(pos.down());
  12.        
  13.         //Grass
  14.             if(north == Blocks.GRASS.getDefaultState())
  15.             {
  16.                  worldIn.setBlockState(pos.north(), ModBlocks.CORRUPTED_GRASS.getDefaultState());
  17.                  
  18.             }
  19.            
  20.             if(south == Blocks.GRASS.getDefaultState())
  21.             {
  22.                  worldIn.setBlockState(pos.south(), ModBlocks.CORRUPTED_GRASS.getDefaultState());
  23.             }
  24.  
  25.             if(east == Blocks.GRASS.getDefaultState())
  26.             {
  27.                  worldIn.setBlockState(pos.east(), ModBlocks.CORRUPTED_GRASS.getDefaultState());
  28.             }
  29.        
  30.             if(west == Blocks.GRASS.getDefaultState())
  31.             {
  32.                  worldIn.setBlockState(pos.west(), ModBlocks.CORRUPTED_GRASS.getDefaultState());
  33.             }
  34.            
  35.             if(up == Blocks.GRASS.getDefaultState())
  36.             {
  37.                  worldIn.setBlockState(pos.up(), ModBlocks.CORRUPTED_GRASS.getDefaultState());
  38.             }
  39.            
  40.             if(down == Blocks.GRASS.getDefaultState())
  41.             {
  42.                  worldIn.setBlockState(pos.down(), ModBlocks.CORRUPTED_GRASS.getDefaultState());
  43.             }
  44.            
  45.             //Dirt
  46.            
  47.             if(north == Blocks.DIRT.getDefaultState())
  48.             {
  49.                  worldIn.setBlockState(pos.north(), ModBlocks.CORRUPTED_DIRT.getDefaultState());
  50.             }
  51.            
  52.             if(south == Blocks.DIRT.getDefaultState())
  53.             {
  54.                  worldIn.setBlockState(pos.south(), ModBlocks.CORRUPTED_DIRT.getDefaultState());
  55.             }
  56.  
  57.             if(east == Blocks.DIRT.getDefaultState())
  58.             {
  59.                  worldIn.setBlockState(pos.east(), ModBlocks.CORRUPTED_DIRT.getDefaultState());
  60.             }
  61.        
  62.             if(west == Blocks.DIRT.getDefaultState())
  63.             {
  64.                  worldIn.setBlockState(pos.west(), ModBlocks.CORRUPTED_DIRT.getDefaultState());
  65.             }
  66.            
  67.             if(up == Blocks.DIRT.getDefaultState())
  68.             {
  69.                  worldIn.setBlockState(pos.up(), ModBlocks.CORRUPTED_DIRT.getDefaultState());
  70.             }
  71.            
  72.             if(down == Blocks.DIRT.getDefaultState())
  73.             {
  74.                  worldIn.setBlockState(pos.down(), ModBlocks.CORRUPTED_DIRT.getDefaultState());
  75.             }
  76.            
  77.             //Log
  78.            
  79.             if(north == Blocks.LOG.getDefaultState())
  80.             {
  81.                  worldIn.setBlockState(pos.north(), ModBlocks.CORRUPTED_OAK_LOG.getDefaultState());
  82.             }
  83.            
  84.             if(south == Blocks.LOG.getDefaultState())
  85.             {
  86.                  worldIn.setBlockState(pos.south(), ModBlocks.CORRUPTED_OAK_LOG.getDefaultState());
  87.             }
  88.  
  89.             if(east == Blocks.LOG.getDefaultState())
  90.             {
  91.                  worldIn.setBlockState(pos.east(), ModBlocks.CORRUPTED_OAK_LOG.getDefaultState());
  92.             }
  93.        
  94.             if(west == Blocks.LOG.getDefaultState())
  95.             {
  96.                  worldIn.setBlockState(pos.west(), ModBlocks.CORRUPTED_OAK_LOG.getDefaultState());
  97.             }
  98.            
  99.             if(up == Blocks.LOG.getDefaultState())
  100.             {
  101.                  worldIn.setBlockState(pos.up(), ModBlocks.CORRUPTED_OAK_LOG.getDefaultState());
  102.             }
  103.            
  104.             if(down == Blocks.LOG.getDefaultState())
  105.             {
  106.                  worldIn.setBlockState(pos.down(), ModBlocks.CORRUPTED_OAK_LOG.getDefaultState());
  107.             }
  108.            
  109.             //Sapling
  110.            
  111.             if(north == Blocks.SAPLING.getDefaultState())
  112.             {
  113.                  worldIn.setBlockState(pos.north(), ModBlocks.CORRUPTED_OAK_SAPLING.getDefaultState());
  114.             }
  115.            
  116.             if(south == Blocks.SAPLING.getDefaultState())
  117.             {
  118.                  worldIn.setBlockState(pos.south(), ModBlocks.CORRUPTED_OAK_SAPLING.getDefaultState());
  119.             }
  120.  
  121.             if(east == Blocks.SAPLING.getDefaultState())
  122.             {
  123.                  worldIn.setBlockState(pos.east(), ModBlocks.CORRUPTED_OAK_SAPLING.getDefaultState());
  124.             }
  125.        
  126.             if(west == Blocks.SAPLING.getDefaultState())
  127.             {
  128.                  worldIn.setBlockState(pos.west(), ModBlocks.CORRUPTED_OAK_SAPLING.getDefaultState());
  129.             }
  130.            
  131.             if(up == Blocks.SAPLING.getDefaultState())
  132.             {
  133.                  worldIn.setBlockState(pos.up(), ModBlocks.CORRUPTED_OAK_SAPLING.getDefaultState());
  134.             }
  135.            
  136.             if(down == Blocks.SAPLING.getDefaultState())
  137.             {
  138.                  worldIn.setBlockState(pos.down(), ModBlocks.CORRUPTED_OAK_SAPLING.getDefaultState());
  139.             }
  140.            
  141.             if(north == Blocks.STONE.getDefaultState())
  142.             {
  143.                  worldIn.setBlockState(pos.north(), ModBlocks.CORRUPTED_COBBLESTONE.getDefaultState());
  144.             }
  145.            
  146.             if(south == Blocks.STONE.getDefaultState())
  147.             {
  148.                  worldIn.setBlockState(pos.south(), ModBlocks.CORRUPTED_COBBLESTONE.getDefaultState());
  149.             }
  150.  
  151.             if(east == Blocks.STONE.getDefaultState())
  152.             {
  153.                  worldIn.setBlockState(pos.east(), ModBlocks.CORRUPTED_COBBLESTONE.getDefaultState());
  154.             }
  155.        
  156.             if(west == Blocks.STONE.getDefaultState())
  157.             {
  158.                  worldIn.setBlockState(pos.west(), ModBlocks.CORRUPTED_COBBLESTONE.getDefaultState());
  159.             }
  160.            
  161.             if(up == Blocks.STONE.getDefaultState())
  162.             {
  163.                  worldIn.setBlockState(pos.up(), ModBlocks.CORRUPTED_COBBLESTONE.getDefaultState());
  164.             }
  165.            
  166.             if(down == Blocks.STONE.getDefaultState())
  167.             {
  168.                  worldIn.setBlockState(pos.down(), ModBlocks.CORRUPTED_COBBLESTONE.getDefaultState());
  169.             }
  170.        
  171.        
  172.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement