In this post, I share some simple HTML and javascript to make Minecraft tick a calculator.
HTML
<hr>
<div style="overflow: hidden;">
<p id="title" style="float: left;">> Minecraft Tick Generator.</p>
<p style="float: right;">Created By: mrjohndoe69</p>
</div>
<hr>
<div class="container">
Seconds: <input id="seconds" type="text">
<br><br>
Minutes: <input id="minutes" type="text">
<br><br>
Hours: <input id="hours" type="text">
<br><br>
Days: <input id="days" type="text">
<br><br>
Years: <input id="years" type="text">
<button id="calculate" onclick="calculate()">Calculate</button>
<br><br>
Ticks: <input id="output1" type="text" disabled>
<button onclick="myFunction()">Clear</button>
</div>
Add some CSS
* {
font-family:Arial;
font-size:95%;
color:black;
}
input {
border:1px solid black;
border-radius:3px;
color:black;
}
button {
background-color:transparent;
color:black;
border:1px solid black;
border-radius:3px;
}
.container {
padding:20px;
}
Finally JS
function calculate() {
var outputNumber1 = document.getElementById('seconds').value *(20) +
document.getElementById('seconds').value * 20 +
document.getElementById('minutes').value *(60 * 20) +
document.getElementById('hours').value *(60 * 60 * 20) +
document.getElementById('days').value *(60 * 60 * 24 * 20) +
document.getElementById('years').value *(60 * 60 * 24 * 365 * 20);
document.getElementById('output1').value = parseInt(outputNumber1);
}
function myFunction() {
document.getElementById('seconds').value = "";
document.getElementById('minutes').value = "";
document.getElementById('hours').value = "";
document.getElementById('days').value = "";
document.getElementById('years').value = "";
document.getElementById('output1').value = "";
}

Brijpal Sharma is a web developer with a passion for writing tech tutorials. Learn JavaScript and other web development technology.