Quote from softmage114486»
I've thought of this before but never bothered to do it! But you can do something along the lines of..
function converToTick(seconds){//a function to convert seconds into game ticks!
return seconds *= 20;
}
function modTick(){
var grown = false;
i = 0;
//add some code here like when the seed is placed make placed = true or something... And then
i++;//add 1 to i
while(i != 0){//this is a loop
i++;//keep adding 1 to i
}
if(i >= convertToTick(20)){//if i == our amount of seconds
grown = true;//grown will == true!
}
if(grown == true){
i = 0;//reset the loop!
//code to do more stuffs here
}
}
Now you can edit the seconds to however long you want, then add more code so that when, grown = true; the crops are ready!! If you need more help just pm me
Thanks for the help! I'll test it out
1
you are only limited by your imagination child
...
1
I mean a variable sorry,
var a = false;
if(Player.getArmorSlot(0)==510) {
Player.setArmorSlot(1, 511, 0);
Player.setArmorSlot(3, 512, 0);
Entity.addEffect(getPlayerEnt(), MobEffect.waterBreathing, 3*3, 6, false, true);
a = true;
if(a == true){
Player.addItemInventory(511, -1, 0);
Player.addItemInventory(512, -1, 0);
a = false;
}}
Also your code was missing a lot of ";" if you dont put them it wont work!
1
I've thought of this before but never bothered to do it! But you can do something along the lines of..
function converToTick(seconds){//a function to convert seconds into game ticks!
return seconds *= 20;
}
function modTick(){
var grown = false;
i = 0;
//add some code here like when the seed is placed make placed = true or something... And then
i++;//add 1 to i
while(i != 0){//this is a loop
i++;//keep adding 1 to i
}
if(i >= convertToTick(20)){//if i == our amount of seconds
grown = true;//grown will == true!
}
if(grown == true){
i = 0;//reset the loop!
//code to do more stuffs here
}
}
Now you can edit the seconds to however long you want, then add more code so that when, grown = true; the crops are ready!! If you need more help just pm me
1
i didnt realise you could break any blocks in a/m i thought that was the whole point of it (to not break blocks) what you could use is barriers though /give minecraft: barrier
1
Hello i am softmage and i have just discovered something pretty cool when i was playing around with custom blocks!
If you have mad a custom block before then you will know of the Block.setShape(); function and you will know how limited it is as to setting the shape of the block...
Well i have discovered a way to make blocks with more then just one basic shape, with this you can make chairs with four legs, a seat and a back rest that all fit into the space of one block (16*16) and only using .js!!!
If you look at the attached photos you will see an odd looking block sort of like an upside down two legged table
but it is only 16*16 px like a normal block, now i am going to show you how i did this, it is not complicated but it might not be very useful at the moment...
simply copy and paste the code below and use tmi to get the blocks
Block.defineBlock(250, "§1My Block 1", [["stone", 0]], 3, false, 0);
Block.setShape(250, 0, 0, 0, 1, 1/16, 1);
Block.defineBlock(251, "§2My Block 2", [["stone", 0]], 3, false, 0);
Block.setShape(251, 12/16, -1, 12/16, 1, 0, 1);
Block.defineBlock(252, "§3My Block", [["stone", 0]], 3, false, 0);
Block.setShape(252, 0, -2, 0, 4/16, -1, 4/16);
Next get the blocks and then a third normal block like dirt, use the dirt and make a 3x1 dirt pillar thing, use "250" and tap the bottom dirt block, use "251" and tap the middle dirt and the same for 252 except tap the third dirt, then break the dirt! Make sure you do this all on the same side of the dirt tower too!
As you can see in the code above the y axis of the blocks has been dropped down so all three occupy the same block space when really it is actually 3 blocks high, now like I said before this might nkt be very usefull but I hope you guys like it, play around with the code and add more blocks and comment what you can make
!
The yellow and orage clay is there to show that is is 16*16
Also this is probably most likely to be used by people who make maps and mods to go with them, like you could make chairs for a cafe in a city map, or fire hydrants for the street so on, I hope you guys like it
1
Hello every body! I am softmage114486 and I have recently just got an amazing idea for a mod! I can make this on my own but it would be nice to have some help!
If you know how to do any or all of the following and you want to help please PM me:
IMPORTANT
[2] - Create textures for mobs using a given template
[1] - Create custom mobs using Techne (mob rendering software on PC)
[1] -Use Techne to get the texture offset and addBox, then write the code for it
NEW
[1] - Someone who is familliar with the copyright law and is able to write up some legal stuff
[1] -Someone with average ~ advaced html skills (hopefully we can add a local html page into the gui for change-logs, info etc)
NOT SO IMPORTANT
[3] - Create GUI (Things like buttons to bring up a change-log and information etc...)
I am not giving away any spoilers or sneak peaks as to what this mod is gonna be just yet
but the sooner I get help the sooner you can see snapshots but ok that list kinda gives away what it will include *fake cough*fake cough*mobs*fake cough*accidentally farts
*!
All helpers will be credited for all the help they give
And trust me this is gonna be awesome!
KEY THINGY
[x] - Number in this box stands for how many people are going to be, or are currently working on it
I need maybe 3-5 people per box (no more than 5!)
1
Sorry for all my perf spelling btw
1
var Ypos=0;
var Zpos=0;
function modTick()
{
Xpos=getPlayerX();
Ypos=getPlayerY();
Zpos=getPlayerZ();
setTile(Xpos,Ypos-1.0,Zpos,2);
}
always remeber to close it off
1