Yes, itemDamage and blockDamage are not given to you in the useItem hook.
You need to use Player.getCarriedItemData() instead.
Yep!! Perfect
Rollback Post to RevisionRollBack
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
lol yea... make sure to end the quotes and brackets!!
Rollback Post to RevisionRollBack
Heard of an app called AppNana? It's an app that rewards you for installing games, testing apps, watching adds, with Google Play, Amazon, and iTunes gift cards, and more! And the app, is completely free!
An easy way of earning Nanas is to add other people's Invite Codes. Whenever you invite someone or get invited, you get 2.5k nanas!
My code is t3305123, pm me your codes so we can just keep gettin nanas for doing pretty much nothing at all!
{
if (i==256&&itemDamage==0&&b==25)
{
Entity.setCarriedItem(getPlayerEnt(),256,-1);
Level.dropItem(x,y,z,1,265,1,0);
Level.dropItem(x,y,z,1,280,2,0);
}}
Is something wrong in first 3 line??
You need to use Player.getCarriedItemData() instead.
", sans-serif">Want to get paid for uploading mods?
", sans-serif">Click here
For free Bitcoins, click here!
Yep!! Perfect
function procCmd(cmd)
{
var Data == cmd.split(" ");
if (Data[0]=="Iron ingot")
{
addItemInventory(265,1);
}
if (Data[0]=="Gold ingot)
{
addItemInventory(266,1);
}}
it doesn't work
", sans-serif">Want to get paid for uploading mods?
", sans-serif">Click here
For free Bitcoins, click here!
You also forgot the semicolon after the "Gold ingot")
", sans-serif">Want to get paid for uploading mods?
", sans-serif">Click here
For free Bitcoins, click here!
thanks and i got another problem
var C = 0;
var A = 1;
function modTick()
{
if(Player.getCarriedItem() == 507&&Entity.getHealth(Player.getEntity() < 20)&&A == 1)
{
Player.setHealth(Entity.getHealth(Player.getEntity()+2));
C = 30;
A = 0;
}
if (C <= 30)
{
C--;
}
if (C == 0)
{
A = 1;
}}
I never used modTick before so...
what i am trying to do is just healing 1 heart every 1.5 second
so whats the probs?
modified it just a bit
var C = 0;
var A = 1;
function modTick()
{
if(Player.getCarriedItem() == 507&&Entity.getHealth(Player.getEntity() < 20)&&A == 1)
{
Entity.setHealth(getPlayerEnt, Entity.getHealth(getPlayerEnt())+1); //Replaced yours
C = 30;
A = 0;
}
if (C <= 30)
{
C--;
}
if (C == 0)
{
A = 1;
}
}
Just Having A Break in creating mods