0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 01:12:13 +02:00

Add kelp support to AutoFarmHack

This commit is contained in:
Alexander01998 2019-08-04 19:16:16 +02:00
parent c5181998e0
commit be5ad171b4

View File

@ -63,9 +63,11 @@ public final class AutoFarmHack extends Hack
public AutoFarmHack()
{
super("AutoFarm", "Harvests and re-plants crops automatically.\n"
+ "Works with wheat, carrots, potatoes, beetroots,\n"
+ "pumpkins, melons, cacti, sugar canes and\n" + "nether warts.");
super("AutoFarm",
"Harvests and re-plants crops automatically.\n"
+ "Works with wheat, carrots, potatoes, beetroots,\n"
+ "pumpkins, melons, cacti, sugar canes, kelp and\n"
+ "nether warts.");
setCategory(Category.BLOCKS);
addSetting(range);
}
@ -255,6 +257,10 @@ public final class AutoFarmHack extends Hack
else if(block instanceof CactusBlock)
return BlockUtils.getBlock(pos.down()) instanceof CactusBlock
&& !(BlockUtils.getBlock(pos.down(2)) instanceof CactusBlock);
else if(block instanceof KelpPlantBlock)
return BlockUtils.getBlock(pos.down()) instanceof KelpPlantBlock
&& !(BlockUtils
.getBlock(pos.down(2)) instanceof KelpPlantBlock);
else if(block instanceof NetherWartBlock)
return state.get(NetherWartBlock.AGE) >= 3;