Minor logic fixes for orchard, to get it to see crops again.

This commit is contained in:
Nirek-K committed 2016-11-07 18:31:12 -06:00
1 parent d48b979ac3
commit e0623f7d57
3 files changed
+7 -6

No files matched your search

@@ -98,10 +98,10 @@ public class PluginFarming extends BlankForestryPlugin {
}
Farmables.farmables.putAll("farmOrchard", Arrays.asList(
new FarmableAgingCrop(new ItemStack(Items.WHEAT_SEEDS), Blocks.WHEAT, BlockCrops.AGE, 7),
new FarmableAgingCrop(new ItemStack(Items.POTATO), Blocks.POTATOES, BlockCrops.AGE, 7),
new FarmableAgingCrop(new ItemStack(Items.CARROT), Blocks.CARROTS, BlockCrops.AGE, 7),
new FarmableAgingCrop(new ItemStack(Items.BEETROOT_SEEDS), Blocks.BEETROOTS, BlockBeetroot.BEETROOT_AGE, 3)
new FarmableAgingCrop(new ItemStack(Items.WHEAT_SEEDS), Blocks.WHEAT, BlockCrops.AGE, 7, 0),
new FarmableAgingCrop(new ItemStack(Items.POTATO), Blocks.POTATOES, BlockCrops.AGE, 7, 0),
new FarmableAgingCrop(new ItemStack(Items.CARROT), Blocks.CARROTS, BlockCrops.AGE, 7, 0),
new FarmableAgingCrop(new ItemStack(Items.BEETROOT_SEEDS), Blocks.BEETROOTS, BlockBeetroot.BEETROOT_AGE, 3, 0)
));
IBlockState plantedBrownMushroom = blocks.mushroom.getDefaultState().withProperty(BlockMushroom.VARIANT, BlockMushroom.MushroomType.BROWN);
@@ -41,7 +41,7 @@ public class FarmableAgingCrop implements IFarmable {
@Override
public boolean isSaplingAt(World world, BlockPos pos) {
IBlockState blockState = world.getBlockState(pos);
return blockState.getBlock() == cropBlock && blockState.getValue(ageProperty) < minHarvestAge;
return blockState.getBlock() == cropBlock && blockState.getValue(ageProperty) <= minHarvestAge;
}
@Override
@@ -87,7 +87,8 @@ public class PluginActuallyAdditions extends BlankForestryPlugin {
if (plantBlock != null) {
FarmableAgingCrop crop = new FarmableAgingCrop(new ItemStack(seedItem), plantBlock, BlockCrops.AGE, 7);
Farmables.farmables.get("farmWheat").add(crop);
Farmables.farmables.get("farmOrchard").add(crop);
FarmableAgingCrop cropOrchard = new FarmableAgingCrop(new ItemStack(seedItem), plantBlock, BlockCrops.AGE, 7, 0);
Farmables.farmables.get("farmOrchard").add(cropOrchard);
}
}
}