MCreator 2023.2, for Fabric 1.19.2: minecraft.world.World does not exist in intellisense or build

Started by Quicksand on

Topic category: Advanced modding

Last seen on 22:24, 17. Sep 2023
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MCreator 2023.2, for Fabric 1.19.2: minecraft.world.World does not exist in intellisense or build

Scenario
I made an MCreator 2023.2 project using the Fabric plugin a few days ago and I want my block to react to redstone by changing blockstate. For this I need to import net.minecraft.world.World and call World.setBlockState(). I'm overriding neighborChanged() in my class that extends Block. This is all strictly expected, vetted by my friend's code, online tutorials and references to these functions in multiple places.

Problem
Intellisense reports net.minecraft.world.World does not exist (it has no entry for World). Build fails on this, saying the symbol can't be found, but this should exist. Adding a procedure on neighbor changed and viewing its code reveals a weird discrepancy. The override for neighborChanged should be:
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
but is:
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block blockIn, BlockPos neighborBlock, boolean moving)
as registered by the procedure. The instance world unsurprisingly doesn't have setBlockState().

Why doesn't net.minecraft.world.World exist? How do I fix this? I did no manual tweaking outside this one block file. My mod is very small currently. My friend also made a brand new repo with the fabric plugin and encountered this issue, so let me know if this belongs on the MCreator issue tracker itself. Thank you in advance!

Last seen on 16:38, 15. Jul 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Same problem
Sun, 03/24/2024 - 12:27

Same problem