Skip to content

Commit

Permalink
= Dirt Check - Quick additional check for not collidable blocks and t…
Browse files Browse the repository at this point in the history
…rap doors
  • Loading branch information
May2Beez committed Jan 13, 2024
1 parent 0ae399a commit 0c08194
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.4.1-pre10
version=2.4.1-pre11
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ public boolean shouldAltTab() {
@Override
public void onBlockChange(BlockChangeEvent event) {
if (FailsafeManager.getInstance().firstCheckReturn()) return;
if ((!event.old.getBlock().equals(Blocks.air) && !CropUtils.isCrop(event.old.getBlock())) || event.update.getBlock() == null || event.update.getBlock().equals(Blocks.air) || CropUtils.isCrop(event.update.getBlock()))
if ((!event.old.getBlock().equals(Blocks.air) && !CropUtils.isCrop(event.old.getBlock())) ||
event.update.getBlock() == null ||
event.update.getBlock().equals(Blocks.air) ||
CropUtils.isCrop(event.update.getBlock()) ||
!event.update.getBlock().isCollidable() ||
event.update.getBlock().equals(Blocks.trapdoor))
return;

LogUtils.sendWarning("[Failsafe] Someone put a block on your garden! Block pos: " + event.pos);
Expand Down

0 comments on commit 0c08194

Please sign in to comment.