AgriCraft

AgriCraft

30M Downloads

CropGrowth event not taking effect as intended

someaddons opened this issue ยท 1 comments

commented

Quick description

You're checking if the event is cancelled here

&& !MinecraftForge.EVENT_BUS.post(new BlockEvent.CropGrowEvent.Pre(this.getWorld(), this.getPos(), state))) {

but that event cannot be canceled and instead uses the event result event.setResult(Event.Result.DENY); so you need to check the event result after posting it on the bus, similar to how forge does it:

image

Related issues and searches

Mods and versions used

  • Minecraft:1.16.5
  • AgriCraft:agricraft-3.0.7
  • InfinityLib:Infinitylib-2.0.7
  • [List the other required mods here]

Steps to replicate the issue

  1. Loaded up ...
  2. Placed a ...
  3. Right-clicked with ... on ...

Expectations and explanations

Your environment

  • How are you playing?
    • Operating System:
    • Launcher:
    • Modpack:
  • What kind of server:
    • Singleplayer
    • Multiplayer
  • Game Modes:
    • Survival
    • Creative
  • Save File:
    • Brand new save
    • Only an existing save

Links to crash logs, stack traces, etc

Screenshots (or videos)

commented

My bad, good find!