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
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
No problem, happy to help (btw im not actually a member of that forum I just like to help so pm me if you need any more help, I know how to use all the basic functions and most of the hooks too!)
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
first array, a, b and c, can be changed to any letters, they represent the position on the crafting table like this:
aaa top
bbb middle
ccc bottom
(use a space for a blank spot!)
second array, "a" ("b" and "c" too) are used to give/get the items being used,
id is the id of the item and data is the items data
sorry if this doesnt make any sense but here is an example that will hopefully help! also sorry if this isnt what you were asking about! for more help just pm me!!!!
//diamond pickaxe recipe
Item.addShapedRecipe(278, 1, 0, ["ddd", " s ", " s "], ["d", 264, 0, "s", 280, 0]);
//this is saying use three diamond and two sticks to give me one diamond pickaxe
i also looked into using the Plane function but i dont really know how to use it, i know you use it to set a radius to fill and replace blocks and other stuffs
yea something like that but then i thought of using the modTick in a way that changes the variable at certain times of the day to activate another function, sort of like this but I dont know if i am using the "if" and "else if" correctly or if you can use a variable through two hooks...
function modTick(){
var active = false;
if(Level.getTime() <= 1000){
var active = true;
}
else if(Level.getTime() >= 1001){
var active = false;
}
}
Hello I am softmage and i was wondering if anybody could help me with something, i want a block to be placed at certain time of the day but first i need to be able to locate the blocks position
I need the variable "pos" to be set to the blocks x, y, z
var pos = x, y, z;
var blockId = //not sure what to put, i know this is built in to the useItem function so maybe they can be linked somehow?
if(blockId == 250){
(get blocks x y z);
var pos = (^above^);
ModPE.defineBlock(250, "Budder", [["gold_block", 0]//repeat this 5 more times in this array], 0, true, 0);//I have forgotten what the two 0 do
Dohe same but put the id 251, " Cheese" then use iron_block instead of gold_block
Then for the cow you will just need to make a texture pack and change the cows skin, or Iyou want iI can make this mod in like 10 minutes and send you a link to download it
You can use mercator to convert the terrain-atlas.tga to a png file then use isopix to edit the texture then convert it back to a tga compress the folder and then you have custom textures if you have a pc i recomend using paint.net because you can edit .tga files without having to convert them, i hope this helps :D!!
0
Just remember that it can get quite complicated the more blocks you add in the same block space, good luck and send me a photo once its done
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
0
No problem, happy to help
(btw im not actually a member of that forum I just like to help so pm me if you need any more help, I know how to use all the basic functions and most of the hooks too!)
0
ill also pm you some info too :D! thnks for offering!
0
great ill pm you more info ! thanks for offering
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!)
0
Item.addShapedRecipe(id, amount, data, ["aaa", "bbb", "ccc"], ["a", id, data, "b", id, data, "c", id, data]);
id, the id of the item you want to craft
amount, the amount give
data, data value of the corresponding item
first array, a, b and c, can be changed to any letters, they represent the position on the crafting table like this:
aaa top
bbb middle
ccc bottom
(use a space for a blank spot!)
second array, "a" ("b" and "c" too) are used to give/get the items being used,
id is the id of the item and data is the items data
sorry if this doesnt make any sense but here is an example that will hopefully help! also sorry if this isnt what you were asking about! for more help just pm me!!!!
0
Hey there, I would help you but I too, do not know how to save and load data yet
sorry for the inconvenience
0
Probably to extract and compress files for people modding using only a tablet and not a pc?
0
^Solved^
0
i also looked into using the Plane function but i dont really know how to use it, i know you use it to set a radius to fill and replace blocks and other stuffs
0
yea something like that but then i thought of using the modTick in a way that changes the variable at certain times of the day to activate another function, sort of like this but I dont know if i am using the "if" and "else if" correctly or if you can use a variable through two hooks...
0
Hello I am softmage and i was wondering if anybody could help me with something, i want a block to be placed at certain time of the day but first i need to be able to locate the blocks position
I need the variable "pos" to be set to the blocks x, y, z
0
ModPE.defineBlock(250, "Budder", [["gold_block", 0]//repeat this 5 more times in this array], 0, true, 0);//I have forgotten what the two 0 do
Dohe same but put the id 251, " Cheese" then use iron_block instead of gold_block
Then for the cow you will just need to make a texture pack and change the cows skin, or Iyou want iI can make this mod in like 10 minutes and send you a link to download it
Sorry its not ModPE. Its Block.defineBlock
0