Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

    • the mod Jade needs to update for the newer forge versions, if you want to use this mod downgrad to 39.0.44 or wait for a update of the mod
    • Hi! Java veteran, but new to modding. I'm working on ny very first mod experiments and I'm playing with increasing the reach of a pickaxe by following veins of ore and other fun things.  Whenever I break a block and have a certain custom enchantment on my pickaxe, I want to break a few additional nearby blocks as well. Seems simple enough. I also want it to kind of "ripple" through the environment, so my thought was to put the blocks to be destroyed on a queue and let a tick event subscriber pick them up, one for each tick. I have this: @SubscribeEvent public static void onTick(final TickEvent e) { if (MegaMinerEvents.queue.isEmpty()) { return; } final BlockToBreak b = MegaMinerEvents.queue.removeFirst(); final BlockState bs = b.world.getBlockState(b.pos); bs.getBlock() .playerDestroy(b.player.getLevel(), b.player, b.pos, bs, null, b.player.getMainHandItem()); b.player.getLevel().removeBlock(b.pos, false); }   As you can see, I simply pop a block from the queue every tick and break it. It sort of works.  However, I'm wondering if Block::playerDestroy is the right method to call. First of all, it doesn't actually remove the block. Second, it doesn't trigger any events from what I can see. The vanilla game itself is using ServerPlayerGameMode::destroyBlock(), but that method isn't accessible from any context I'm in. So the question is: Is Block::playerDestroy the right method to use? What other things, like sending events and checking things to I need to do if I use that method? Also, is "onTick" the right place to do this?   Thanks! NJSwede
    • So i have an item that changes player arm model positions and rotations when holding right click on it (like bow and trident). The problem is player arms became completely immovable, but item still have "bob effect" (when item moves slightly from side to side in player hand in third person view) and i want to disable it. I tried to search in vanillas code, but i didn't even figure out where this effect is applying. Is there any way to disable it?
    • [minecraft/Chunk]: Tried to load a block entity for block Block{minecraft:smithing_table} but failed at location BlockPos{x=-2, y=38, z=-123}   This error is spammed in my server in different xyz positions Help, manny thanx
  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.