Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. @Override
  2. public Iterable<MutableBlockPos> getCandidates(EntityPlayer player, BlockPos pos, EnumFacing side) {
  3. BlockPos min = new BlockPos(-1, -1, -1);
  4. min = side.getAxisDirection() == AxisDirection.POSITIVE ? min.add(side.getDirectionVec()) : min.subtract(side.getDirectionVec());
  5. BlockPos max = new BlockPos(1, 1, 1);
  6. max = side.getAxisDirection() == AxisDirection.NEGATIVE ? max.add(side.getDirectionVec()) : max.subtract(side.getDirectionVec());
  7.  
  8. return BlockPos.getAllInBoxMutable(pos.add(min), pos.add(max));
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement