{"id":13515283,"url":"https://github.com/TheGaming999/BlockChanger","last_synced_at":"2025-03-31T04:36:50.248Z","repository":{"id":38026532,"uuid":"483355223","full_name":"TheGaming999/BlockChanger","owner":"TheGaming999","description":"1.7 - 1.20.4 util that allows you to change blocks at blazing fast speeds","archived":false,"fork":false,"pushed_at":"2024-09-26T07:43:00.000Z","size":143,"stargazers_count":51,"open_issues_count":5,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-01T19:36:14.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheGaming999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-19T18:00:55.000Z","updated_at":"2024-10-25T01:01:52.000Z","dependencies_parsed_at":"2024-01-12T14:19:41.238Z","dependency_job_id":"197ee1ed-55ed-4a7f-b625-e390dacb3628","html_url":"https://github.com/TheGaming999/BlockChanger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheGaming999%2FBlockChanger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheGaming999%2FBlockChanger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheGaming999%2FBlockChanger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheGaming999%2FBlockChanger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheGaming999","download_url":"https://codeload.github.com/TheGaming999/BlockChanger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246418658,"owners_count":20773934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:08.822Z","updated_at":"2025-03-31T04:36:46.091Z","avatar_url":"https://github.com/TheGaming999.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# BlockChanger\n\u003cdiv align=\"center\"\u003e\n\n  \u003ca href=\"\"\u003e[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FTheGaming999%2FBlockChanger.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FTheGaming999%2FBlockChanger?ref=badge_shield)\u003c/a\u003e\n  \u003ca href=\"\"\u003e [![Codacy Badge](https://app.codacy.com/project/badge/Grade/a1ecc2905ea14fd39b29a5a3df2d124c)](https://www.codacy.com/gh/TheGaming999/BlockChanger/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=TheGaming999/BlockChanger\u0026amp;utm_campaign=Badge_Grade)\u003c/a\u003e\n\n\u003c/div\u003e\nA single class that offers very fast block placement methods from NMS using static final method handles, inheritance, and abstraction, designed to support multiple versions (1.7.10 - 1.20.4) and minimize the overhead of reflection as much as possible. Currently, only the first three methods from the thread below are supported.\n  \nPlease refer to this thread for more information: (https://www.spigotmc.org/threads/methods-for-changing-massive-amount-of-blocks-up-to-14m-blocks-s.395868/)  \n\n### Setup\nJust import the class to your project.  \n### Usage\n```java\n// player location as an example.\nPlayer player = ...\nBlockChanger.setBlock(player.getLocation(), Material.GOLD_BLOCK);\nBlockChanger.setBlock(player.getLocation(), new ItemStack(Material.GOLD_BLOCK));\n\n// Usage of async methods is the same as the regular methods.\n// Type 1: Set block by NMS World method (nmsWorld#setTypeAndData) (80-90K blocks per second)\nBlockChanger.setBlockAsynchronously(player.getLocation(), new ItemStack(Material.STONE), false);\n// Type 2: Set block by NMS Chunk method (nmsChunk#setType) (2.19M blocks per second)\nBlockChanger.setChunkBlockAsynchronously(player.getLocation(), new ItemStack(Material.DIRT), false);\n// Type 3: Set block by NMS ChunkSection method (nmsChunkSection#setType) (7.9M blocks per second)\nBlockChanger.setSectionBlockAsynchronously(player.getLocation(), new ItemStack(Material.GOLD_ORE), false);\n\n// cornerA and cornerB are locations.\n// This method returns a CompletableFuture\u003cVoid\u003e, which gets completed once all blocks are set.\nBlockChanger.setCuboidAsynchronously(cornerA, cornerB, new ItemStack(Material.DIAMOND_BLOCK), false)\n.thenRun(() -\u003e {\n\t// gets executed after cuboid has been filled entirely\n\tBukkit.broadcastMessage(\"COMPLETED!\");\n});\n\n// Fastest method (setSection).\nBlockChanger.setSectionCuboidAsynchronously(corner1, corner2, new ItemStack(Material.GLASS), false)\n.thenRunAsync(() -\u003e {\n\tBukkit.broadcastMessage(\"COMPLETED!\");\n});\n\nBlockChanger. // see all the methods\n```  \n### ToDo  \n- Method to update lighting?  \n\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FTheGaming999%2FBlockChanger.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FTheGaming999%2FBlockChanger?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheGaming999%2FBlockChanger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheGaming999%2FBlockChanger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheGaming999%2FBlockChanger/lists"}