5000 cobble items on the ground in one place = Lag Time!
.
WHAT DOES IT DO
The problem is too many items floating on the ground or too many invisible ones that stay in the server or too many generated effects or even a mystery area causing huge lag times every time a player goes near that place (lagging the whole server).
As an op you may go to the problem location, preferably the middle of it, and do an /entitycount to see the number of Entities and TileEntities and EntityItems in that area. If it seems excessive such as the 4100+ mysterious entities floating above a beehive farm, that only occasionally appear as flames in the sky, then try this: /nukeentities and it may almost instantly remove the lag, as it did for me. The command removed all entities in the area. The area of effect is a default distance of 32 blocks in all directions from you, so know what is around you before you use this. Also you may specify the radius as a parameter.
I needed this for my server several times under different curcumstances. I've seen cobble generators spew 1000s of blocks out causing lag time. Also server crashes leaving malfunctioning mods, and accidental(or not) explosions leaving 1000s of items floating about. Or even 700+ arrows still stuck in the walls and not despawning. The tool has been tested well. It works in single or multiplayer.
Be careful. If you use a large radius number you are probably affecting all active areas of the server. This means player's animal farms too. Farm animals, monsters, pets, and all other animals are entities. There are other types of entities in game as well. /nukeentities removes them all in an area. Note that TileEntities include machines, chests, and many plants. Entities and TileEntities are different sets of things in game. Removing them means they are gone. You do not get them back. There is a reason this is an operator only set of commands. Be smart and responsible.
This is an op only tool and only needs to be installed on the server side. Clients do not need it, for it to be used. Installing it is just dropping the downloaded file into the /mods/ folder and restarting the game as usual for any forge mod.
COMMANDS
In chat type...
/entitycount or /ecount to count all entities in range. It displays the number of: items, hostile monsters(mobs), animals, arrows, other entities, total entities, and tile entities.
/nukeitems to remove EntityItems such as those dropped on the ground. (a sub type of Entity)
/nukearrows Removes all arrows in range. Due to a bug in Minecraft, arrows sometimes do not despawn
/limitanimals range limit will remove all but the limit-number of animals of each type of animal in range. Farm animals are entity animals. If you have 300 chickens, 500 cows, and 26 pigs within the range, then if you do a /limitanimals 32 40 it will affect a radius of 32 and you should end up with 40 chickens, 40 cows, and 26 pigs. 40 is the default if you do not spefify the limit.
/nukenonanimals will remove all living entities but not remove any animals in range. Farm animals such as sheep and pigs are entity animals and would not be removed.
/listother Displays a list of other entity's short names and counts in range. This refers to the "other entities" counted by /entitycount. See example of this.
/nukeother Removes all other entities in range. This refers to the "other entities" counted by /entitycount.
/nukemobs to remove EntityMobs. (a sub type of Entity)
/nukeentities or /nukeents to remove all Entities in range
/listtiles Displays a list of tile entity types by their short names and counts.
/nuketileentities or /nuketiles to remove all TileEntities in range. Remember that TileEntities are different than Entities.
/nukeup to remove all blocks from your standing location to up all the way
/filldown to add fill from below your standing location to bedrock. Also it repairs any holes in the bedrock bottom layer.
/lagfix Displays a quick reference of all commands in this mod. Any command with "help" after it will do the same.
Specifically filldown fills all air and flowing water and flowing lava with layers as follows: grass(1 deep) dirt(2 deep) stone(3 deep) cobble(fill...) then bedrock(1 deep) at the very bottom layer. Do note that all caves below the area will be filled with cobble which should prevent monsters from spawning below the area. Its handy to make big flat grassy areas, or with a small radius (/filldown 0) make an instant location marker tower if you are flying. This command was just a quick fix for large gaping holes. It was added to crudely fill in holes from /nukeup. It is an operator only command.
One optional parameter specifies the radius of the area for any of the commands.
Its default is 32. So the block you are on then 32 blocks out.
Diameter is 65 = 32+1+32, covering a 65 by 65 square area.
CommandBlock Compatible. Command blocks using /nukeup will clear from the block directly above itself up. Since CommandBlocks are TileEntities, when they use /nuketileentities they will nuke every tile entity except command blocks within the radius.
DOWNLOAD
For Minecraft 1.6.4
On the page remember to select the version
for your Minecraft version. Click HERE for downloads.
Thank you so much! Mr. Lag Time tends to activate whenever a mob gets near because of all the things that go on near my base :/ I'll make good use of this.
I've already killed half my animals with no reduce in lag. I'll search for hidden and strange entities around, thanks.
Is there a reason for animal farms to lag much more in 1.7.10 when compared to 1.5.2 that I used to play? Is this an acknowledged problem by Mojang? Will it be fixed?
Yep, not the most efficient game design but still very fun. You are very welcome. The LagFix is for a very specific and common problem but I hope it helped you check the area with /entitycount anyway.
Another major lag problem with minecraft that I have had is that when players explore out to never seen territory it bogs the server down and brings the game almost to a halt. When I watch the cpu usage during this exploration problem it shows 1 out of 8 CPUs at 100% capacity and the rest of them doing the usual almost nothing. This leads me to believe that generation of new chunks is not multithreaded and I believe it should be rewritten in the core code of minecraft.
Currently LagFix (version 1.0.3) does not work with command blocks.
I just experimented and easily coded the command block functionality into the mc1.6.4 version of LagFix (not yet released) and tested it. It works well. I could code it for the 1.7.2 and 1.7.10 minecraft versions of it if this is wanted.
In my test version I found no idea of how to use the /entitycount command in a command block. Also I changed /nukeup to start from the y-coordinate +2 going up so it would not nuke itself and so it could be hidden and still /nukeup an area. And I changed the /nuketileentities to not nuke any command blocks (it is a tile entity). Each of these changes are ONLY changed for the command block functionality and do not affect the commands used by operators as described at the top of the thread.
What would you like to see for its functionality? Perhaps give me an example of use?
The Meaning of Life, the Universe, and Everything.
Join Date:
10/10/2010
Posts:
228
Member Details
Well, I'm working with 1.7.10, and to be completely honest I'm making an adventure map.
Using ComputerCraft and Command Blocks, i managed to make a program that will make random-generated treasure chests. I only have one problem with them: when I place new ones, the old ones spill their contents. I was hoping to use the nukeitems command to clear away item drops in the adventure area (and only in the adventure area) after regenerating it.
If it works in a command block with a radius, I will be very happy.
Version 1.1.0 RELEASED and now CommandBlock Compatible. Command blocks using /nukeup will clear from the block directly above itself up. Since CommandBlocks are TileEntities, when they use /nuketileentities they will nuke every tile entity except command blocks within the radius.
.
Also minor improvements to the /entitycount display showing more information.
.
This is for Minecraft versions 1.6.4 1.7.2 and 1.7.10
The Meaning of Life, the Universe, and Everything.
Join Date:
7/17/2013
Posts:
50
Member Details
Hi! I'm not all that knowledgeable with entity types, but I was wondering if this mod is able to remove /just/ the arrows shot by skeletons. There's a known bug that allows skeleton-shot arrows to persist indefinitely, potentially contributing to lag especially if there are skeleton farms.
1.8 has added commands that make it possible to despawn the arrows throughout the entire world, but I'm one of the people content with sticking to 1.7.10 until they iron out all the bugs from 1.8. I just want to be able to nuke these types of entities without killing animals, testificates, etc. If this is already possible with your current build, then I apologize since I'm not familiar with the terms used.
Edit: I should have specified that I'm hoping to be able to nuke it at a wide radius, clearing entire chunks at a time. Walking next to an arrow and clearing it with a small radius should probably work just fine.
Quick answer: this does not do exactly what you asked for, with the current version 1.1.0 of LagFix.
I did an /entitycount 10 after shooting 6 arrows into the wall and it said it detected "6 other entities found."
So two answers:
Yes it will work to do a /nukeentities 10
to remove all entities within 10 blocks of you, but this removes all animals, testificates, monsters, personal pets, and arrows etc in that radius. Not ideal but still useful in the right curcumstances.
No it will not work
to remove just the arrows and if you use a large number radius. It will probably be very harmful to all non-player life forms and dropped items etc on the server. Note that if you do not specify the radius number, it defaults to affecting 32 blocks out from you, in a square with you in the middle, from bedrock to sky top.
Bottom line:
I will probably include an appropriate command in the next version of Entity LagFix to remove other entities or maybe a "/nukearrows" command. Thank you.
PS: i also tested this with arrows shot by skeletons and its the same as arrows shot by myself.
The Meaning of Life, the Universe, and Everything.
Join Date:
7/17/2013
Posts:
50
Member Details
Thanks for the reply! yeah I'll just have to make sure it's all clear from bedrock to sky. Otherwise, a small radius nuke could do the trick in case of emergencies. Repped and downloaded for a useful maintenance mod.
It's currently marked resolved, but this bug has opened and closed several times now. I guess I just got so used to loathing it that I want to make SURE I can counter it, regardless of whether it's been squashed or not.
In consideration of this being a game bug issue, i will move this up my priority list and i will make a /nukearrows command in Entity LagFix sooner than it would have been.
An idea is to put a command block on a redstone timer to do a command "/nukearrows 99999", maybe every 5 minutes or so. Perhaps the command block should be in the chunk main spawn is in so that it stays loaded.
This new command is not written or released yet, but will be.
EDIT(3-10-2015): I've finished coding this and additional features for mc1.7.10, Ive tested it in single player and its working beautifully. NEXT i test it in a test multiplayer server, then convert code for the other versions of minecraft and test those in single and multiplayer. Then I will release this here to the net. well, thats the plan at the moment.
The new quick reference help screen will look like this:
/lagfix quick reference (version 2.0.0) /entitycount or /ecount to count all entities in range /listother /nukeother /nukearrows /nukemobs /lagfix /nukeitems to remove all items such as floating on ground /limitanimals <r> <limit> /nukenonanimals <r> (living only) /nukeentities or /nukeents to remove all entities in range /listtiles /nuketileentities or /nuketiles in range /nukeup /filldown affects all blocks in range
One optional parameter specifies the radius of the area.
Its default is 32. Diameter is 65 = 32+1+32 a 65 by 65 area
The blue things above are new.
The /limitanimals will remove all but the limit-number of animals of each type of farm animal in range. If you have 300 chickens, 500 cows, and 26 pigs within the range, then if you do a /limitanimals 32 40 it will affect a radius of 32 and you should end up with 40 chickens, 40 cows, and 26 pigs. 40 is the default if you do not spefify the limit.
The /nukenonanimals will remove all living entities but not remove any (farm) animals in range.
These changes are not yet released as of Tuesday March 10, 2015. But are working and due out soon.
.
/nukeitems to remove EntityItems such as those dropped on the ground. (a sub type of Entity)
/nukemobs to remove EntityMobs. (a sub type of Entity)
/nukeentities or /nukeents to remove all Entities in range
/nuketileentities or /nuketiles to remove all TileEntities in range. Remember that TileEntities are different than Entities.
/nukeup to remove all blocks from your standing location to up all the way
/filldown to add fill from below your standing location to bedrock. Also it repairs any holes in the bedrock bottom layer.
/lagfix Displays a quick reference of all commands in this mod. Any command with "help" after it will do the same.
Specifically filldown fills all air and flowing water and flowing lava with layers as follows: grass(1 deep) dirt(2 deep) stone(3 deep) cobble(fill...) then bedrock(1 deep) at the very bottom layer. Do note that all caves below the area will be filled with cobble which should prevent monsters from spawning below the area. Its handy to make big flat grassy areas, or with a small radius (/filldown 0) make an instant location marker tower if you are flying. This command was just a quick fix for large gaping holes. It was added to crudely fill in holes from /nukeup. It is an operator only command.
One optional parameter specifies the radius of the area for any of the commands.
Its default is 32. So the block you are on then 32 blocks out.
Diameter is 65 = 32+1+32, covering a 65 by 65 square area.
CommandBlock Compatible. Command blocks using /nukeup will clear from the block directly above itself up. Since CommandBlocks are TileEntities, when they use /nuketileentities they will nuke every tile entity except command blocks within the radius.
On the page remember to select the version
for your Minecraft version.
Click HERE for downloads.
You may include this in mod packs.
License is Creative Commons Attribution. (totally free with credit where it is due).
Both Single and Multi player.
Only needed on server side for multiplayer servers.
Source code is included.
This is a Forge mod. No Bukkit is needed.
The commands are simple.
Feedback is very welcome! Thoughts Ideas and Suggestions... post away.
You may love these other utility mods that are very useful: Opis(forge) and ClearLag(bukkit)
.
.
.
Shameless Plug: Check out SpawnCommands Teleport Mod, Simple Usage Log, OpMe
my published mods
Added /nukemobs and /lagfix help command and changed /nuketileentities to make them all air.
Next: port to mc 1.7.2 and 1.7.10
my published mods
It only needed minor code updates.
Working and tested.
my published mods
I have had chicken farms that would lag the server. The solution was to have less chickens.
In the description above it says "be careful"... read that too.
my published mods
I've already killed half my animals with no reduce in lag. I'll search for hidden and strange entities around, thanks.
Is there a reason for animal farms to lag much more in 1.7.10 when compared to 1.5.2 that I used to play? Is this an acknowledged problem by Mojang? Will it be fixed?
I guess the only solution is to kill half of them, at least until Mojang fix it. I'll do it by my sword.
Thanks for your help!
Another major lag problem with minecraft that I have had is that when players explore out to never seen territory it bogs the server down and brings the game almost to a halt. When I watch the cpu usage during this exploration problem it shows 1 out of 8 CPUs at 100% capacity and the rest of them doing the usual almost nothing. This leads me to believe that generation of new chunks is not multithreaded and I believe it should be rewritten in the core code of minecraft.
I still love minecraft.
my published mods
I just experimented and easily coded the command block functionality into the mc1.6.4 version of LagFix (not yet released) and tested it. It works well. I could code it for the 1.7.2 and 1.7.10 minecraft versions of it if this is wanted.
In my test version I found no idea of how to use the /entitycount command in a command block. Also I changed /nukeup to start from the y-coordinate +2 going up so it would not nuke itself and so it could be hidden and still /nukeup an area. And I changed the /nuketileentities to not nuke any command blocks (it is a tile entity). Each of these changes are ONLY changed for the command block functionality and do not affect the commands used by operators as described at the top of the thread.
What would you like to see for its functionality? Perhaps give me an example of use?
my published mods
Using ComputerCraft and Command Blocks, i managed to make a program that will make random-generated treasure chests. I only have one problem with them: when I place new ones, the old ones spill their contents. I was hoping to use the nukeitems command to clear away item drops in the adventure area (and only in the adventure area) after regenerating it.
If it works in a command block with a radius, I will be very happy.
EDIT: Sept 11th, 2014 Done did it.
my published mods
I'll try to increase this number only after 1.8.
Thanks for your help, andrenoel.
.
Also minor improvements to the /entitycount display showing more information.
.
This is for Minecraft versions 1.6.4 1.7.2 and 1.7.10
my published mods
1.8 has added commands that make it possible to despawn the arrows throughout the entire world, but I'm one of the people content with sticking to 1.7.10 until they iron out all the bugs from 1.8. I just want to be able to nuke these types of entities without killing animals, testificates, etc. If this is already possible with your current build, then I apologize since I'm not familiar with the terms used.
Edit: I should have specified that I'm hoping to be able to nuke it at a wide radius, clearing entire chunks at a time. Walking next to an arrow and clearing it with a small radius should probably work just fine.
I did an /entitycount 10 after shooting 6 arrows into the wall and it said it detected "6 other entities found."
So two answers:
Yes it will work to do a
/nukeentities 10
to remove all entities within 10 blocks of you, but this removes all animals, testificates, monsters, personal pets, and arrows etc in that radius. Not ideal but still useful in the right curcumstances.
No it will not work
to remove just the arrows and if you use a large number radius. It will probably be very harmful to all non-player life forms and dropped items etc on the server. Note that if you do not specify the radius number, it defaults to affecting 32 blocks out from you, in a square with you in the middle, from bedrock to sky top.
Bottom line:
I will probably include an appropriate command in the next version of Entity LagFix to remove other entities or maybe a "/nukearrows" command. Thank you.
PS: i also tested this with arrows shot by skeletons and its the same as arrows shot by myself.
my published mods
Here's the bug I mentioned. https://bugs.mojang.com/browse/MC-31577
It's currently marked resolved, but this bug has opened and closed several times now. I guess I just got so used to loathing it that I want to make SURE I can counter it, regardless of whether it's been squashed or not.
An idea is to put a command block on a redstone timer to do a command "/nukearrows 99999", maybe every 5 minutes or so. Perhaps the command block should be in the chunk main spawn is in so that it stays loaded.
This new command is not written or released yet, but will be.
EDIT(3-10-2015): I've finished coding this and additional features for mc1.7.10, Ive tested it in single player and its working beautifully. NEXT i test it in a test multiplayer server, then convert code for the other versions of minecraft and test those in single and multiplayer. Then I will release this here to the net. well, thats the plan at the moment.
The new quick reference help screen will look like this:
/lagfix quick reference (version 2.0.0)
/entitycount or /ecount to count all entities in range
/listother /nukeother /nukearrows /nukemobs /lagfix
/nukeitems to remove all items such as floating on ground
/limitanimals <r> <limit> /nukenonanimals <r> (living only)
/nukeentities or /nukeents to remove all entities in range
/listtiles /nuketileentities or /nuketiles in range
/nukeup /filldown affects all blocks in range
One optional parameter specifies the radius of the area.
Its default is 32. Diameter is 65 = 32+1+32 a 65 by 65 area
The blue things above are new.
The /limitanimals will remove all but the limit-number of animals of each type of farm animal in range. If you have 300 chickens, 500 cows, and 26 pigs within the range, then if you do a /limitanimals 32 40 it will affect a radius of 32 and you should end up with 40 chickens, 40 cows, and 26 pigs. 40 is the default if you do not spefify the limit.
The /nukenonanimals will remove all living entities but not remove any (farm) animals in range.
These changes are not yet released as of Tuesday March 10, 2015. But are working and due out soon.
my published mods