net.minecraft -> Cannot resolve symbol 'minecraft'

Discussion in 'Plugin Development' started by Poplo, Nov 9, 2020.

  1. Offline

    Poplo

    Hi all,

    I'm trying to find a way to update many blocks at once without lag. I read that setBlock() is very slow, and I found other methods, like getByCombinedId() or chunkCoordIntPairQueue, that should be more efficient.
    The problem is, I need to import net.minecraft.xxx.xxx and I get the error Cannot resolve symbol 'minecraft'.
    I'm using IntelliJ with the Minecraft Dev plugin.

    Any help would be greatly appreciated...
    Poplo.
     
  2. Offline

    timtower Moderator Moderator

    @Poplo You can also spread out the updates over multiple blocks.
    And you need to build on CraftBukkit for that instead of Bukkit
     
  3. Offline

    Poplo

    Thank you for you answer timtower. Though, I don't get what I have to do different, what do you mean by "build on CraftBukkit for that instead of Bukkit" ?
    For the first proposition, you mean still using setBlock() but cut the process in small pieces ?
     
  4. Offline

    timtower Moderator Moderator

    @Poplo CraftBukkit is the server itself, you need to add it to the build path for the net.minecraft imports.
    And yes, do it in batches of hundreds of blocks per tick.
     
  5. Offline

    Poplo

    I tried to batch the process already, but the performance was really really poor.

    I generated craftbukkit-1.16.4.jar using BuildTools. Here are my librairies, but I couldn't find the way to add the jar ?
    [​IMG]
     
  6. Offline

    timtower Moderator Moderator

    @Poplo No idea how intelij works
     
  7. Offline

    Poplo

    now, no double posting, right ? :p
     
    Last edited: Nov 11, 2020

Share This Page