1.How do i make a button that shows up when i am holding specific item
2.How do I remove specific item from inventory
3.How do i make custom mobs
1.What kind of button?
Code:
var holdingItem = false;
function modTick(){
var itemId = Player.getCarriedItem(); //every minecraft tick it gets the holded item of the player
if(itemId == yourId&&holdingItem == false) //When the player is holding the item the variable in the first line prevents it from modTick spamming..
{
holdingItem = true: //replace your selected Id in the if(itemId == "yourId'){ replace it
//your ADDED code here
}
if(itemId !== yourId&&holdingItem == true) //so this one restores everything once the player isnt holding the item needed to work it will reset it.
{
holdingItem = false;
}
}
2.just this
CODE:
Player.clearInventorySlot(); //inside it the inventory slot you want
3.Is it skins etc.
if skins
Code:
var mob = Level.spawnMob(CoordsX,CoordsY,CoordsZ,mobId,"skinsName ex. mob/herobrine.png");
if health
Code:
var mob1 = Level.spawnMob(x,y,z,12,"mob/pig.png");
Entity.setHealth(mob1, HEALTH);
The Meaning of Life, the Universe, and Everything.
Join Date:
2/9/2015
Posts:
56
Member Details
I found answer for number 2 and what i want in number 1 is like when i am holding bowl and looking at a mooshroom, button shows up and when i click it bowl changes into mushroom stew. Number 3 is making custom mob ex)rabbit thanks for helping
I found answer for number 2 and what i want in number 1 is like when i am holding bowl and looking at a mooshroom, button shows up and when i click it bowl changes into mushroom stew. Number 3 is making custom mob ex)rabbit thanks for helping
1.Is it an GUI?? like a button pops out of the bootom right corner??
3.you can do that with a custom entity render type(i dont try that one because i am not good with X,Y,Z plus its a lot of added box)
2.How do I remove specific item from inventory
3.How do i make custom mobs
1.What kind of button?
Code:
var holdingItem = false;
function modTick(){
var itemId = Player.getCarriedItem(); //every minecraft tick it gets the holded item of the player
if(itemId == yourId&&holdingItem == false) //When the player is holding the item the variable in the first line prevents it from modTick spamming..
{
holdingItem = true: //replace your selected Id in the if(itemId == "yourId'){ replace it
//your ADDED code here
}
if(itemId !== yourId&&holdingItem == true) //so this one restores everything once the player isnt holding the item needed to work it will reset it.
{
holdingItem = false;
}
}
CODE:
Player.clearInventorySlot(); //inside it the inventory slot you want
if skins
Code:
var mob = Level.spawnMob(CoordsX,CoordsY,CoordsZ,mobId,"skinsName ex. mob/herobrine.png");
Code:
var mob1 = Level.spawnMob(x,y,z,12,"mob/pig.png");
Entity.setHealth(mob1, HEALTH);
Just Having A Break in creating mods
1.Is it an GUI?? like a button pops out of the bootom right corner??
3.you can do that with a custom entity render type(i dont try that one because i am not good with X,Y,Z plus its a lot of added box)
Just Having A Break in creating mods
For number 3, that was what i was talking about i will find about it thanks