# Question Minecraft Ticks And RPM

Discussion in 'General Help' started by PENGUllN, Aug 3, 2015.

Not open for further replies.
1. Offline

### PENGUllN

So I know your gonna look at this like what is he but I need a bit of help
I'm making guns and I want to keep it realistic so I want the

Real life RPM (rounds per minute) to find out the time delay per shot
I need a calculation so if a gun in real life had a
rounds per minute being 145RPM could I work out the delay in witch each shot is and covert that delay
info Minecraft tick being 1 tick as 0.1 seconds I just need a explanation or calculation please

#1
2. Offline

### Boomer

minecraft defines 1 second as 20 ticks
|On a properly working server this will be true
When the server is lagging mildly due to aggressive cpu load, that may be 19
When the server is lagging hard due to aggressive cpu load, that will often be 16-18

When the server is lagging so hard players are snapping back a lot, timing out, and the server is booting people, it will be as little as 5 ticks making a second.

Minecraft does what it can to divide the work on each tick cycle do do what it needs, and have enough left over to do some waiting, to space the work out. If there is too much work to do in one tick compared to the 1/20th of a second, it will just keep running all the time right as soon as it can, no resting.

So you will find it close to impossible to be absoultely sure, but can go with the 20ticks per second and keep the server tuned well. Just dont make your code horribly inefficient so that it ends up being the source of lag distorting time itself on you

As for the calcs: 145 rounds per minute, one minute is 60 seconds = 60x20 ticks = 1200 ticks
145 rpm = 145 rounds/1200 ticks = ~0.12 rounds per tick, or approximately 1 round per 8 ticks
Doublecheck: 1200 ticks at 1r/8tick = 150 rounds

Last edited by a moderator: Aug 3, 2015
#2
3. Offline

### PENGUllN

Hey Boomer thanks so much I mean the plugin is my problem the lag on servers will be there problems to fix I guess anyway thanks for the calculation

#3
4. Offline

### Boomer

Provided the lag isn't coming from you, or you're not contributing to the issue... yes, the lag is their problem is a good attitude to have. You can only do what the standards and conventions are created for, and properly working on those conditions is your only target. If they are already having problems with tps, adding one more plugin that does work certainly can't free up any resources can it

#4
5. Offline

### PENGUllN

Yeh I'm sorry if i worded it the wrong way

#5