This source is a simple source to help devs place a lot of blocks without mutch lag.
How to use:
First You need to get the method of creating blocks.
With this you can use the methods with api.method
setBlockFast(World world, int x, int y, int z, int blockId, byte data);
//Set the block fast without updating Light or chunk
//Example usage: setBlockFast(World,BlockCordx,BlockCordy,BlockCordz,BlockId,BlockData);
updateBlocksLight(World w,int Blockx1,int Blockz1,int Blockx2,int Blockz2);
//This method will update the Blocks light between block1 and block 2,
//Example Usage
setBlockFast(World,Corner1CordX,Corner1CordZ,Corner2CordX,Corner2CordZ);
updateChunk(World w,int Blockx1,int Blockz1,int Blockx2,int Blockz2);
//This method will update the chunk to the server and players
//Example: same as the updateBlocksLight
Example usage of plugin:
//The above method took about 18839ms to finish.
//The block quantity is: 500x500x50 = 12.500.000
How to use:
First You need to get the method of creating blocks.
Code (Text):
FastBlockAPI api = FastBlockAPI.getAPI();
Code (Text):
setBlockFast(World world, int x, int y, int z, int blockId, byte data);
//Set the block fast without updating Light or chunk
//Example usage: setBlockFast(World,BlockCordx,BlockCordy,BlockCordz,BlockId,BlockData);
updateBlocksLight(World w,int Blockx1,int Blockz1,int Blockx2,int Blockz2);
//This method will update the Blocks light between block1 and block 2,
//Example Usage
setBlockFast(World,Corner1CordX,Corner1CordZ,Corner2CordX,Corner2CordZ);
updateChunk(World w,int Blockx1,int Blockz1,int Blockx2,int Blockz2);
//This method will update the chunk to the server and players
//Example: same as the updateBlocksLight
Example usage of plugin:
Code (Text):
long time = System.currentTimeMillis();
Location loc = p.getLocation();
int Playerx = loc.getLocation().getBlockX();
int Playery = loc.getLocation().getBlockY();
int Playerz = loc.getLocation().getBlockZ();
World w = loc.getWorld();
FastBlockAPI api = FastBlockAPI.getAPI();
api.updateChunk(w, Playerx +500, Playerz +500, Playerx, Playerz);
for(int x = 0;x < 500; x++){
for(int z = 0; z < 500; z++){
for(int y = 0; y < 50;y++){
api.setBlockFast(w, Playerx + x,Playery + y,Playerz + z,1,(byte)0);
}
}
}
api.updateChunk(w, Playerx +500, Playerz +500, Playerx, Playerz);
api.updateBlocksLight(w, Playerx +500, Playerz +500, Playerx, Playerz);
System.out.print((System.currentTimeMillis() - time) + "ms was taken to place the blocks!");
Location loc = p.getLocation();
int Playerx = loc.getLocation().getBlockX();
int Playery = loc.getLocation().getBlockY();
int Playerz = loc.getLocation().getBlockZ();
World w = loc.getWorld();
FastBlockAPI api = FastBlockAPI.getAPI();
api.updateChunk(w, Playerx +500, Playerz +500, Playerx, Playerz);
for(int x = 0;x < 500; x++){
for(int z = 0; z < 500; z++){
for(int y = 0; y < 50;y++){
api.setBlockFast(w, Playerx + x,Playery + y,Playerz + z,1,(byte)0);
}
}
}
api.updateChunk(w, Playerx +500, Playerz +500, Playerx, Playerz);
api.updateBlocksLight(w, Playerx +500, Playerz +500, Playerx, Playerz);
System.out.print((System.currentTimeMillis() - time) + "ms was taken to place the blocks!");
//The block quantity is: 500x500x50 = 12.500.000
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.12
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
FastBlockAPI (Suported Versions: v1_12_R1) is a free Minecraft Java mod. Compatible with Minecraft 1.12. Downloaded 126 times (via Spigot). Download it and open it directly in the game.