FastBlockAPI (Suported Versions: v1_12_R1)
1.0FastBlockAPI is an api for developers that can place a lot of blocks with no mutch lag.
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.
FastBlockAPI api = FastBlockAPI.getAPI();
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:
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!");
//The above method took about 18839ms to finish.
//The block quantity is: 500x500x50 = 12.500.000
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta