Pam's HarvestCraft 2 - Crops

Pam's HarvestCraft 2 - Crops

17M Downloads

Custom bonemeal via kelp compatibility

ricksouth opened this issue ยท 1 comments

commented

Hi!

Love the mods you've created. I'm using the vanilla code to have kelp be used as a bonemeal substitute. However with Pam's Harvestcraft installed this does not work anymore. Do you have an idea on what to change to make it compatible with your custom crops?

The code used:

	public static boolean applyBonemeal(ItemStack itemstack, World world, BlockPos pos, PlayerEntity player) {
		BlockState blockstate = world.getBlockState(pos);
		int hook = ForgeEventFactory.onApplyBonemeal(player, world, pos, blockstate, itemstack);
		if (hook != 0) return hook > 0;
		
		if (blockstate.getBlock() instanceof IGrowable) {
			IGrowable igrowable = (IGrowable)blockstate.getBlock();
			if (igrowable.isValidBonemealTarget(world, pos, blockstate, world.isClientSide)) {
				if (world instanceof ServerWorld) {
					if (igrowable.isBonemealSuccess(world, world.random, pos, blockstate)) {
						igrowable.performBonemeal((ServerWorld)world, world.random, pos, blockstate);
					}
					
					if (!player.isCreative()) {
						itemstack.shrink(1);
					}
				}
				
				return true;
			}
		}
		
		return false;
	}
commented

Having a similar issue:
Minecraft 1.16.5
Pams Crops 1.0.2
Mystical Agriculture 4.2.0

I have Mystical Agriculture installed, and both Mystical Fertilizer and Mystical Essence do not work on crops - here is the line for the useOn for fertilizer: https://github.com/BlakeBr0/MysticalAgriculture/blob/b4c0bebc690504192591cd8392bf11655498efa6/src/main/java/com/blakebr0/mysticalagriculture/item/MysticalFertilizerItem.java#L43

After process of elimination, this starts working when I disable Pams Crops.

Same as above, love the mod/mods - thank you for spending so much time on them.