Jump to content

Recommended Posts

Posted

I have a mod but would like to make a cape for dev team and testers,and then a seperate one for donaters but dont have a single clue as to how.I would also like to know the demensions for the cape texture and maybe even a template .png

Posted

I would like to know how to make a cape as well. I know the Industrial Craft 2 modders have an IC2 cape

 

any idea on how i can contact them??? i tried tweeting RG and no reply i tweeted cpw and asked if he could ask one of the ic2 devs and nothing yet

Posted

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.

Posted

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)

Posted

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

Posted

Hmm I have ic2's source code so I'll look around and see if I can find it :D

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

Posted

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

Posted

Oh! I was gonna do that hahaha can i help? The buffer is an image buffer. you can just use the minecraft ImageBufferDownload class. just pass in new ImageBufferDownload().

Posted

I made an API for your Developer cape needs. :D It uses a txt file that has all the usernames you need in it. The txt file is hosted on a server like dropbox. The capes are also hosted there, and all the groups and urls are given in the txt file. :D Don't worry if that sounds complicated, a sample is given on the GitHub.

 

https://github.com/jadar/DeveloperCapesAPI

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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