Hey people, it's your friendly neighbourhood BlockLauncher developer, Byteandahalf
You probably know me from Twitter(@byteandahalf)
Anyway, this is something I've been implementing into BlockLauncher, and I'd like to show you a sneak peek of how it works so far.
Here you can see an oven, and two other blocks I worked on to show some other functionalities:
I plan to be adding more functionalities to this, like possibly custom liquid types. Now even though this update hasn't and won't be released yet, I'd like to show you how the API looks currently(This is subject to change greatly):
Let's define a new block:
var ct = ["cobblestone", 0]<br>Block.defineBlock(23, "Wonder Block", [ct, ct, ct, ct, ct, ct], 0, false, 101);<br>// Give it our custom render type, which I'll make 101.<br>// All custom render types must be greater than 100<br>
The first thing you'll use is this new hook:
function renderBlockHook(blockId, x, y, z)
This is going to be called every time the game attemps to render a block.
Now, you'll want to use an if statement to see if the block being rendered uses your custom render ID.
if(Block.getRenderType(blockId) == 101) {<br>renderWonderBlock(x, y, z); // Render our block at that x, y, z location<br>}<br>
Now the fun part, render our block:
// Our function to render our custom block<br>function renderWonderBlock(x, y, z) {<br>// Let's make an upper cube at the spot<br>// Our custom block's ID is 23<br>Block.setShape(23, 0, 0.7, 0, 1, 1, 1);<br>BlockRenderer.renderBlock(23, x, y, z);<br>//Render that block at the location<br><br>// Now make the bottom cube<br>// Change the shape of our block 23 again<br>Block.setShape(23, 0, 0, 0, 1, 0.3, 1);<br>BlockRenderer.renderBlock(23, x, y, z);<br>// Now render the bottom block at this location<br><br>// Now we'll add a diamond textured cross<br>BlockRenderer.renderCross(57, x, y, z);<br><br>// And now a torch<br>BlockRenderer.renderTorch(50, x, y, z);<br>}<br>
And now you're done!
Now whenever you place your wonder block, you get a custom shaped block in that location!
I hope lots of people will make great use of this once the update comes out
Please be patient!
Notes: Locked as per the OP's request
Rollback Post to RevisionRollBack
Back to modding! Follow me on Twitter @byteandahalf
Yeah then we can only imagine what's next. I really want some of the functions to be able to have the data values of some items. Like in use item I want to use bonemeal on a new plant I am adding for PocketSpawn but I can't because of the data values.Unless there is a way and I just don't know how.Nevermind found it
Yeah then we can only imagine what's next. I really want some of the functions to be able to have the data values of some items. Like in use item I want to use bonemeal on a new plant I am adding for PocketSpawn but I can't because of the data values.
Unless there is a way and I just don't know how.
Nevermind found it
Use
if(Player.getCarriedItem() == DYE && Player.getCarriedItemData() == 15)
// Bonemeal
Rollback Post to RevisionRollBack
Back to modding! Follow me on Twitter @byteandahalf
Hey byte, nice tutorial. This api can be used to make a furniture mod for pe. Also what is the custom gui function you were talking about. Thanks in advance.
Hey byte, nice tutorial. This api can be used to make a furniture mod for pe. Also what is the custom gui function you were talking about. Thanks in advance.
Yes, the first thing I plan on making is a furniture mod. As for the GUI function, 500ISE and I haven't really discussed much of that. He said he has plans to add it soon, might look cool.
Rollback Post to RevisionRollBack
Back to modding! Follow me on Twitter @byteandahalf
The new title makes me sad. Since this custom block rendertype API will be added 1.7 that means this won't be available til MCPE 0.9.x. Also, I don't know if you have thought about this, but what will be the limit for the render types? You have stated the minimal limit but will there be a max limit?
The new title makes me sad. Since this custom block rendertype API will be added 1.7 that means this won't be available til MCPE 0.9.x. Also, I don't know if you have thought about this, but what will be the limit for the render types? You have stated the minimal limit but will there be a max limit?
No max limit, besides the max size of a signed 32 bit integer, 2147483647! And no, BL 1.7 will be out soon. Who said anything about 9.0?
Hey people, it's your friendly neighbourhood BlockLauncher developer, Byteandahalf

You probably know me from Twitter(@byteandahalf)
Anyway, this is something I've been implementing into BlockLauncher, and I'd like to show you a sneak peek of how it works so far.
Here you can see an oven, and two other blocks I worked on to show some other functionalities:
I plan to be adding more functionalities to this, like possibly custom liquid types. Now even though this update hasn't and won't be released yet, I'd like to show you how the API looks currently(This is subject to change greatly):
Let's define a new block:
The first thing you'll use is this new hook:
This is going to be called every time the game attemps to render a block.
Now, you'll want to use an if statement to see if the block being rendered uses your custom render ID.
Now the fun part, render our block:
And now you're done!
Now whenever you place your wonder block, you get a custom shaped block in that location!
I hope lots of people will make great use of this once the update comes out
Please be patient!
Back to modding! Follow me on Twitter @byteandahalf
And when I Try The New 1.6.10 beta and import it it has a error
Check out my game! It's an open-world, sandbox text adventure.
Follow @hexdro_
Hexdro © 2012-2015
Yeah then we can only imagine what's next. I really want some of the functions to be able to have the data values of some items. Like in use item I want to use bonemeal on a new plant I am adding for PocketSpawn but I can't because of the data values.Unless there is a way and I just don't know how.Nevermind found it
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
As for the import error, that has nothing to do with BlockLauncher: you're using a a faulty script. Use
if(Player.getCarriedItem() == DYE && Player.getCarriedItemData() == 15)
// Bonemeal
Back to modding! Follow me on Twitter @byteandahalf
Back to modding! Follow me on Twitter @byteandahalf
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
Back to modding! Follow me on Twitter @byteandahalf
Link:
http://www.minecraft.../#entry29816329
Back to modding! Follow me on Twitter @byteandahalf
ummm wait a minute did it work? cause that will be cool! or your still fixing it? anyways great job as usual