invisible blocks

Started by Red moder on

Topic category: Troubleshooting, bugs, and solutions

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
invisible blocks

 

let's determine I have a bullet that hits a block and when it hits a block it puts AIR blocks within a radius of 25 blocks and then it does it 2 TIMES (because it should do it once)
and last time invisible blocks are created in places ah where there was no AIR.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This sounds like a client…
Fri, 05/09/2025 - 12:27

This sounds like a client/server desynchronization issue.

It can be solved by putting the entire procedure in an if statement with the condition (not(is provided world client-side)) that will force it to run on server-side only (which includes the singleplayer internal server) and will prevent it from placing invisible/ghost blocks.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
here is the java code:…
Sat, 05/10/2025 - 09:17

here is the java code:

package net.mcreator.quantumdestruction.procedures;


import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.Level;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.ai.goal.RemoveBlockGoal;

import org.apache.commons.io.input.BOMInputStream;

public class BoomProcedure {


public static void removeBomb(LevelAccessor world, double x, double y, double z){
world.setBlock(BlockPos.containing(x, y, z), Blocks.AIR.defaultBlockState(), 3);
if (world instanceof Level _level){
_level.updateNeighborsAt(BlockPos.containing(x, y, z), _level.getBlockState(BlockPos.containing(x, y, z)).getBlock());
}
}
public static void execute(LevelAccessor world, double x, double y, double z) {
// world.setBlock(BlockPos.containing(x, y+7, z), Blocks.AIR.defaultBlockState(), 3);
int RAY = 25;
for (int index0 = 0; index0 < (int) RAY; index0++) {
for (int index1 = 0; index1 < (int) RAY; index1++) {
for (int index2 = 0; index2 < (int) RAY; index2++) {
if ((index0*index0+index1*index1+index2*index2)<RAY*RAY){
removeBomb(world,x-index0, y-index1, z-index2);
removeBomb(world,x+index0, y-index1, z-index2);
removeBomb(world,x-index0, y+index1, z-index2);
removeBomb(world,x+index0, y+index1, z-index2);
removeBomb(world,x-index0, y-index1, z+index2);
removeBomb(world,x+index0, y-index1, z+index2);
removeBomb(world,x-index0, y+index1, z+index2);
removeBomb(world,x+index0, y+index1, z+index2);
}
}
}
}
}
}
 
world.setBlock(BlockPos…
Mon, 05/12/2025 - 15:25

world.setBlock(BlockPos.containing(x, y, z), Blocks.AIR.defaultBlockState(), 3);
        if (world instanceof Level _level){
            _level.updateNeighborsAt(BlockPos.containing(x, y, z), _level.getBlockState(BlockPos.containing(x, y, z)).getBlock());
        }

This code looks a bit suspicious to me, and also does not look like it is MCreator generated

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
  because it is not.
Tue, 05/13/2025 - 08:48

 

because it is not.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
  As for the code generated…
Tue, 05/13/2025 - 09:06

 

As for the code generated by MCreator, it's okay.

 I can show you a snapshot.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
  snapshot ready!
Thu, 05/29/2025 - 07:33

 

snapshot ready!