Fixed color providers (#201)

This commit is contained in:
paulevsGitch 2021-06-13 16:52:31 +03:00
parent 542dff12f5
commit f5ceb6201a
3 changed files with 11 additions and 26 deletions

View file

@ -28,7 +28,9 @@ public class TenaneaFlowersBlock extends BaseVineBlock implements IColorProvider
@Override
public BlockColor getProvider() {
return (state, world, pos, tintIndex) -> {
if (pos == null) pos = BlockPos.ZERO;
if (pos == null) {
pos = BlockPos.ZERO;
};
long i = (MHelper.getRandom(pos.getX(), pos.getZ()) & 63) + pos.getY();
double delta = i * 0.1;
int index = MHelper.floor(delta);