Advertisement
Barteks2x

Untitled

May 11th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1.     @Redirect(method = CHUNK_CACHE_GET_LIGHT_FOR, at = @At(value = "INVOKE", target = BLOCK_POS_GETY), require = 2)
  2.     private int getLightForgetYReplace(BlockPos pos) {
  3.         ICubicWorld world = (ICubicWorld) worldObj;
  4.         if(pos.getY() < world.getMinHeight() || pos.getY() >= world.getMaxHeight()) {
  5.             return 64;
  6.         }
  7.         return pos.getY();
  8.     }
  9.  
  10.     @Redirect(method = CHUNK_CACHE_GET_LIGHT_FOR_EXT, at = @At(value = "INVOKE", target = BLOCK_POS_GETY), require = 2)
  11.     private int getLightForExtGetYReplace(BlockPos pos) {
  12.         ICubicWorld world = (ICubicWorld) worldObj;
  13.         if(pos.getY() < world.getMinHeight() || pos.getY() >= world.getMaxHeight()) {
  14.             return 64;
  15.         }
  16.         return pos.getY();
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement