Make distr operation based

This commit is contained in:
Matthew Miller
2018-08-19 17:53:29 +10:00
parent 9f43963379
commit 0a149a796f
5 changed files with 112 additions and 133 deletions

View File

@ -142,8 +142,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
final BaseBlock otherBlock = (BaseBlock) o;
return Objects.equals(this.toImmutableState(), otherBlock.toImmutableState()) && Objects.equals(getNbtData(), otherBlock.getNbtData());
return this.toImmutableState().equalsFuzzy(otherBlock.toImmutableState()) && Objects.equals(getNbtData(), otherBlock.getNbtData());
}
/**

View File

@ -239,4 +239,18 @@ public class BlockState implements BlockStateHolder<BlockState> {
public String toString() {
return getAsString();
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof BlockState)) {
return false;
}
return equalsFuzzy((BlockState) obj);
}
@Override
public int hashCode() {
return Objects.hash(blockType, values, fuzzy);
}
}