Skip to content

Commit

Permalink
Don't connect to farmland, fixes #1509
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB440 committed Jun 13, 2024
1 parent 2107a00 commit 4f70f57
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ public boolean connectsTo(GrimPlayer player, ClientVersion v, int currX, int cur
}
}

/** Some blocks override isFullBlock whilst actually having a full state */
boolean isBlacklisted(StateType m, StateType fence, ClientVersion clientVersion) {
if (BlockTags.LEAVES.contains(m)) return clientVersion.isNewerThan(ClientVersion.V_1_8) || !Materials.isGlassPane(fence);
if (BlockTags.SHULKER_BOXES.contains(m)) return true;
if (BlockTags.TRAPDOORS.contains(m)) return true;

return m == StateTypes.ENCHANTING_TABLE || m == StateTypes.CARVED_PUMPKIN || m == StateTypes.JACK_O_LANTERN || m == StateTypes.PUMPKIN || m == StateTypes.MELON ||
return m == StateTypes.ENCHANTING_TABLE || m == StateTypes.FARMLAND || m == StateTypes.CARVED_PUMPKIN || m == StateTypes.JACK_O_LANTERN || m == StateTypes.PUMPKIN || m == StateTypes.MELON ||
m == StateTypes.BEACON || BlockTags.CAULDRONS.contains(m) || m == StateTypes.GLOWSTONE || m == StateTypes.SEA_LANTERN || m == StateTypes.ICE
|| m == StateTypes.PISTON || m == StateTypes.STICKY_PISTON || m == StateTypes.PISTON_HEAD || (!canConnectToGlassBlock()
&& BlockTags.GLASS_BLOCKS.contains(m));
Expand Down

0 comments on commit 4f70f57

Please sign in to comment.