Well, depends on something, such as if you're trying to make mods for the community or yourself. If your'e wanting to play 1.8 and have mods, than obviously port to 1.8. 1.8 isn't actually so horrible, most everything I've done in it was either from updating other pieces of code, or looking at source and it was pretty easy, time consuming, but easy usually. Though one thing to keep in mind, most "tutorials" for 1.8 are most likely how to add a block / item, and that alone. On the bright side is that I can help you with a lot of stuff for 1.8 if you do choose to go that way.
Not sure exactly how, but ItemDye has it. If you only have 2 states I would say have 2 items, like if it's a flashlight, make a flashlight_on and a flashlight_off, then just make them switch between each other.
protected void addRandomArmor()
{
Random r = new Random();
int type = r.nextInt(2);
if(type == 0)
{
this.setCurrentItemOrArmor(0, new ItemStack(Items.iron_sword));
}
else
{
this.setCurrentItemOrArmor(0, new ItemStack(Items.bow));
}
}
@Born2Code, did you not see CosmicDan already posted that code, and that code is from Forge? Please at least read a few of the previous comments before posting.
Yes true, and my bad for that... but what is he expecting to do with it in vanilla?
Okay, don't have the 1.6.4 code... but inside of BlockLadder there should be a method that's called isLadder (or something like that)... here's the 1.7.10 version as a pointer.
public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity)
{
return true;
}
Not to be rude but you didn't look very hard then. All you're doing is essentially creating a blank entity. If you looked at how a Blaze (or any others) do it, they create a new instance of it, set positions, direction, etc, etc... then spawn it in the world.
0
Do you have mods or texture packs ? Those could stop the skin from rendering.
0
Well, depends on something, such as if you're trying to make mods for the community or yourself. If your'e wanting to play 1.8 and have mods, than obviously port to 1.8. 1.8 isn't actually so horrible, most everything I've done in it was either from updating other pieces of code, or looking at source and it was pretty easy, time consuming, but easy usually. Though one thing to keep in mind, most "tutorials" for 1.8 are most likely how to add a block / item, and that alone. On the bright side is that I can help you with a lot of stuff for 1.8 if you do choose to go that way.
0
Just need to do this for each entity..
EntityList.addMapping(ENTITYNAME.class, "ENTITYNAME", 5, COLOR1, COLOR2);
0
Not sure exactly how, but ItemDye has it. If you only have 2 states I would say have 2 items, like if it's a flashlight, make a flashlight_on and a flashlight_off, then just make them switch between each other.
0
Haha, not quite like that ;P
There's a method in the World class to use.. literally called getClosestPlayer..
To use it you just need to pass it 4 simple parameters. "getClosestPlayer(X, Y, Z, DISTANCE)"
0
Please don't make duplicate threads. And please look around before asking for help.
protected void addRandomArmor()
{ Random r = new Random(); int type = r.nextInt(2); if(type == 0) { this.setCurrentItemOrArmor(0, new ItemStack(Items.iron_sword)); }
else { this.setCurrentItemOrArmor(0, new ItemStack(Items.bow)); } }
0
Yes true, and my bad for that... but what is he expecting to do with it in vanilla?
0
Don't break the rules eh.
0
Okay, don't have the 1.6.4 code... but inside of BlockLadder there should be a method that's called isLadder (or something like that)... here's the 1.7.10 version as a pointer.
public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity)
{
return true;
}
0
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource source, float p_70097_2_)
{
Entity entity = source.getEntity();
if(!(entity instanceof EntityPlayer)) { return false; }
EntityPlayer player = (EntityPlayer)entity;
/** DO STUFF FOR PLAYER HERE **/
player.setInvisible(true);
return true;
}
0
No problem. Good luck with modding in the future =)
0
Not to be rude but you didn't look very hard then. All you're doing is essentially creating a blank entity. If you looked at how a Blaze (or any others) do it, they create a new instance of it, set positions, direction, etc, etc... then spawn it in the world.
0
?
0
Why does this exist?
0
Sure thing. Good luck modding =)