Jump to content

How would I go about coding a custom cape?


ZeldaCorporation

Recommended Posts

and even how do we tell who gets the cape and what do we put,because just that one line will not suffice

 

you could use an if statement for the player's username. I did this

if(player.username == "USERNAME_ ONE" || player.username == "USERNAME_TWO" || player.username == "USERNAME_THREE")
	{
		player.playerCloakUrl = "";
	}

but I have no clue what the url should be.

Link to comment
Share on other sites

player.username == "USERNAME_ ONE"

this is not how strings should be compared! http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java

 

I believe it's just URL, so you put there something like "http://www.anirudh.net/courses/cse585/project2/results_runs/images/lenna.gif" (e.g. link to a picture on imageshack).

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

player.username == "USERNAME_ ONE"

this is not how strings should be compared! http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java

 

I believe it's just URL, so you put there something like "http://www.anirudh.net/courses/cse585/project2/results_runs/images/lenna.gif" (e.g. link to a picture on imageshack).

 

awsome,now the only question left is what is the pixel size??? (ex: blocks are 16x16)

Link to comment
Share on other sites

Could someone just post what it would look like in this code:

package ZCs_Mod;


import ic2.api.Ic2Recipes;

import java.util.AbstractMap;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFence;
import net.minecraft.block.BlockFenceGate;
import net.minecraft.block.BlockWall;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;





@Mod(modid = "Minecraft Edits", name = "Minecraft Edits", version = "v3.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = true)



public class ZCsMod
{

//Items

public static Item CompressedLeather;
public static Item TannedLeather;
public static Item ReinforcedLeather;
public static Item Twine;
public static Item Rope;
public static Item BirchStick;
public static Item JungleStick;
public static Item SpruceStick;
public static Item Moss;
public static Item Link;
public static Item Chainlinks;
//public static Item CobbleStick;

//Blocks
public static Block BirchFenceGate;
public static Block JungleFenceGate;
public static Block SpruceFenceGate;
public static Block BirchFence;
public static Block JungleFence;
public static Block SpruceFence;
//public static Block CobbleFenceGate;

//Tabs
public static CreativeTabs MCEdits = new MCEdits(CreativeTabs.getNextID(), "MineCraft Edits");



        @PreInit
        public void initConfig(FMLPreInitializationEvent fpe)
        {
        	
        }
        /**
        * @PostInit
        *
        *public void check(FMLPostInitializationEvent e)
        *{
        *if(Loader.isModLoaded("IC2"))
        *    {
        *	
        *
        *	 }
        *}
        */
        
        @Init
        
        
        public void load(FMLInitializationEvent fie)
        {
        	
        	//Items
        	
        	CompressedLeather = (new ModItem(3000).setItemName("Compressed Leather").setCreativeTab(this.MCEdits).setIconCoord(0, 0));
        	ReinforcedLeather = (new ModItem(3001).setItemName("Reinforced Leather").setCreativeTab(this.MCEdits).setIconCoord(4, 0));
        	TannedLeather = (new ModItem(3002).setItemName("Tanned Leather").setCreativeTab(this.MCEdits).setIconCoord(1, 0));
        	Twine = (new ModItem(3003).setItemName("Twine").setCreativeTab(this.MCEdits).setIconCoord(2, 0));
        	Rope = (new ModItem(3004).setItemName("Rope").setCreativeTab(this.MCEdits).setIconCoord(3, 0));
        	BirchStick = (new ModItem(3005).setItemName("Birch Stick").setCreativeTab(this.MCEdits).setIconCoord(5, 0));
        	JungleStick = (new ModItem(3006).setItemName("Jungle Stick").setCreativeTab(this.MCEdits).setIconCoord(6, 0));
        	SpruceStick = (new ModItem(3007).setItemName("Spruce Stick").setCreativeTab(this.MCEdits).setIconCoord(7, 0));
        	Moss = (new ModItem(3008).setItemName("Moss").setCreativeTab(this.MCEdits).setIconCoord(9, 0));
        	Link = (new ModItem(3009).setItemName("Iron Link").setCreativeTab(this.MCEdits).setIconCoord(10, 0));
        	Chainlinks = (new ModItem(3010).setItemName("Chain Links").setCreativeTab(this.MCEdits).setIconCoord(11, 0));

        	//CobbleStick = (new ModItem(2908).setItemName("Cobble Stick").setCreativeTab(CreativeTabs.tabMaterials).setIconCoord(8, 0));
        	
        	//Blocks
        	
            BirchFenceGate = (new BlockFenceGate(3622, 214)).setHardness(2.0F).setResistance(5.0F).setBlockName("Birch FenceGate").setRequiresSelfNotify();
            JungleFenceGate = (new BlockFenceGate(3623, 199)).setHardness(2.0F).setResistance(5.0F).setBlockName("Jungle FenceGate").setRequiresSelfNotify();
            SpruceFenceGate = (new BlockFenceGate(3624, 198)).setHardness(2.0F).setResistance(5.0F).setBlockName("Spruce FenceGate").setRequiresSelfNotify();
            BirchFence = (new BlockzFence(3625, 214)).setHardness(2.0F).setResistance(5.0F).setBlockName("Birch Fence");
            JungleFence = (new BlockzFence(3626, 199)).setHardness(2.0F).setResistance(5.0F).setBlockName("Jungle Fence");
            SpruceFence = (new BlockzFence(3627, 198)).setHardness(2.0F).setResistance(5.0F).setBlockName("Spruce Fence");

            //CobbleFenceGate = (new BlockFenceGate(3621, 16)).setHardness(2.0F).setResistance(5.0F).setBlockName("Cobble FenceGate").setRequiresSelfNotify();

                registeringBlocks();
                blockNames();
                itemNames();
                recipes(); 
                smelting();
        
                
                //MINECRAFT FORGE TEXTURE FUNCTIONS
                
                MinecraftForgeClient.preloadTexture("/Textures/ZCsItems");
                MinecraftForgeClient.preloadTexture("/Textures/ZCsBlocks");
        }

        
        public void registeringBlocks()
        {
        	//GameRegistry.registerBlock(CobbleFenceGate, "Cobble FenceGate");
            GameRegistry.registerBlock(BirchFenceGate, "Birch FenceGate");
            GameRegistry.registerBlock(JungleFenceGate, "Jungle FenceGate");
            GameRegistry.registerBlock(SpruceFenceGate, "Spruce FenceGate");
            GameRegistry.registerBlock(BirchFence, "Birch Fence");
            GameRegistry.registerBlock(JungleFence, "Jungle Fence");
            GameRegistry.registerBlock(SpruceFence, "Spruce Fence");
        }
        
        public void blockNames()
        {
        	//LanguageRegistry.addName(CobbleFenceGate, "Cobblestone FenceGate");
        	LanguageRegistry.addName(BirchFenceGate, "Birch FenceGate");
        	LanguageRegistry.addName(JungleFenceGate, "Jungle FenceGate");
        	LanguageRegistry.addName(SpruceFenceGate, "Spruce FenceGate");
        	LanguageRegistry.addName(BirchFence, "Birch Fence");
        	LanguageRegistry.addName(JungleFence, "Jungle Fence");
        	LanguageRegistry.addName(SpruceFence, "Spruce Fence");
        }
        
        public void itemNames()
        {
        	
        	LanguageRegistry.addName(CompressedLeather, "Compressed Leather");
        	LanguageRegistry.addName(TannedLeather, "Tanned Leather");
        	LanguageRegistry.addName(ReinforcedLeather, "Reinforced Leather");
        	LanguageRegistry.addName(Twine, "Twine");
        	LanguageRegistry.addName(Rope, "Rope");
        	LanguageRegistry.addName(BirchStick, "Birch Stick");
        	LanguageRegistry.addName(JungleStick, "Jungle Stick");
        	LanguageRegistry.addName(SpruceStick, "Spruce Stick");
        	LanguageRegistry.addName(Moss, "Moss");
        	LanguageRegistry.addName(Link, "Iron Link");
        	LanguageRegistry.addName(Chainlinks, "Chain Link");
        	//LanguageRegistry.addName(CobbleStick, "Cobble Stick");
        	
        }
        
        public void recipes()
        {
        	GameRegistry.addRecipe(new ItemStack(CompressedLeather, 1), new Object[] {
        	"xxx", "xxx", "xxx", 'x', Item.leather
        	});
        	GameRegistry.addRecipe(new ItemStack(Rope, 1), new Object[] {
            	"x x", " x ", "x x", 'x', this.Twine
            });
        	GameRegistry.addRecipe(new ItemStack(Twine, 1), new Object[] {
            	"x x", "x x", "x x", 'x', Item.silk
            });
        	GameRegistry.addRecipe(new ItemStack(ReinforcedLeather, 1), new Object[] {
            	"xxx", "xgx", "xxx", 'x', this.TannedLeather, 'g', Item.ingotGold
            });
        	GameRegistry.addRecipe(new ItemStack(Item.saddle, 1), new Object[] {
            	"rrr", "rRr", "I I", 'r', this.ReinforcedLeather, 'R', this.Rope,'I' , Item.ingotIron
            });
        	
        	GameRegistry.addShapelessRecipe(new ItemStack(Item.leather, 9), new Object[] {
            	this.CompressedLeather
        	});
        	
        	GameRegistry.addShapelessRecipe(new ItemStack(Item.stick, 1), new Object[] {
            	this.BirchStick
        	});
        	
        	GameRegistry.addShapelessRecipe(new ItemStack(Item.stick, 1), new Object[] {
            	this.SpruceStick
        	});
        	
        	GameRegistry.addShapelessRecipe(new ItemStack(Item.stick, 1), new Object[] {
            	this.JungleStick
        	});
        	
        	GameRegistry.addRecipe(new ItemStack(BirchStick, 6), new Object[] {
            	" x ", " x ", " x ", 'x', new ItemStack(Block.planks, 5, 2)
        	});
        	
        	GameRegistry.addRecipe(new ItemStack(JungleStick, 6), new Object[] {
            	" x ", " x ", " x ", 'x', new ItemStack(Block.planks, 5, 3)
        	});
        	
        	GameRegistry.addRecipe(new ItemStack(SpruceStick, 6), new Object[] {
            	" x ", " x ", " x ", 'x', new ItemStack(Block.planks, 5, 1)
        	});
        	
        	//GameRegistry.addRecipe(new ItemStack(CobbleStick, 6), new Object[] {
            //	" x ", " x ", " x ", 'x', Block.cobblestone
        	//});
        	
        	GameRegistry.addRecipe(new ItemStack(BirchFenceGate, 1), new Object[] {
            	"   ", "sxs", "sxs", 'x', new ItemStack(Block.planks, 5, 2), 's', this.BirchStick
        	});
        	
        	GameRegistry.addRecipe(new ItemStack(JungleFenceGate, 1), new Object[] {
            	"   ", "sxs", "sxs", 'x', new ItemStack(Block.planks, 5, 3), 's', this.JungleStick
        	});
        	
        	GameRegistry.addRecipe(new ItemStack(SpruceFenceGate, 1), new Object[] {
            	"   ", "sxs", "sxs", 'x', new ItemStack(Block.planks, 5, 1), 's', this.SpruceStick
        	});
        	
        	//GameRegistry.addRecipe(new ItemStack(CobbleFenceGate, 1), new Object[] {
            //	"   ", "sxs", "sxs", 'x', Block.cobblestone, 's', this.CobbleStick
        	//});
        	
        	GameRegistry.addRecipe(new ItemStack(BirchFence, 4), new Object[]
        			{
        		"   ", "sss", "sss", 's', this.BirchStick
        			});
        	GameRegistry.addRecipe(new ItemStack(JungleFence, 4), new Object[]
        			{
        		"   ", "sss", "sss", 's', this.JungleStick
        			});
        	GameRegistry.addRecipe(new ItemStack(SpruceFence, 4), new Object[]
        			{
        		"   ", "sss", "sss", 's', this.SpruceStick
        			});
        	
        	GameRegistry.addRecipe(new ItemStack(Block.cobblestoneMossy, 1), new Object[] {
            	"xxx", "xvx", "xxx", 'x', this.Moss, 'v', Block.cobblestone
        	});
        
            GameRegistry.addRecipe(new ItemStack(Moss, 4), new Object[] {
        	"xxx", "xxx", "xxx", 'x', Block.vine
            });
            
            GameRegistry.addRecipe(new ItemStack(Link, 1), new Object[] {
            	"xxx", "x x", "xxx", 'x', Block.fenceIron
                });
            
            GameRegistry.addRecipe(new ItemStack(Chainlinks, 1), new Object[] {
            	"x  ", " x ", "  x", 'x', this.Link
                });
            
            GameRegistry.addRecipe(new ItemStack(Item.helmetChain, 1), new Object[] {
            	"xxx", "x x", "   ", 'x', this.Chainlinks
                });
            
            GameRegistry.addRecipe(new ItemStack(Item.helmetChain, 1), new Object[] {
            	"   ", "xxx", "x x", 'x', this.Chainlinks

                });
            
            GameRegistry.addRecipe(new ItemStack(Item.plateChain, 1), new Object[] {
            	"x x", "xxx", "xxx", 'x', this.Chainlinks
                });
            
            GameRegistry.addRecipe(new ItemStack(Item.legsChain, 1), new Object[] {
            	"xxx", "x x", "x x", 'x', this.Chainlinks
                });
            
            GameRegistry.addRecipe(new ItemStack(Item.bootsChain, 1), new Object[] {
            	"x x", "x x", "   ", 'x', this.Chainlinks
                });
            
            GameRegistry.addRecipe(new ItemStack(Item.bootsChain, 1), new Object[] {
            	"   ", "x x", "x x", 'x', this.Chainlinks
                });
        }
        public void smelting()
        {
        	GameRegistry.addSmelting(CompressedLeather.shiftedIndex, new ItemStack(TannedLeather, 1), 1.0F);
        }

}

 

and use the user: ZeldaCorporation and a test url: http://media-mcw.cursecdn.com/9/9a/Minecon_Cape2012.png

Link to comment
Share on other sites

Just so you guys know, Mojang frowns on Capes mods.. You need to download the cape after you set the URL.

 

minecraftInstance.renderEngine.obtainImageData(URL, *IMAGE BUFFER*);

 

Oh endershadow, I like your avatar.. :D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My journey into crypto trading began tentatively, with me dipping my toes into the waters by purchasing my first Bitcoin through a seasoned trader. With an initial investment of $5,000, I watched as my investment grew, proving to be both fruitful and lucrative. Encouraged by this success, I decided to increase my investment to $150,000, eager to capitalize on the growing popularity of cryptocurrency, However, as cryptocurrency gained mainstream attention, so too did the number of self-proclaimed "experts" in the field. Suddenly, everyone seemed to be a crypto guru, and more and more people were eager to jump on the bandwagon without fully understanding the intricacies of this complex world. With promises of quick and easy profits, these con artists preyed on the uninformed, luring them into schemes that often ended in disappointment and financial loss. Unfortunately, I fell victim to one such scheme. Seduced by the allure of easy money, I entrusted my hard-earned funds to a dubious trading platform, granting them access to my accounts in the hopes of seeing my investment grow. For a brief period, everything seemed to be going according to plan, with regular withdrawals and promising returns on my investment. However, my hopes were soon dashed when, without warning, communication from the platform ceased, and my Bitcoin holdings vanished into thin air. Feeling helpless and betrayed, I confided in a family member about my predicament. They listened sympathetically and offered a glimmer of hope in the form of a recommendation for Wizard Web Recovery. Intrigued by the possibility of reclaiming what I had lost, I decided to explore this option further. From the moment I reached out to Wizard Web Recovery, I was met with professionalism and empathy. They took the time to understand my situation and reassured me that I was not alone in my plight. With their guidance, I embarked on a journey to reclaim what was rightfully mine. Wizard Web Recovery's expertise and dedication were evident from the start. They meticulously analyzed the details of my case, uncovering crucial evidence that would prove invaluable in our quest for justice. With each step forward, they kept me informed and empowered, instilling in me a newfound sense of hope and determination. Through their tireless efforts and unwavering support, Wizard Web Recovery succeeded in recovering my lost Bitcoin holdings. It was a moment of triumph and relief, knowing that justice had been served and that I could finally put this chapter behind me. In conclusion, My experience with Wizard Web Recovery  was nothing short of transformative. Their professionalism, expertise, and unwavering commitment to their clients set them apart as true leaders in the field of cryptocurrency recovery. I am forever grateful for their assistance and would highly recommend their services to anyone in need of help navigating the treacherous waters of cryptocurrency scams. 
    • Ok so: Two things to note: It got stuck due to my dimension type. It was previously the same as the overworld dimension tpye but after changing it , it didn't freeze during spawn generation. ALSO, APPARENTLY, the way I'm doing things, the game can't have two extremely-rich dimensions or it will make the new chunk generation be veeery VEEERY slow. I'm doing the dimension file genreation all in the data generation step now, so it's all good. Mostly. If anybody has any tips regarding how can i more efficently generate a biome-rich dimension, im all ears.
    • https://mclo.gs/qTo3bUE  
    • Check for the mods ingame - create a new world in creative mod and check the creative inventory  
    • I installed forge 49.0.22 with Minecraft 1.20.4 because I want to play this mod: AgeOfWeapons-Reforged-1.20.4-(v.1.3.3) I able able to launch forge from Minecraft launcher but then the menu doesn't show the "mods" button. The menu says 3 mods are loaded even though I have 2 mods in the mods folder. When I start the game it seems that the AgeOfWeapons mod isn't loaded, but I can't be sure. How can I check which mods are loaded so that I can play with the AgeOfWeapons mod?
  • Topics

×
×
  • Create New...

Important Information

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