Well the code works except I had to take out that public void setextureNAme(String string), and then when I tried it out in game I still didn't have the texures on them, am I calling them wrong, or r they maybe in the wrong folder ?
Make sure they are named the same thing as they don't seem to be.
For Ore Spwan : If I want it to spawn in the end or neather what do I have to change by the code ?
I'll get to that in a future tutorial. There should be examples if you use a simple google search right now as I don't have access to code at the moment.
This is the one I'm most interested in myself, any idea how long it will be until that's made?
Hmm, I'll probably do a few simpler tutorials first to address some new structures Java has (switch statements, etc.), although, my plan was to do custom Entities (mobs/projectiles) first. I'll put up a poll between these two as they are two of the more complex topics I want to cover.
The Meaning of Life, the Universe, and Everything.
Location:
GTA, Ontario
Join Date:
2/28/2015
Posts:
51
Location:
GTA, Ontario
Member Details
So ... a couple of things. I've been going through your tutorials and either I'm a complete dunce, the other tutorials I've previously tried suck, you are awesome at tutorials or a combination because this is the first time things have actually started to work for me Next order of business, I was working through tutorial five and the part where we assign the block texture (2b) isn't quite working. I can't seem to find what's wrong. In the part involving setBlockName and setBlockTextureName, correct me if I’m wrong but I’m pretty sure I’m supposed to be able to import them and it isn’t letting me. I hover over them and all it gives is “create method ‘setBlockName(string)’” and “create method ‘setBlockTextureName(string)’”. It won’t let me import them at all and I can’t seem to find them when I’ve looked. Is there something I’m missing? Also, will your tutorial (When you get around to it) on structure generation be just during world gen or will it also be for, say if you put a block down and it spawned a structure if conditions are met? (Like having a certain amount of area cleared) Thanks for your time, and good night! (Or good day if you rather )
Shoot me a PM if you need help fleshing out ideas. I enjoy designing how gui's and interfaces look (not the coding though) and I'm pretty decent at balancing things if I have some time plus I love fleshing out smaller details of things so that they'll actually work. If your mod idea is too op let me know and I'll try to help
Sie Hir Hirself They Them Themself pronouns please. Thankies :*
So ... a couple of things. I've been going through your tutorials and either I'm a complete dunce, the other tutorials I've previously tried suck, you are awesome at tutorials or a combination because this is the first time things have actually started to work for me Next order of business, I was working through tutorial five and the part where we assign the block texture (2b) isn't quite working. I can't seem to find what's wrong. In the part involving setBlockName and setBlockTextureName, correct me if I’m wrong but I’m pretty sure I’m supposed to be able to import them and it isn’t letting me. I hover over them and all it gives is “create method ‘setBlockName(string)’” and “create method ‘setBlockTextureName(string)’”. It won’t let me import them at all and I can’t seem to find them when I’ve looked. Is there something I’m missing? Also, will your tutorial (When you get around to it) on structure generation be just during world gen or will it also be for, say if you put a block down and it spawned a structure if conditions are met? (Like having a certain amount of area cleared) Thanks for your time, and good night! (Or good day if you rather )
setBlockName is a method in Block. You need to make sure the class is extending the right Block class, as there is one for Minecraft, and one for something else. Make sure it is the Minecraft Block class.
Regarding the structures, you will be able to spawn them in use items, however, you could easily replicate it to spawn when a block is placed.
setBlockName is a method in Block. You need to make sure the class is extending the right Block class, as there is one for Minecraft, and one for something else. Make sure it is the Minecraft Block class.
Regarding the structures, you will be able to spawn them in use items, however, you could easily replicate it to spawn when a block is placed.
It's this one, right? net.minecraft.block.Block; If it's another one than I'll find it
Shoot me a PM if you need help fleshing out ideas. I enjoy designing how gui's and interfaces look (not the coding though) and I'm pretty decent at balancing things if I have some time plus I love fleshing out smaller details of things so that they'll actually work. If your mod idea is too op let me know and I'll try to help
Sie Hir Hirself They Them Themself pronouns please. Thankies :*
Strange. I really hope it's not a 1.8 thing but I'll look more into it tomorrow after school. I did a ctrl f search and didn't find either one in that class when I searched this afternoon. I will get back to you
Shoot me a PM if you need help fleshing out ideas. I enjoy designing how gui's and interfaces look (not the coding though) and I'm pretty decent at balancing things if I have some time plus I love fleshing out smaller details of things so that they'll actually work. If your mod idea is too op let me know and I'll try to help
Sie Hir Hirself They Them Themself pronouns please. Thankies :*
Not to do anything with TheXFactor117 Tutorials if you have problems with 1.8 Modding please tell me and I will help you he hasnt got into it yet I think but I think I can help every Item/Block now requires a .json file btw but if you need any help please tell TheXFactor117 or Me But I don't want to evade on his Tutorials
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
The Code is right here
public NAMETHISASYOURCLASS(ArmorMaterial material, int ArmorType, String name)
{
super(material, 0, ArmorType);
setUnlocalizedName(name);
setTextureName(Reference.MOD_ID + ":" + getUnlocalizedName().substring(5));
setCreativeTab(MoItemsAndArmor.tabTeleport);
}
private void setTextureName(String string) {
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
{
if (stack.getItem() == MTAItems.dianiteHelmet || stack.getItem() == MTAItems.dianiteChestplate || stack.getItem() == MTAItems.dianiteBoots)
{
return Reference.MOD_ID + ":models/armor/DianiteArmor_1.png";
}
else if (stack.getItem() == MTAItems.dianiteLeggings)
{
return Reference.MOD_ID + ":models/armor/DianiteArmor_2.png";
}
else
{
return null;
}
}
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack)
{
if (player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(MTAItems.dianiteBoots)
&& player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(MTAItems.dianiteLeggings)
&& player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(MTAItems.dianiteChestplate)
&& player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(MTAItems.dianiteHelmet))
{
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 20*1));
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20*1));
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 20*1));
}
}
}
Make sure they are named the same thing as they don't seem to be.
Name them whatever you want; just make sure they are called the same thing in code and in the folder.
they are attached and uploaded on Imgur
If you can't see the textures goto: http://rockerofworlds.imgur.com/all/?third_party=1#_=_
Also Are you Using 1.7.10 Or 1.8
I'm Modding In 1.8 Use To Be In 1.7.10 but not as much changed but alot has so please tell me
I'll get to that in a future tutorial. There should be examples if you use a simple google search right now as I don't have access to code at the moment.
Code?
I am a signature. AWESOME!!!:D:D:D
Hmm, I'll probably do a few simpler tutorials first to address some new structures Java has (switch statements, etc.), although, my plan was to do custom Entities (mobs/projectiles) first. I'll put up a poll between these two as they are two of the more complex topics I want to cover.
public void onArmorTick(World world, EntityPlayer player, ItemStack stack)
{
if (player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(ModArmory.titaniumBoots)
&& player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(ModArmory.titaniumPants)
&& player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(ModArmory.titaniumPlate)
&& player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(ModArmory.titaniumHelm))
{
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20*5, 1));
}
if (player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(ModArmory.titaniumBoots))
{
player.addPotionEffect(new PotionEffect(Potion.jump.id, 20*5,0));
}
if (player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(ModArmory.titaniumPants))
{
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 20*5,0));
}
if (player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(ModArmory.titaniumPlate))
{
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 20*5,0));
}
if (player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(ModArmory.titaniumHelm))
{
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 20*5,0));
}
}
Is this an issue?
Sorry, all that was the code you asked for when I said that it made the night vision effect strobe.
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack)
{
if (player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(ModArmory.titaniumBoots)
&& player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(ModArmory.titaniumPants)
&& player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(ModArmory.titaniumPlate)
&& player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(ModArmory.titaniumHelm))
{
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20*5, 1));
}
if (player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem().equals(ModArmory.titaniumBoots))
{
player.addPotionEffect(new PotionEffect(Potion.jump.id, 20*5,0));
}
if (player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem().equals(ModArmory.titaniumPants))
{
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 20*5,0));
}
if (player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(ModArmory.titaniumPlate))
{
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 20*5,0));
}
if (player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem().equals(ModArmory.titaniumHelm))
{
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 20*5,0));
}
}
Check out my mod that I will make. I'll try to update it with more ideas every week or so. I am going to go to a program soon where I'll learn code more in depth and hope for the idea to be fully thought out by then > http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/requests-ideas-for-mods/2370328-gold-mining-mod-suggestion
Shoot me a PM if you need help fleshing out ideas. I enjoy designing how gui's and interfaces look (not the coding though) and I'm pretty decent at balancing things if I have some time plus I love fleshing out smaller details of things so that they'll actually work. If your mod idea is too op let me know and I'll try to help
Sie Hir Hirself They Them Themself pronouns please. Thankies :*
Are all the other effects working correctly? It may just be night vision. I'll look into it a bit more.
setBlockName is a method in Block. You need to make sure the class is extending the right Block class, as there is one for Minecraft, and one for something else. Make sure it is the Minecraft Block class.
Regarding the structures, you will be able to spawn them in use items, however, you could easily replicate it to spawn when a block is placed.
It's this one, right? net.minecraft.block.Block; If it's another one than I'll find it
Also, good to know!!!
Check out my mod that I will make. I'll try to update it with more ideas every week or so. I am going to go to a program soon where I'll learn code more in depth and hope for the idea to be fully thought out by then > http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/requests-ideas-for-mods/2370328-gold-mining-mod-suggestion
Shoot me a PM if you need help fleshing out ideas. I enjoy designing how gui's and interfaces look (not the coding though) and I'm pretty decent at balancing things if I have some time plus I love fleshing out smaller details of things so that they'll actually work. If your mod idea is too op let me know and I'll try to help
Sie Hir Hirself They Them Themself pronouns please. Thankies :*
Yup, that's the only Block class Minecraft has.
Strange. I really hope it's not a 1.8 thing but I'll look more into it tomorrow after school. I did a ctrl f search and didn't find either one in that class when I searched this afternoon. I will get back to you
Check out my mod that I will make. I'll try to update it with more ideas every week or so. I am going to go to a program soon where I'll learn code more in depth and hope for the idea to be fully thought out by then > http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/requests-ideas-for-mods/2370328-gold-mining-mod-suggestion
Shoot me a PM if you need help fleshing out ideas. I enjoy designing how gui's and interfaces look (not the coding though) and I'm pretty decent at balancing things if I have some time plus I love fleshing out smaller details of things so that they'll actually work. If your mod idea is too op let me know and I'll try to help
Sie Hir Hirself They Them Themself pronouns please. Thankies :*