Beep, beep, model API coming through!
Here's BlockLauncher 1.6.10: you can't define your own render types yet, but you can add parts to existing render types.
Beep, beep, model API coming through!
Here's BlockLauncher 1.6.10: you can't define your own render types yet, but you can add parts to existing render types.
That.is.Awsome!!!!
Though when I looked at the sample script it was confusing :\ maybe you can do a tutorial on how you can make costum render types like you you did a tutorial on how to make costum blocks?
T
That.is.Awsome!!!!
Though when I looked at the sample script it was confusing :\ maybe you can do a tutorial on how you can make costum render types like you you did a tutorial on how to make costum blocks?
I intentionally designed the API to look like Desktop Edition instead of a typical ModPE API so that you can adapt desktop edition tutorials for this.
In Java, there are two types of decimal numbers: floats (which are less precise) and doubles (the default). JavaScript only supports doubles, so we need to remove the F after numbers, signifying that we're using floats.
Also, since we're not in a Java class, we'll store each model part in a local variable, and wrap this around a function that takes in a renderer.
function addEndermanToRenderer(renderer) {
var var2 = 0.0F;
var bipedBody = new ModelRenderer(this, 32, 16);
bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, var2);
var bipedRightArm = new ModelRenderer(this, 56, 0);
bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedLeftArm = new ModelRenderer(this, 56, 0);
bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedRightLeg = new ModelRenderer(this, 56, 0);
bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
var bipedLeftLeg = new ModelRenderer(this, 56, 0);
bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
}
Finally, we need to get the model parts. Since we can't create new renderers right now, we're going to modify existing renderers: to do that, we grab the model from the renderer, grab each model part, erase what we currently have, and finally add our new model boxes.
function addEndermanToRenderer(renderer) {
var var2 = 0;
var model = renderer.getModel();
var bipedBody = model.getPart("body").clear().setTextureOffset(32, 16);
bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, var2);
var bipedRightArm = model.getPart("rightArm").clear().setTextureOffset(56, 0);
bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedLeftArm = model.getPart("leftArm").clear().setTextureOffset(56, 0);
bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedRightLeg = model.getPart("rightLeg").clear().setTextureOffset(56, 0);
bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
var bipedLeftLeg = model.getPart("leftLeg").clear().setTextureOffset(56, 0);
bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
}
addEndermanToRenderer(Renderer.get(3)); //player
addEndermanToRenderer(Renderer.get(16)); //multiplayer
In Java, there are two types of decimal numbers: floats (which are less precise) and doubles (the default). JavaScript only supports doubles, so we need to remove the F after numbers, signifying that we're using floats.
Also, since we're not in a Java class, we'll store each model part in a local variable, and wrap this around a function that takes in a renderer.
function addEndermanToRenderer(renderer) {
var var2 = 0.0F;
var bipedBody = new ModelRenderer(this, 32, 16);
bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, var2);
var bipedRightArm = new ModelRenderer(this, 56, 0);
bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedLeftArm = new ModelRenderer(this, 56, 0);
bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedRightLeg = new ModelRenderer(this, 56, 0);
bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
var bipedLeftLeg = new ModelRenderer(this, 56, 0);
bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
}
Finally, we need to get the model parts. Since we can't create new renderers right now, we're going to modify existing renderers: to do that, we grab the model from the renderer, grab each model part, erase what we currently have, and finally add our new model boxes.
function addEndermanToRenderer(renderer) {
var var2 = 0;
var model = renderer.getModel();
var bipedBody = model.getPart("body").clear().setTextureOffset(32, 16);
bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, var2);
var bipedRightArm = model.getPart("rightArm").clear().setTextureOffset(56, 0);
bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedLeftArm = model.getPart("leftArm").clear().setTextureOffset(56, 0);
bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2);
var bipedRightLeg = model.getPart("rightLeg").clear().setTextureOffset(56, 0);
bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
var bipedLeftLeg = model.getPart("leftLeg").clear().setTextureOffset(56, 0);
bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2);
}
addEndermanToRenderer(Renderer.get(3)); //player
addEndermanToRenderer(Renderer.get(16)); //multiplayer
Question: is it possible to say, use the old method of "adding" a mob could we just use this api for that one selected mob or would it change the whole render type?
Question: is it possible to say, use the old method of "adding" a mob could we just use this api for that one selected mob or would it change the whole render type?
No, it changes the render type for every mob: I'm planning to make a "new render type" function that would let you create a new render type.
BL idea, Readable chat, if a player types something in chat the script could use a prewritten response something like
if(playerResonse==("Hello")
{
clientMessage("Good day to you fellow player");
}
Something along the lines of that where it could pick up keywords or something like that sort of like a siri effect (Yeah I know most users here are Android but its the only example I gotssss.....)
BL idea, Readable chat, if a player types something in chat the script could use a prewritten response something like
if(playerResonse==("Hello")
{
clientMessage("Good day to you fellow player");
}
Something along the lines of that where it could pick up keywords or something like that sort of like a siri effect (Yeah I know most users here are Android but its the only example I gotssss.....)
http://imgur.com/trPK6js
http://imgur.com/qWVgV3t
I have all resolutions if you want them...
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHere's BlockLauncher 1.6.10: you can't define your own render types yet, but you can add parts to existing render types.
http://tinyw.in/bl
Sample script: https://raw.github.com/zhuowei/ModPEScripts/master/pegleg.js
Screenshot:
That.is.Awsome!!!!
Though when I looked at the sample script it was confusing :\ maybe you can do a tutorial on how you can make costum render types like you you did a tutorial on how to make costum blocks?
Link:
http://www.minecraft.../#entry29816329
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI intentionally designed the API to look like Desktop Edition instead of a typical ModPE API so that you can adapt desktop edition tutorials for this.
Ok then thats great!
Link:
http://www.minecraft.../#entry29816329
So with this we can basically take pc models and turn them into models on here? If so great, I love Blocklauncher so much
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumpublic ModelEnderman() { super(0.0F, -14.0F, 64, 32); float var1 = -14.0F; float var2 = 0.0F; this.bipedHeadwear = new ModelRenderer(this, 0, 16); this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, var2 - 0.5F); this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + var1, 0.0F); this.bipedBody = new ModelRenderer(this, 32, 16); this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, var2); this.bipedBody.setRotationPoint(0.0F, 0.0F + var1, 0.0F); this.bipedRightArm = new ModelRenderer(this, 56, 0); this.bipedRightArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, var2); this.bipedRightArm.setRotationPoint(-3.0F, 2.0F + var1, 0.0F); this.bipedLeftArm = new ModelRenderer(this, 56, 0); this.bipedLeftArm.mirror = true; this.bipedLeftArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, var2); this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + var1, 0.0F); this.bipedRightLeg = new ModelRenderer(this, 56, 0); this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, var2); this.bipedRightLeg.setRotationPoint(-2.0F, 12.0F + var1, 0.0F); this.bipedLeftLeg = new ModelRenderer(this, 56, 0); this.bipedLeftLeg.mirror = true; this.bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, var2); this.bipedLeftLeg.setRotationPoint(2.0F, 12.0F + var1, 0.0F); }First of all, we don't support setRotationPoint, mirror, or headgear yet, so those get deleted:
public ModelEnderman() { super(0.0F, -14.0F, 64, 32); float var1 = -14.0F; float var2 = 0.0F; this.bipedBody = new ModelRenderer(this, 32, 16); this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, var2); this.bipedRightArm = new ModelRenderer(this, 56, 0); this.bipedRightArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, var2); this.bipedLeftArm = new ModelRenderer(this, 56, 0); this.bipedLeftArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, var2); this.bipedRightLeg = new ModelRenderer(this, 56, 0); this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, var2); this.bipedLeftLeg = new ModelRenderer(this, 56, 0); this.bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, var2); }In Java, there are two types of decimal numbers: floats (which are less precise) and doubles (the default). JavaScript only supports doubles, so we need to remove the F after numbers, signifying that we're using floats.
Also, since we're not in a Java class, we'll store each model part in a local variable, and wrap this around a function that takes in a renderer.
function addEndermanToRenderer(renderer) { var var2 = 0.0F; var bipedBody = new ModelRenderer(this, 32, 16); bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, var2); var bipedRightArm = new ModelRenderer(this, 56, 0); bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2); var bipedLeftArm = new ModelRenderer(this, 56, 0); bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2); var bipedRightLeg = new ModelRenderer(this, 56, 0); bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2); var bipedLeftLeg = new ModelRenderer(this, 56, 0); bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2); }Finally, we need to get the model parts. Since we can't create new renderers right now, we're going to modify existing renderers: to do that, we grab the model from the renderer, grab each model part, erase what we currently have, and finally add our new model boxes.
function addEndermanToRenderer(renderer) { var var2 = 0; var model = renderer.getModel(); var bipedBody = model.getPart("body").clear().setTextureOffset(32, 16); bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, var2); var bipedRightArm = model.getPart("rightArm").clear().setTextureOffset(56, 0); bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2); var bipedLeftArm = model.getPart("leftArm").clear().setTextureOffset(56, 0); bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 30, 2, var2); var bipedRightLeg = model.getPart("rightLeg").clear().setTextureOffset(56, 0); bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2); var bipedLeftLeg = model.getPart("leftLeg").clear().setTextureOffset(56, 0); bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 30, 2, var2); } addEndermanToRenderer(Renderer.get(3)); //player addEndermanToRenderer(Renderer.get(16)); //multiplayerScreenshot of the finished script:
Download beta 2: http://tinyw.in/bl
Download script: https://raw.github.com/zhuowei/ModPEScripts/master/enderman_model.js
Question: is it possible to say, use the old method of "adding" a mob could we just use this api for that one selected mob or would it change the whole render type?
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNo, it changes the render type for every mob: I'm planning to make a "new render type" function that would let you create a new render type.
Nice to know, also I have been expecting this for a while now. >
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
Holy crap.
Thank you.
http://www.minecraftforum.net/forums/minecraft-pocket-edition/mcpe-mods-tools/2610428-0-13-emeraldcraft-metalurgic-gems-alchemy
if(playerResonse==("Hello") { clientMessage("Good day to you fellow player"); }Something along the lines of that where it could pick up keywords or something like that sort of like a siri effect (Yeah I know most users here are Android but its the only example I gotssss.....)
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThere's actually code for a hook like this: it was never enabled though.
Want to learn all about game design and game programming? Visit firenibbler.com to learn all about it