Skip to content

Instantly share code, notes, and snippets.

@miketamis
miketamis / document.md
Last active February 9, 2017 19:20 — forked from fllfl/document.md

Callback format: The first argument of the callback is reserved for an error object. If an error occurred, it will be returned by the first err argument. The second argument of the callback is reserved for any successful response data. If no error occurred, err will be set to null and any successful data will be returned in the second argument.

Create new transport layer obj via calling Transport with IP

const transport = new Transport('192.168.1.1');
@miketamis
miketamis / document.md
Last active February 6, 2017 22:24 — forked from fllfl/document.md

Create new transport layer obj via calling Transport with IP

const transport = new Transport('192.168.1.1');
transport.tryConnect().then(err, res) {
  if(err) {
 console.log(err);
@miketamis
miketamis / new.js
Last active February 18, 2016 04:16 — forked from Jtmaca9/new.js
var React = require('react');
var VoteWords = React.createClass({
getInitialState: function(){
return{
votes: []
}
},
@miketamis
miketamis / votewords.js
Last active February 18, 2016 04:05 — forked from Jtmaca9/votewords.js
var React = require('react');
var VoteWords = React.createClass({
getInitialState: function(){
return{
votes: []
}
},

Basic GUI

Saspiron's basic GUI will normally contain a series of buttons, and a background/image. To demonstrate those features, this GUI will render in-game model specified in the constructor. Starting with the class, we'll want to extend GuiScreen and declare what package we're in:

package net.minecraft.src;

public class GuiBasic extends GuiScreen {
    
}
package net.minecraft.src;
import java.util.Random;
public class mod_Swaginite extends BaseMod
{
public static Item SwaginiteHelmet;
public static Item SwaginiteChest;
public static Item SwaginiteLeggings;
public static Item SwaginiteBoots;