Skip to content

Commit

Permalink
fixed witchery seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
hpotter02 committed Aug 12, 2024
1 parent 9665d3c commit 52f9c7f
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package vswe.stevescarts.Modules.Addons.Plants;

import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.IGrowable;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IPlantable;
Expand Down Expand Up @@ -51,13 +51,21 @@ public boolean isReadyToHarvest(int x, int y, int z) {
int m = getCart().worldObj.getBlockMetadata(x, y, z);
UniqueIdentifier uniqueIdentifier = GameRegistry.findUniqueIdentifierFor(block);

if (!(block instanceof IGrowable)) {
return false;
}

// witchery compatibility
if (uniqueIdentifier.modId.equals("witchery") && m == 4) {
return true;
if (uniqueIdentifier.modId.equals("witchery")) {
if (uniqueIdentifier.name.equals("garlicplant") && m == 5) {
return true;
} else if (m == 4) {
return true;
}
}

// default behaviour
if (block instanceof BlockCrops && m == 7) {
// default for crops
if (m == 7) {
return true;
}

Expand Down

0 comments on commit 52f9c7f

Please sign in to comment.