Skip to content

Commit ac0d3df

Browse files
Move getSeedItem() above shouldHarvestByMining()
1 parent 1b77bdc commit ac0d3df

14 files changed

+78
-78
lines changed

src/main/java/net/wurstclient/hacks/autofarm/plants/AmethystPlantType.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public final boolean hasPlantingSurface(BlockPos pos)
3030
}
3131

3232
@Override
33-
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
33+
public Item getSeedItem()
3434
{
35-
return state.isOf(Blocks.AMETHYST_CLUSTER);
35+
return Items.BUDDING_AMETHYST;
3636
}
3737

3838
@Override
39-
public Item getSeedItem()
39+
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4040
{
41-
return Items.BUDDING_AMETHYST;
41+
return state.isOf(Blocks.AMETHYST_CLUSTER);
4242
}
4343

4444
@Override

src/main/java/net/wurstclient/hacks/autofarm/plants/BambooPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
4040
.isIn(BlockTags.BAMBOO_PLANTABLE_ON);
4141
}
4242

43+
@Override
44+
public Item getSeedItem()
45+
{
46+
return Items.BAMBOO;
47+
}
48+
4349
@Override
4450
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4551
{
@@ -50,12 +56,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
5056
return isReplantingSpot(below, BlockUtils.getState(below));
5157
}
5258

53-
@Override
54-
public Item getSeedItem()
55-
{
56-
return Items.BAMBOO;
57-
}
58-
5959
@Override
6060
protected CheckboxSetting createHarvestSetting()
6161
{

src/main/java/net/wurstclient/hacks/autofarm/plants/BeetrootsPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
3131
return BlockUtils.getState(pos.down()).isOf(Blocks.FARMLAND);
3232
}
3333

34+
@Override
35+
public Item getSeedItem()
36+
{
37+
return Items.BEETROOT_SEEDS;
38+
}
39+
3440
@Override
3541
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
3642
{
@@ -40,12 +46,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4046
return beetroots.isMature(state);
4147
}
4248

43-
@Override
44-
public Item getSeedItem()
45-
{
46-
return Items.BEETROOT_SEEDS;
47-
}
48-
4949
@Override
5050
protected CheckboxSetting createHarvestSetting()
5151
{

src/main/java/net/wurstclient/hacks/autofarm/plants/CactusPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
4646
|| neighbor.getFluidState().isIn(FluidTags.LAVA));
4747
}
4848

49+
@Override
50+
public Item getSeedItem()
51+
{
52+
return Items.CACTUS;
53+
}
54+
4955
@Override
5056
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
5157
{
@@ -56,12 +62,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
5662
return isReplantingSpot(below, BlockUtils.getState(below));
5763
}
5864

59-
@Override
60-
public Item getSeedItem()
61-
{
62-
return Items.CACTUS;
63-
}
64-
6565
@Override
6666
protected CheckboxSetting createHarvestSetting()
6767
{

src/main/java/net/wurstclient/hacks/autofarm/plants/CarrotsPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
3131
return BlockUtils.getState(pos.down()).isOf(Blocks.FARMLAND);
3232
}
3333

34+
@Override
35+
public Item getSeedItem()
36+
{
37+
return Items.CARROT;
38+
}
39+
3440
@Override
3541
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
3642
{
@@ -40,12 +46,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4046
return carrots.isMature(state);
4147
}
4248

43-
@Override
44-
public Item getSeedItem()
45-
{
46-
return Items.CARROT;
47-
}
48-
4949
@Override
5050
protected CheckboxSetting createHarvestSetting()
5151
{

src/main/java/net/wurstclient/hacks/autofarm/plants/CocoaBeanPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
3434
.anyMatch(neighbor -> neighbor.isIn(BlockTags.JUNGLE_LOGS));
3535
}
3636

37+
@Override
38+
public Item getSeedItem()
39+
{
40+
return Items.COCOA_BEANS;
41+
}
42+
3743
@Override
3844
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
3945
{
@@ -43,12 +49,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4349
return state.get(CocoaBlock.AGE) >= CocoaBlock.MAX_AGE;
4450
}
4551

46-
@Override
47-
public Item getSeedItem()
48-
{
49-
return Items.COCOA_BEANS;
50-
}
51-
5252
@Override
5353
protected CheckboxSetting createHarvestSetting()
5454
{

src/main/java/net/wurstclient/hacks/autofarm/plants/KelpPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
4848
.isSideSolidFullSquare(WurstClient.MC.world, pos, Direction.UP);
4949
}
5050

51+
@Override
52+
public Item getSeedItem()
53+
{
54+
return Items.KELP;
55+
}
56+
5157
@Override
5258
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
5359
{
@@ -58,12 +64,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
5864
return isReplantingSpot(below, BlockUtils.getState(below));
5965
}
6066

61-
@Override
62-
public Item getSeedItem()
63-
{
64-
return Items.KELP;
65-
}
66-
6767
@Override
6868
protected CheckboxSetting createHarvestSetting()
6969
{

src/main/java/net/wurstclient/hacks/autofarm/plants/MelonPlantType.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public final boolean hasPlantingSurface(BlockPos pos)
3232
}
3333

3434
@Override
35-
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
35+
public Item getSeedItem()
3636
{
37-
return state.isOf(Blocks.MELON);
37+
return Items.MELON_SEEDS;
3838
}
3939

4040
@Override
41-
public Item getSeedItem()
41+
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4242
{
43-
return Items.MELON_SEEDS;
43+
return state.isOf(Blocks.MELON);
4444
}
4545

4646
@Override

src/main/java/net/wurstclient/hacks/autofarm/plants/NetherWartPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
3131
return BlockUtils.getState(pos.down()).isOf(Blocks.SOUL_SAND);
3232
}
3333

34+
@Override
35+
public Item getSeedItem()
36+
{
37+
return Items.NETHER_WART;
38+
}
39+
3440
@Override
3541
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
3642
{
@@ -40,12 +46,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4046
return state.get(NetherWartBlock.AGE) >= NetherWartBlock.MAX_AGE;
4147
}
4248

43-
@Override
44-
public Item getSeedItem()
45-
{
46-
return Items.NETHER_WART;
47-
}
48-
4949
@Override
5050
protected CheckboxSetting createHarvestSetting()
5151
{

src/main/java/net/wurstclient/hacks/autofarm/plants/PotatoesPlantType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public final boolean hasPlantingSurface(BlockPos pos)
3131
return BlockUtils.getState(pos.down()).isOf(Blocks.FARMLAND);
3232
}
3333

34+
@Override
35+
public Item getSeedItem()
36+
{
37+
return Items.POTATO;
38+
}
39+
3440
@Override
3541
public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
3642
{
@@ -40,12 +46,6 @@ public boolean shouldHarvestByMining(BlockPos pos, BlockState state)
4046
return potato.isMature(state);
4147
}
4248

43-
@Override
44-
public Item getSeedItem()
45-
{
46-
return Items.POTATO;
47-
}
48-
4949
@Override
5050
protected CheckboxSetting createHarvestSetting()
5151
{

0 commit comments

Comments
 (0)