Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Write {
- public Write() {
- try {
- DataOutputStream out = new DataOutputStream(new FileOutputStream("spotanim.dat"));
- out.writeShort(SpotAnim.cache.length);
- for (SpotAnim anim : SpotAnim.cache) {
- if (anim.originalModelColors == null) {
- out.writeByte(0);
- continue;
- }
- if (anim.modelID != -1) {
- out.writeByte(1);
- out.writeShort(anim.modelID);
- }
- if (anim.animationID != -1) {
- out.writeByte(2);
- out.writeShort(anim.animationID);
- }
- if (anim.resizeXY != -1) {
- out.writeByte(4);
- out.writeShort(anim.resizeXY);
- }
- if (anim.resizeZ != -1) {
- out.writeByte(5);
- out.writeShort(anim.resizeZ);
- }
- if (anim.rotation != 1) {
- out.writeByte(6);
- out.writeShort(anim.rotation);
- }
- if (anim.modelBrightness != -1) {
- out.writeByte(7);
- out.writeByte(anim.modelBrightness);
- }
- if (anim.modelShadow != -1) {
- out.writeByte(8);
- out.writeByte(anim.modelShadow);
- }
- if (anim.originalModelColors != null) {
- for (int i = 40; i < 50; i++) {
- out.writeByte((byte) i);
- out.writeShort(anim.originalModelColors[i - 40]);
- }
- }
- if (anim.modifiedModelColors != null) {
- for (int i = 50; i < 60; i++) {
- out.writeByte((byte) i);
- out.writeShort(anim.modifiedModelColors[i - 50]);
- }
- }
- out.writeByte(0);
- }
- out.flush();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement