Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom bonemeal via kelp compatibility #47

Open
ricksouth opened this issue Aug 8, 2021 · 1 comment
Open

Custom bonemeal via kelp compatibility #47

ricksouth opened this issue Aug 8, 2021 · 1 comment

Comments

@ricksouth
Copy link

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;
	}
@codewolf219
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants