Posted February 21, 201312 yr I don't know what to write for my Armor Proxies. I need to make a method/string in the proxies so i can replace my modloader.addArmor with my proxies. I just dont know how to write them. If you need any current proxy script information just ask and ill give it to you. Hope you can help! Thanks!
February 22, 201312 yr what on earth are you talking about? what is a armor proxy and what the * is a proxy script? If you want a forge armor tutorial, then here's one: http://www.minecraftforum.net/topic/1452051-147-deverions-forge-modding-tutorials-updated-13-02-2013-23-tutorials/ but for armor proxy scripts, I have no clue sorry. If you guys dont get it.. then well ya.. try harder...
February 22, 201312 yr Author Ok.. Way back when, someone told me you want to make a ClientProxy class and CommonProxy class, also known as proxies. Now you would use these for alot of things. They would define the place where your 256x256 items/blocks png is stored. They can also be used for other things. Like in my last thread I had a problem with my armor and it would only show the leggings on my character. So diesieben07 told me one problem may be because in my mod_tutorial(main class) when i was doing the ModLoader.addArmor for all my armor that it had something to do with it. And he told me to make a method in the ClientProxy for the addArmor. Im just running into that problem so thats why i needed to know how to set up a proxy for armor's. Thing is that might not be the error. Ok so you might be confused about all this. The point is the reason all of this started was because on my character when all the armor was on it only showed him with his leggings. So if you know any way to fix that it would be great. mod_tutorial.class package tutorialtest; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.event.FMLInitializationEvent; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemSword; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.src.ModLoader; @Mod(modid = "ArmorTest-Tutorial", name = "Tutorial", version = "1.4.7") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class mod_tutorial { //blue public static Item TutorialHelmet; public static Item TutorialPlate; public static Item TutorialLegs; public static Item TutorialBoots; public static Item BlueIngot; public static Item BlueDust; public static Item BlueToolFragment; public static Item BlueSword; public static Item BluePickaxe; public static Item BlueSpade; public static Item BlueAxe; public static Block BlueOre; //yellow public static Item YellowHelmet; public static Item YellowPlate; public static Item YellowLegs; public static Item YellowBoots; public static Item YellowToolFragment; public static Item YellowIngot; public static Item YellowDust; public static Item YellowSword; public static Item YellowPickaxe; public static Item YellowSpade; public static Item YellowAxe; public static Block YellowOre; //White/Silver public static Item WhiteHelmet; public static Item WhitePlate; public static Item WhiteLegs; public static Item WhiteBoots; public static Item WhiteIngot; public static Item SilverIngot; public static Item WhitePowder; public static Item SilverDust; //red public static Item RedHelmet; public static Item RedPlate; public static Item RedLegs; public static Item RedBoots; public static Item RedIngot; public static Item RedToolFragment; public static Item RedDust; //green public static Item GreenHelmet; public static Item GreenPlate; public static Item GreenLegs; public static Item GreenBoots; public static Item GreenIngot; public static Item GreenToolFragment; public static Item GreenDust; //Pink public static Item PinkHelmet; public static Item PinkPlate; public static Item PinkLegs; public static Item PinkBoots; public static Item PinkIngot; public static Item PinkToolFragment; public static Item PinkDust; //Enum Materials //static EnumArmorMaterial TutorialEnumArmourMaterial = EnumHelper.addArmorMaterial("tutorial", 24, new int[] { 2, 5, 3, 2 }, 16); @Init public void load(FMLInitializationEvent event){ //Blue TutorialHelmet = new ItemTutorialHelmet(508,EnumArmorMaterial.BLUE, ClientProxy.addArmor("Tut"),0).setItemName("TutHelm").setIconIndex(0); TutorialPlate = new ItemTutorialPlate(509,EnumArmorMaterial.BLUE, ClientProxy.addArmor("Tut"),1).setItemName("TutPlate").setIconIndex(1); TutorialLegs = new ItemTutorialLegs(510,EnumArmorMaterial.BLUE, ClientProxy.addArmor("Tut"),2).setItemName("TutLeg").setIconIndex(2); TutorialBoots = new ItemTutorialBoots(511,EnumArmorMaterial.BLUE, ClientProxy.addArmor("Tut"),3).setItemName("TutBoot").setIconIndex(3); BlueIngot = new BlueIngot(532).setItemName("BlueIngot").setIconIndex(24); BlueToolFragment = new BlueToolFragment(533).setItemName("BlueToolFragment").setIconIndex(25); BlueSword = new BlueSword(534, EnumToolMaterial.BLUE).setItemName("BlueSword").setIconIndex(26); BluePickaxe = new BluePickaxe(535, EnumToolMaterial.BLUE).setItemName("BluePickaxe").setIconIndex(27); BlueSpade = new BlueSpade(536, EnumToolMaterial.BLUE).setItemName("BlueSpade").setIconIndex(28); BlueAxe = new BlueAxe(537, EnumToolMaterial.BLUE).setItemName("BlueAxe").setIconIndex(29); BlueDust = new BlueDust(538).setItemName("BlueDust").setIconIndex(30); BlueOre = new BlueOre(539, 0).setHardness(3.0F).setResistance(3.0F).setBlockName("BlueOre"); //Yellow YellowHelmet = new ItemYellowHelmet(512,EnumArmorMaterial.YELLOW, ModLoader.addArmor("Tutorial"),0).setItemName("YellowHelm").setIconIndex(4); YellowPlate = new ItemYellowPlate(513,EnumArmorMaterial.YELLOW, ModLoader.addArmor("Tutorial"),1).setItemName("YellowPlate").setIconIndex(5); YellowLegs = new ItemYellowLegs(514,EnumArmorMaterial.YELLOW, ModLoader.addArmor("Tutorial"),2).setItemName("YellowLeg").setIconIndex(6); YellowBoots = new ItemYellowBoots(515,EnumArmorMaterial.YELLOW, ModLoader.addArmor("Tutorial"),3).setItemName("YellowBoot").setIconIndex(7); YellowIngot = new YellowIngot(540).setItemName("YellowIngot").setIconIndex(31); YellowToolFragment = new YellowToolFragment(541).setItemName("YellowToolFragment").setIconIndex(32); YellowSword = new YellowSword(542, EnumToolMaterial.YELLOW).setItemName("YellowSword").setIconIndex(33); YellowPickaxe = new YellowPickaxe(543, EnumToolMaterial.YELLOW).setItemName("YellowPickaxe").setIconIndex(34); YellowSpade = new YellowSpade(544, EnumToolMaterial.YELLOW).setItemName("YellowSpade").setIconIndex(35); YellowAxe = new YellowAxe(545, EnumToolMaterial.YELLOW).setItemName("YellowAxe").setIconIndex(36); YellowDust = new YellowDust(546).setItemName("YellowDust").setIconIndex(37); YellowOre = new YellowOre(547, 1).setHardness(3.0F).setResistance(3.0F).setBlockName("YellowOre"); //White WhiteHelmet = new ItemWhiteHelmet(516, EnumArmorMaterial.DIAMOND, ModLoader.addArmor("Tutorial"),0).setItemName("WhiteHelm").setIconIndex(; WhitePlate = new ItemWhitePlate(517,EnumArmorMaterial.DIAMOND, ModLoader.addArmor("Tutorial"),1).setItemName("WhitePlate").setIconIndex(9); WhiteLegs = new ItemWhiteLegs(518,EnumArmorMaterial.DIAMOND, ModLoader.addArmor("Tutorial"),2).setItemName("WhiteLeg").setIconIndex(10); WhiteBoots = new ItemWhiteBoots(519,EnumArmorMaterial.DIAMOND, ModLoader.addArmor("Tutorial"),3).setItemName("WhiteBoot").setIconIndex(11); //Blue RedHelmet = new ItemRedHelmet(520, EnumArmorMaterial.RED, ModLoader.addArmor("Tutorial"),0).setItemName("RedHelm").setIconIndex(12); RedPlate = new ItemRedPlate(521,EnumArmorMaterial.RED, ModLoader.addArmor("Tutorial"),1).setItemName("RedPlate").setIconIndex(13); RedLegs = new ItemRedLegs(522,EnumArmorMaterial.RED, ModLoader.addArmor("Tutorial"),2).setItemName("RedLeg").setIconIndex(14); RedBoots = new ItemRedBoots(523,EnumArmorMaterial.RED, ModLoader.addArmor("Tutorial"),3).setItemName("RedBoot").setIconIndex(15); //Green GreenHelmet = new ItemGreenHelmet(524, EnumArmorMaterial.GREEN, ModLoader.addArmor("Tutorial"),0).setItemName("GreenHelm").setIconIndex(16); GreenPlate = new ItemGreenPlate(525,EnumArmorMaterial.GREEN, ModLoader.addArmor("Tutorial"),1).setItemName("GreenPlate").setIconIndex(17); GreenLegs = new ItemGreenLegs(526,EnumArmorMaterial.GREEN, ModLoader.addArmor("Tutorial"),2).setItemName("GreenLeg").setIconIndex(18); GreenBoots = new ItemGreenBoots(527,EnumArmorMaterial.GREEN, ModLoader.addArmor("Tutorial"),3).setItemName("GreenBoot").setIconIndex(19); //Pink PinkHelmet = new ItemPinkHelmet(528, EnumArmorMaterial.PINK, ModLoader.addArmor("Tutorial"),0).setItemName("PinkHelm").setIconIndex(20); PinkPlate = new ItemPinkPlate(529,EnumArmorMaterial.PINK, ModLoader.addArmor("Tutorial"),1).setItemName("PinkPlate").setIconIndex(21); PinkLegs = new ItemPinkLegs(530,EnumArmorMaterial.PINK, ModLoader.addArmor("Tutorial"),2).setItemName("PinkLeg").setIconIndex(22); PinkBoots = new ItemPinkBoots(531,EnumArmorMaterial.PINK, ModLoader.addArmor("Tutorial"),3).setItemName("PinkBoot").setIconIndex(23); //Register Blocks GameRegistry.registerBlock(BlueOre, "BlueOre"); GameRegistry.registerBlock(YellowOre, "YellowOre"); //blue GameRegistry.addRecipe(new ItemStack(mod_tutorial.TutorialHelmet,1), new Object[]{ "TTT","T T"," ",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.TutorialPlate,1), new Object[]{ "TTT","TTT","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.TutorialLegs,1), new Object[]{ "TTT","T T","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.TutorialBoots,1), new Object[]{ " ","T T","T T",'T',Block.dirt }); //Yellow GameRegistry.addRecipe(new ItemStack(mod_tutorial.YellowHelmet,1), new Object[]{ "TTT","T T"," ",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.YellowPlate,1), new Object[]{ "TTT","TTT","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.YellowLegs,1), new Object[]{ "TTT","T T","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.YellowBoots,1), new Object[]{ " ","T T","T T",'T',Block.dirt }); //white GameRegistry.addRecipe(new ItemStack(mod_tutorial.WhiteHelmet,1), new Object[]{ "TTT","T T"," ",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.WhitePlate,1), new Object[]{ "TTT","TTT","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.WhiteLegs,1), new Object[]{ "TTT","T T","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.WhiteBoots,1), new Object[]{ " ","T T","T T",'T',Block.dirt }); //red GameRegistry.addRecipe(new ItemStack(mod_tutorial.RedHelmet,1), new Object[]{ "TTT","T T"," ",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.RedPlate,1), new Object[]{ "TTT","TTT","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.RedLegs,1), new Object[]{ "TTT","T T","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.RedBoots,1), new Object[]{ " ","T T","T T",'T',Block.dirt }); //green GameRegistry.addRecipe(new ItemStack(mod_tutorial.GreenHelmet,1), new Object[]{ "TTT","T T"," ",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.GreenPlate,1), new Object[]{ "TTT","TTT","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.GreenLegs,1), new Object[]{ "TTT","T T","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.GreenBoots,1), new Object[]{ " ","T T","T T",'T',Block.dirt }); //pink GameRegistry.addRecipe(new ItemStack(mod_tutorial.PinkHelmet,1), new Object[]{ "TTT","T T"," ",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.PinkPlate,1), new Object[]{ "TTT","TTT","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.PinkLegs,1), new Object[]{ "TTT","T T","T T",'T',Block.dirt }); GameRegistry.addRecipe(new ItemStack(mod_tutorial.PinkBoots,1), new Object[]{ " ","T T","T T",'T',Block.dirt }); //Blue LanguageRegistry.addName(TutorialHelmet, "Blue Helmet"); LanguageRegistry.addName(TutorialPlate, "Blue ChestPlate"); LanguageRegistry.addName(TutorialLegs, "Blue Leggings"); LanguageRegistry.addName(TutorialBoots, "Blue Boots"); LanguageRegistry.addName(BlueIngot, "Blue Ingot"); LanguageRegistry.addName(BlueToolFragment, "Blue-Tool-Fragment"); LanguageRegistry.addName(BlueSword, "Blue Sword"); LanguageRegistry.addName(BluePickaxe, "Blue Pickaxe"); LanguageRegistry.addName(BlueSpade, "Blue Spade"); LanguageRegistry.addName(BlueAxe, "Blue Axe"); LanguageRegistry.addName(BlueDust, "Blue Dust"); LanguageRegistry.addName(BlueOre, "Blue Ore"); //Yellow LanguageRegistry.addName(YellowHelmet, "Yellow Helmet"); LanguageRegistry.addName(YellowPlate, "Yellow ChestPlate"); LanguageRegistry.addName(YellowLegs, "Yellow Leggings"); LanguageRegistry.addName(YellowBoots, "Yellow Boots"); LanguageRegistry.addName(YellowIngot, "Yellow Ingot"); LanguageRegistry.addName(YellowToolFragment, "Yellow-Tool-Fragment"); LanguageRegistry.addName(YellowSword, "Yellow Sword"); LanguageRegistry.addName(YellowPickaxe, "Yellow Pickaxe"); LanguageRegistry.addName(YellowSpade, "Yellow Spade"); LanguageRegistry.addName(YellowAxe, "Yellow Axe"); LanguageRegistry.addName(YellowDust, "Yellow Dust"); LanguageRegistry.addName(YellowOre, "Yellow Ore"); //White LanguageRegistry.addName(WhiteHelmet, "White Helmet"); LanguageRegistry.addName(WhitePlate, "White ChestPlate"); LanguageRegistry.addName(WhiteLegs, "White Leggings"); LanguageRegistry.addName(WhiteBoots, "White Boots"); //Red LanguageRegistry.addName(RedHelmet, "Red Helmet"); LanguageRegistry.addName(RedPlate, "Red ChestPlate"); LanguageRegistry.addName(RedLegs, "Red Leggings"); LanguageRegistry.addName(RedBoots, "Red Boots"); //Green LanguageRegistry.addName(GreenHelmet, "Green Helmet"); LanguageRegistry.addName(GreenPlate, "Green ChestPlate"); LanguageRegistry.addName(GreenLegs, "Green Leggings"); LanguageRegistry.addName(GreenBoots, "Green Boots"); //Pink LanguageRegistry.addName(PinkHelmet, "Pink Helmet"); LanguageRegistry.addName(PinkPlate, "Pink ChestPlate"); LanguageRegistry.addName(PinkLegs, "Pink Leggings"); LanguageRegistry.addName(PinkBoots, "Green Boots"); //Ore Generation GameRegistry.registerWorldGenerator(new OreWorldGen()); } } ClientProxy package tutorialtest; import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraftforge.client.MinecraftForgeClient; public class ClientProxy extends CommonProxy { public static String BLOCKS_PNG = "/tutorial/generic/block.png"; public static String ITEMS_PNG = "/tutorial/generic/items.png"; public static void registerRenderThings() { MinecraftForgeClient.preloadTexture(BLOCKS_PNG); MinecraftForgeClient.preloadTexture(ITEMS_PNG); } public static int addArmor(String armor) { return RenderingRegistry.addNewArmourRendererPrefix(armor); } } CommonProxy package tutorialtest; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; import cpw.mods.fml.common.network.IGuiHandler; public class CommonProxy implements IGuiHandler { public static void registerRenderThings() { } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } public int addArmour(String armour) { return 0; } } Picture of problem https://photos-4.dropbox.com/t/0/AAA7jfRPQ-Z0jLteudbS0i_QY3dkmnQhMNLXDTE2U3yK2A/12/144615101/png/32x32/6/_/1/2/Armor%20Error.png/muAqGzGQ9ynoGcIrdMU0IHNd8NRiti5y_l7AlOPbSRY?size=1280x960&size_mode=2 Hope you can help Mazetar. If you dont understand im not sure if i can explain it any better, but still ask (basic)questions if needed . Thanks!
February 22, 201312 yr There now your question makes sense, this helps us help you at all I'm currently at work so I can't answer but now your post contains the information needed! If you guys dont get it.. then well ya.. try harder...
February 22, 201312 yr Because after http://www.minecraftforge.net/forum/index.php/topic,5911.0.html he did get asked to learn Java so he created a new topic instead asking for a solution instead of learning something... If you guys dont get it.. then well ya.. try harder...
February 22, 201312 yr Author diesieben07 read my main post at the top, it shows why I have to do that. It comes up as an error, like it wont let me put ClientProxy.addArmor unless the method is public static int not public int. Again I explained this in beginning post.
February 22, 201312 yr Author Here is the error when its not static: Cannot make a static reference to the non-static method addArmor(String) from the type ClientProxy
February 22, 201312 yr vandy, did you even read his response above here? yes thats the error you see inn your IDE at the moment, but that is not your main problem. read what he said: I can only say: learn java, then you know how proxies work. They work by method overriding. If you guys dont get it.. then well ya.. try harder...
February 22, 201312 yr Author Ok... I'm learning java, but I don't understand what ur point is. I thought learning java takes awhile and can be difficult well guess what it takes awhile. I thought people help people that have problems that's how u learn. Even if I watch all the videos I can I might still have an error I can't figure out. So I might as well ask someone else for help because your not. All I wanted to know is how to fix this simple problem but you guys can't help me unless I learn java.. so I guess I'm just gonna ask someone else and carry on looking for a way to solve this problem..
February 22, 201312 yr We told you the solution was to not use the word static, the error you are getting also was fixed futher above here or you could google the error you just pasted. Your problems now is related to the word static and you seem not to understand the basics of Java or well programming, therefore it's hard to assist you when you have been told the answer but didn't understand it. I recommend starting here, at the top and watching everything http://thenewboston.org/list.php?cat=31 that should give you a introduction to the basics. and this video deals with static: http://thenewboston.org/watch.php?cat=31&number=46 If you guys dont get it.. then well ya.. try harder...
February 22, 201312 yr if you check http://www.minecraftforge.net/wiki/Basic_Modding you see that theres no use of static inn the proxies. remove the static modifiers from your proxy classes and proxy class methods! If you guys dont get it.. then well ya.. try harder...
February 22, 201312 yr Author Ok let me refresh you on the problem here. All im doing when adding the armor method is just so i dont have to use the modloader. So i can have my own method for adding armor. Thats not the problem, I know thats what the Thread says, but the real problem is whenever i put on my suit of armor only the leggings show. So if anyone knows why that is it would be great thanks!
February 22, 201312 yr Author Ok so good news I fixed it! In my Armor classes i had the wrong png files connected with it so it screwed it up!
February 23, 201312 yr Author Do you need to make more than one set of tool classes for each different set? Or can you just use the one set of tool classes for all different tool sets?
February 23, 201312 yr Depends on how the tool sets are different from each other? And of course how you have implemented the first one? you could use the constructor's parameters to differentiate the different sets. If you guys dont get it.. then well ya.. try harder...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.