Skip to content

Commit

Permalink
Fix a crash on 1.16 servers
Browse files Browse the repository at this point in the history
Really random function was client only for some reason, fixed anyway lol
  • Loading branch information
UnlikePaladin committed Nov 12, 2023
1 parent aeec545 commit cbc70f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected <V> V findRelatedEntry(String append, String postPend, Registry<V> reg
};
V found = null;
for (Identifier r : targets) {
if (reg.containsId(r)) {
if (reg.getOrEmpty(r).isPresent()) {
found = reg.get(r);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ protected Block findLogRelatedBlock(String append, String postpend) {
new Identifier(id.getNamespace(), append + "_" + id.getPath() + postNether.replace("_", ""))
};
for (Identifier r : nether_targets) {
if (Registry.BLOCK.containsId(r)) {
if (Registry.BLOCK.getOrEmpty(r).isPresent()) {
found = Registry.BLOCK.get(r);
break;
}
}
}
for (Identifier r : targets) {
if (Registry.BLOCK.containsId(r)) {
if (Registry.BLOCK.getOrEmpty(r).isPresent()) {
found = Registry.BLOCK.get(r);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private static Block findLog(Identifier id) {
};
Block temp = null;
for (Identifier r : test) {
if (Registry.BLOCK.containsId(r)) {
if (Registry.BLOCK.getOrEmpty(r).isPresent()) {
temp = Registry.BLOCK.get(r);
break;
}
Expand Down

0 comments on commit cbc70f7

Please sign in to comment.