forked from virt-mirrors/Sit
fix (!) blockstates not working properly
This commit is contained in:
parent
f1f3e54d22
commit
f4ac860799
1 changed files with 5 additions and 2 deletions
|
@ -56,8 +56,11 @@ public class CustomBlock {
|
||||||
|
|
||||||
// now check if the state is one of the acceptable states
|
// now check if the state is one of the acceptable states
|
||||||
for (String state : blockStates) {
|
for (String state : blockStates) {
|
||||||
// if there is a NOT (!) blockstate, and it is contained in the block, return false
|
// if there is a NOT (!) blockstate
|
||||||
if (state.startsWith("!") && blockState.toString().contains(state.substring(1))) return false;
|
if (state.startsWith("!")) {
|
||||||
|
// if it is contained in the block, return false
|
||||||
|
if (blockState.toString().contains(state.substring(1))) return false;
|
||||||
|
}
|
||||||
// else check if the blockstate matches, if not return false
|
// else check if the blockstate matches, if not return false
|
||||||
else if (!blockState.toString().contains(state)) return false;
|
else if (!blockState.toString().contains(state)) return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue