public static void maxCombine(Type type, BlockPositionState state, BlockPositionState otherState) { if (state.getBlock() == null || type.compareTo(otherState.getBlock(), otherState.getPosition(), state.getBlock(), state.getPosition()) > 0) { state.setBlock(otherState.getBlock()); state.setPosition(otherState.getPosition()); } }
public static void minCombine(Type type, BlockPositionState state, BlockPositionState otherState) { if (state.getBlock() == null || type.compareTo(otherState.getBlock(), otherState.getPosition(), state.getBlock(), state.getPosition()) < 0) { state.setBlock(otherState.getBlock()); state.setPosition(otherState.getPosition()); } }
static void write(Type type, BlockPositionState state, BlockBuilder out) { if (state.getBlock() == null) { out.appendNull(); } else { type.appendTo(state.getBlock(), state.getPosition(), out); } } }
public static void combine(BlockPositionState state, BlockPositionState otherState) { if (state.getBlock() != null) { return; } state.setBlock(otherState.getBlock()); state.setPosition(otherState.getPosition()); } }
@Override public void serialize(BlockPositionState state, BlockBuilder out) { if (state.getBlock() == null) { out.appendNull(); } else { type.appendTo(state.getBlock(), state.getPosition(), out); } }
public static void maxInput(Type type, BlockPositionState state, Block block, int position) { if (state.getBlock() == null || type.compareTo(block, position, state.getBlock(), state.getPosition()) > 0) { state.setBlock(block); state.setPosition(position); } }
public static void minInput(Type type, BlockPositionState state, Block block, int position) { if (state.getBlock() == null || type.compareTo(block, position, state.getBlock(), state.getPosition()) < 0) { state.setBlock(block); state.setPosition(position); } }