Giter VIP home page Giter VIP logo

developercapes's Introduction

Developer Capes

#####Notice: Usage changed in version 3. Please refer below to see how to set up DevCapes now.

####Version: 3.4.1.x

A Minecraft library for adding Developer/Tester only capes! Use this to add tester or developer only capes to your mod! Developer Capes reads a text file off a web server, public Dropbox folder, or a raw GitHub file. As long as it is not a download site, (such as MediaFire,) it should work.

Note: Previously called DeveloperCapesAPI, DeveloperCapes was renamed because Jadar realized he was stupid. And that this is a library.

Table of Contents

Links
Getting Started
Guide: Set up with Source Code
Usage
Building
FAQ

###Links: [Minecraft Forum Post](http://www.minecraftforum.net/topic/1725536-151apilibraryforge-developer-capes-api-now-with-hd-cape-support/) ###Getting Started: To start using Developer Capes, [setup your development enviroment](#guideSetUp). See [usage](#usage) to find out how to implement the library in your mod. ###Setting Up the Development Environment: 1. Download source code as a zip by clicking "Download Zip" on the right. 2. Unzip to a tempory directory. You can delete this once the source is copied. 3. Copy everything in src/main/java/ to the root of your mod source code. ###Usage:

Once Developer Capes is in your classpath somehow, you are going to want to add this to your mod when it initialized. It registers a cape config with DeveloperCapes.

Note: The note that was previously here, that said DevCapes didn't have to go in a client proxy, has been redacted. You need to put config registration in the client proxy again

DevCapes.getInstance().registerConfig($CAPES_JSON, $IDENTIFIER);

$CAPES_JSON is the URL (in Object or String form,) InputStream, or File to a text file hosted on a server, Dropbox, or GitHub, that has all the data Developer Capes needs to add your capes formatted in JSON. $IDENTIFIER is a unique mod identifier so DevCapes can keep one mod's groups separate from the other.

The JSON for the config looks like this:

{
    "Group1": {
        "capeUrl": "http://www.example.com/group1_cape.png",
        "users": [
            "JadarMC",
            "MinerID642"
        ]
    },
    "Captain_Shadows": "http://www.example.com/captain_cape.png"
}

You are going to want to make sure there is a comma after every element in the array, or string, etc, -except- when it is the last one in it's scope. If you do the logs will make this very clear.

#####Images: The cape image files are 22x17, and should be of the PNG format. Additionally, Developer Capes supports high definition capes. Those must be of the size that is divisible by 16. The height must be half of the width. So 1024x512, 2048x1024, and so on. Host them on a server, Dropbox, or GitHub.

###Building and Packaging your Mod: When you build and package your mod, you're going to want to make sure you build with the Developer Capes classes.

Thats it! If you have any trouble, make a post in the Minecraft Forums post or make an issue here on GitHub.

###FAQ: ####1. I'm getting a NullPointerException when starting a dedicated server: You're calling a @SideOnly(Side.CLIENT) class on a server. STOP IT. Put it in a ClientProxy.

####2. I'm getting a NoClassDefFoundError and/or a RuntimeExcption (related to an invalid side) on a dedicated server: See answer to question 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.