var ct = ["cobblestone", 0]
Block.defineBlock(23, "Wonder Block", [ct, ct, ct, ct, ct, ct], 0, false, 101);
// Give it our custom render type, which I'll make 101.
// All custom render types must be greater than 100
function renderBlockHook(blockId, x, y, z)
if(Block.getRenderType(blockId) == 101) {
renderWonderBlock(x, y, z); // Render our block at that x, y, z location
}
// Our function to render our custom block
function renderWonderBlock(x, y, z) {
// Let's make an upper cube at the spot
// Our custom block's ID is 23
Block.setShape(23, 0, 0.7, 0, 1, 1, 1);
BlockRenderer.renderBlock(23, x, y, z);
//Render that block at the location
// Now make the bottom cube
// Change the shape of our block 23 again
Block.setShape(23, 0, 0, 0, 1, 0.3, 1);
BlockRenderer.renderBlock(23, x, y, z);
// Now render the bottom block at this location
// Now we'll add a diamond textured cross
BlockRenderer.renderCross(57, x, y, z);
// And now a torch
BlockRenderer.renderTorch(50, x, y, z);
}
Error.on block launcher 1.6.11
if(Block.getRenderType(blockId) == 101) {
org.mozilla.javascript.EvaluatorException: missing { before function body (untitled.js#7)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(Unknown Source)
at org.mozilla.javascript.DefaultErrorReporter.error(Unknown Source)
at org.mozilla.javascript.Parser.addError(Unknown Source)
at org.mozilla.javascript.Parser.addError(Unknown Source)
at org.mozilla.javascript.Parser.reportError(Unknown Source)
at org.mozilla.javascript.Parser.reportError(Unknown Source)
at org.mozilla.javascript.Parser.reportError(Unknown Source)
at org.mozilla.javascript.Parser.parseFunctionBody(Unknown Source)
at org.mozilla.javascript.Parser.function(Unknown Source)
at org.mozilla.javascript.Parser.parse(Unknown Source)
at org.mozilla.javascript.Parser.parse(Unknown Source)
at org.mozilla.javascript.Context.compileImpl(Unknown Source)
at org.mozilla.javascript.Context.compileReader(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:151)
at java.lang.Thread.run(Thread.java:856)
var ct = ["cobblestone", 0]
Block.defineBlock(23, "Wonder Block", [ct, ct, ct, ct, ct, ct], 0, false, 101);
// Give it our custom render type, which I'll make 101.
// All custom render types must be greater than 100
function renderBlockHook(blockId, x, y, z){
if(Block.getRenderType(blockId) == 101) {
renderWonderBlock(x, y, z); // Render our block at that x, y, z location
}
// Our function to render our custom block
function renderWonderBlock(x, y, z) {
// Let's make an upper cube at the spot
// Our custom block's ID is 23
Block.setShape(23, 0, 0.7, 0, 1, 1, 1);
BlockRenderer.renderBlock(23, x, y, z);
//Render that block at the location
// Now make the bottom cube
// Change the shape of our block 23 again
Block.setShape(23, 0, 0, 0, 1, 0.3, 1);
BlockRenderer.renderBlock(23, x, y, z);
// Now render the bottom block at this location
// Now we'll add a diamond textured cross
BlockRenderer.renderCross(57, x, y, z);
// And now a torch
BlockRenderer.renderTorch(50, x, y, z);
}
}
For some reason every mod for 0.8.0 that adds in a new block will make the beta for 0.9.0 of BlockLauncher crash. 99% sure the problem lays in the Block.defineBlock() function, but I can't figure out what's wrong? Is it a bug?
For some reason every mod for 0.8.0 that adds in a new block will make the beta for 0.9.0 of BlockLauncher crash. 99% sure the problem lays in the Block.defineBlock() function, but I can't figure out what's wrong? Is it a bug?
Hey could it be possible for you to make it to were u can have data values on crertain items like
ModPE.setItem(id,dv,texture,name);
Or
Block.defineBlock(id,dv,name,texture);
and could you add were mods can have a seprete terrain.png
I really want the block one too! It will take qualities from undamaged (falling blocks from gravel anyone?) But items what if they are a tool? And I think PC block handling would be better. (customname.png)
Can somebody pls give me a copy of the script? I don't know how to put the code into the game because I don't wanna mess anything up and I love this mod.
var ct = ["cobblestone", 0]
Block.defineBlock(23, "Wonder Block", [ct, ct, ct, ct, ct, ct], 0, false, 101);
// Give it our custom render type, which I'll make 101.
// All custom render types must be greater than 100
function renderBlockHook(blockId, x, y, z){
if(Block.getRenderType(blockId) == 101) {
renderWonderBlock(x, y, z); // Render our block at that x, y, z location
}
// Our function to render our custom block
function renderWonderBlock(x, y, z) {
// Let's make an upper cube at the spot
// Our custom block's ID is 23
Block.setShape(23, 0, 0.7, 0, 1, 1, 1);
BlockRenderer.renderBlock(23, x, y, z);
//Render that block at the location
// Now make the bottom cube
// Change the shape of our block 23 again
Block.setShape(23, 0, 0, 0, 1, 0.3, 1);
BlockRenderer.renderBlock(23, x, y, z);
// Now render the bottom block at this location
// Now we'll add a diamond textured cross
BlockRenderer.renderCross(57, x, y, z);
// And now a torch
BlockRenderer.renderTorch(50, x, y, z);
}
}
Figured it out, I was using the wrong build...
First build 11, then build 10, but only a few of the mods worked, many still made it crash. I tried some other builds too, but that went even worse.
I really want the block one too! It will take qualities from undamaged (falling blocks from gravel anyone?) But items what if they are a tool? And I think PC block handling would be better. (customname.png)
Is this almost done? I'm tired of Block.setShape.
I support:







"I would if I could, but I can't, so I won't..."
I support:







I support:







I support:







You can't get the exact same results. You can set the rendertype(broken in current bl) and use block.set shape though.
I support:







It was canceled.
I support:







better not be permanent :/
---------------------------------
|
|
---------------------------------