Jump to content

nedas60

Forge Modder
  • Posts

    23
  • Joined

  • Last visited

Everything posted by nedas60

  1. Oh wait sorry forgot to update the title. This is now fixed. Previously in the comment I said didn't notice that the effectPlayer or whatever it is was in a method. Also bedrock's design was a bit broken. I had to fix it up a bit. Now it is fixed
  2. I have learned java. What I have NOT learned is minecraft's functions and stuff like that. What can I do? Sure sometimes people don't see mistakes. I didn't notice that he made it differently. That's why I am here.
  3. I am kinda new to forge. Who knows how it works. Please don't judge I also tried following BedrockMiner's tutorial and I seem to be getting an error. Code: package Nedas60.TestMod.items; import Nedas60.TestMod.Reference; import Nedas60.TestMod.init.ModItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.MobEffects; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; public class Infused_Leggings extends ItemArmor { public Infused_Leggings(ArmorMaterial material) { super(material, 2, EntityEquipmentSlot.LEGS); setUnlocalizedName(Reference.TestItems.INFUSED_LEGGINGS.getUnlocalizedName()); setRegistryName(Reference.TestItems.INFUSED_LEGGINGS.getRegistryName()); } @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { private void effectPlayer(EntityPlayer player1, Potion potionIn, int amplifier) { //Always effect for 8 seconds, then refresh if (player1.getActivePotionEffect(potionIn) == null || player1.getActivePotionEffect(potionIn).getDuration() <= 1) player1.addPotionEffect(new PotionEffect(Potion.getActivePotionEffect(potionIn)), 159, amplifier, true, true)); } if (player1.inventory.armorItemInSlot(3) != null && player1.inventory.armorItemInSlot(3).getItem() == ModItems.InfusedHelmet && player1.inventory.armorItemInSlot(2) != null && player1.inventory.armorItemInSlot(2).getItem() == ModItems.InfusedBoots && player1.inventory.armorItemInSlot(1) != null && player1.inventory.armorItemInSlot(1).getItem() == ModItems.InfusedLeggings && player1.inventory.armorItemInSlot(0) != null && player1.inventory.armorItemInSlot(0).getItem() == ModItems.InfusedChestplate) { this.effectPlayer(player, MobEffects.SPEED, 3); } } } But there are a lot of errors. Can someone explain how can I get it to work normally? Errors: Multiple markers at this line - void is an invalid type for the variable effectPlayer - Syntax error on token ",", ; expected - Syntax error on token "(", ; expected - Syntax error on token ")", ; expected - Syntax error on token ",", ; expected That's not all: Multiple markers at this line - The method addPotionEffect(PotionEffect) in the type EntityLivingBase is not applicable for the arguments (PotionEffect, int, int, boolean, boolean) - The method getActivePotionEffect(Potion) is undefined for the type Potion - Syntax error on token ")", delete this token Also: The method effectPlayer(EntityPlayer, Potion, int) is undefined for the type Infused_Leggings
  4. Which classes are you talking about? You only posted one so far. All of the armor ones. The difference between them is just the name and the super value. There is Infused_Helmet, Infused_Leggings, Infused_Boots, Infused_Chestplate.
  5. Sorry if it unclear. It said "test for armor set" Do I put that for each class or just one of my choice?
  6. I have a class for each individual armor item. Code looks like: package Nedas60.TestMod.items; import net.minecraft.item.ItemArmor; import Nedas60.TestMod.Reference; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; public class Infused_Leggings extends ItemArmor { public Infused_Leggings(ArmorMaterial material) { super(material, 2, EntityEquipmentSlot.LEGS); setUnlocalizedName(Reference.TestItems.INFUSED_LEGGINGS.getUnlocalizedName()); setRegistryName(Reference.TestItems.INFUSED_LEGGINGS.getRegistryName()); } } Ofcourse each one has it's own names. The problem is that I don't know where to put the test for armor set. Should I create a new class?
  7. Still doesn't seem to work. I have it in the src\main\resources\assets\ntm\models\armor folder. Is there anything wrong here?
  8. It seems to render as a black box. Do I need to add something to the class? package Nedas60.TestMod.items; import net.minecraft.item.ItemArmor; import Nedas60.TestMod.Reference; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; public class Infused_Helmet extends ItemArmor { public Infused_Helmet(ArmorMaterial material) { super(material, 1, EntityEquipmentSlot.HEAD); // - Sets item texture when in hand and in inventory + some other stuff setUnlocalizedName(Reference.TestItems.INFUSED_HELMET.getUnlocalizedName()); setRegistryName(Reference.TestItems.INFUSED_HELMET.getRegistryName()); } } And the Armor material I have is: public static ArmorMaterial INFUSED_ARMOR = EnumHelper.addArmorMaterial("INFUSED_ARMOR", "ntm:textures/models/armor/Test", 200, new int[] {4, 9, 7, 4}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 5.0F);
  9. Thanks but how do I add the texture to the ArmorMaterial? That is the main problem for me. It gives an error without it.
  10. I want to create armor with the infused armor material. I have the textures. I don't have the code for the class and I don't see any tutorials with MrCrayfish's setup.
  11. Thanks but I actually want the code not the textures:D
  12. I tried searching tutorials but most of them had the setup where you type LONG lines to register the item. I also don't understand how to add the textures (Do they have to be in the same package?). I used MrCrayfish's setup ( ) and I want to know how do you add armor with his registering setup. I have the line: public static ArmorMaterial INFUSED_ARMOR = EnumHelper.addArmorMaterial("INFUSED_ARMOR", (I also dont understand how to add the textures), 200, new int[] {4, 9, 7, 4}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 5.0F); Thanks!
  13. ArmorMaterial - What does each parameter mean? I tried following some tutorials but it seems like there are pretty muchs none 1.10 ones. I have the code: public static ArmorMaterial INFUSED_ARMOR = EnumHelper.addArmorMaterial("INFUSED_ARMOR", (NEED HELP), 200, new int[] {4, 9, 7, 4}, 30, (NEED HELP), 0); Also I want the armor to be good but not make you invulnerable. I read that if the new int[] {numbers} reaches 25 you will be invulnerable. How do you bypass that?
  14. java.lang.ArrayIndexOutOfBoundsException: log: http://pastebin.com/DnpZgdAg
  15. I did it and it didn't work or it is just that I'm dumb. Code package Nedas60.TestMod.items; import com.google.common.collect.Sets; import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; public class ItemAxe extends ItemTool { private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE}); private static final float[] ATTACK_DAMAGES = new float[] {6.0F, 8.0F, 8.0F, 8.0F, 6.0F}; private static final float[] ATTACK_SPEEDS = new float[] { -3.2F, -3.2F, -3.1F, -3.0F, -3.0F}; protected ItemAxe(Item.ToolMaterial material) { super(material, EFFECTIVE_ON); this.damageVsEntity = ATTACK_DAMAGES[material.ordinal()]; this.attackSpeed = ATTACK_SPEEDS[material.ordinal()]; } protected ItemAxe(Item.ToolMaterial material, float damage, float speed) { super(material, EFFECTIVE_ON); this.damageVsEntity = damage; this.attackSpeed = speed; } public float getStrVsBlock(ItemStack stack, IBlockState state) { Material material = state.getMaterial(); return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; } } package Nedas60.TestMod.items; import Nedas60.TestMod.Reference; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; public class Infused_Axe extends ItemAxe { public Infused_Axe(ToolMaterial material) { super(material); setUnlocalizedName(Reference.TestItems.INFUSED_AXE.getUnlocalizedName()); setRegistryName(Reference.TestItems.INFUSED_AXE.getRegistryName()); } }
  16. As I said I am kinda new to this and I want to ask how will this help me?
  17. I am new to forge and I just cannot understand the ItemTool way. I tried ItemAxe but that apparently is hardcoded. All I need is the code for: public static ToolMaterial INFUSED = EnumHelper.addToolMaterial("INFUSED", 5, 3000, 15.0F, 12.0F, 30); All the rendering and names and stuff is already done. Thanks!
  18. I did not know there was item handheld. Anyway, Thanks a lot!
  19. I was trying to make a sword but I couldn't figure it out. I tried to copy the iron sword json but that just looks odd. It looks like I am holding any other regular item. Current code I have: { "parent": "builtin/generated", "textures": { "layer0": "ntm:items/InfusedSword" }, "display": { "thirdperson": { "rotation": [ 0, 90, -35 ], "translation": [ 0, 1.25, -3.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } Can someone help me make an actual sword json file? The sword is basically like the vanilla ones just red. No difference in textures. Thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.