Created
August 15, 2012 01:12
-
-
Save SpaceManiac/3354480 to your computer and use it in GitHub Desktop.
Java Serialization Stuff for TkTech
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.drayshak.WorldInventories; | |
import java.io.Serializable; | |
/* Trimmed to relevant parts only */ | |
public class WIItemStack implements Serializable { | |
private static final long serialVersionUID = -6239771143618730223L; | |
private int type = 0; | |
private int amount = 0; | |
private WIMaterialData data = null; | |
private short durability = 0; | |
private Map<Integer, Integer> enchantments = new HashMap<Integer, Integer>(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.drayshak.WorldInventories; | |
import java.io.Serializable; | |
/* Trimmed to relevant parts only */ | |
public class WIMaterialData implements Serializable { | |
private static final long serialVersionUID = 1385103110780786554L; | |
private final int type = 0; | |
private byte data = 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.drayshak.WorldInventories; | |
import java.io.Serializable; | |
/* Trimmed to relevant parts only */ | |
public class WIPlayerInventory implements Serializable { | |
private static final long serialVersionUID = 6713780477882018072L; | |
WIItemStack[] playerItems = null; | |
WIItemStack[] playerArmour = null; | |
} | |
// Example serialized WIPlayerInventory: | |
// http://wombat.platymuus.com/dl/WIPlayerInventory.dat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment