Advertisement
Guest User

Untitled

a guest
Jan 5th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. /*
  2. * The MIT License (MIT)
  3. *
  4. * Copyright (c) 2015 socraticphoenix@gmail.com
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
  7. * associated documentation files (the "Software"), to deal in the Software without restriction,
  8. * including without limitation the rights to use, copy, modify, merge, publish, distribute,
  9. * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all copies or
  13. * substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
  16. * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  17. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  18. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. *
  21. * @author Socratic_Phoenix (socraticphoenix@gmail.com)
  22. */
  23. package com.gmail.socraticphoenix.sponge.star;
  24.  
  25. import com.gmail.socraticphoenix.plasma.file.jlsc.JLSCCompound;
  26. import com.gmail.socraticphoenix.plasma.file.jlsc.io.JLSCByteWriter;
  27. import com.gmail.socraticphoenix.plasma.file.jlsc.io.JLSCWriter;
  28. import com.gmail.socraticphoenix.plasma.file.jlsc.util.JLSCByteUtil;
  29. import com.gmail.socraticphoenix.plasma.math.geometry.PlasmaPoint2D;
  30. import com.gmail.socraticphoenix.sponge.star.data.tracking.BlockTracker3D;
  31. import com.gmail.socraticphoenix.sponge.star.data.tracking.ChunkTracker2D;
  32. import com.gmail.socraticphoenix.sponge.star.data.tracking.HundredsTracker2D;
  33.  
  34. public class TrackerTest {
  35.  
  36. public static void main(String... args) throws Throwable {
  37. HundredsTracker2D<ChunkTracker2D> tracker = new HundredsTracker2D<>(ChunkTracker2D.class);
  38. tracker.put(new PlasmaPoint2D(53, 31), new ChunkTracker2D());
  39. tracker.put(new PlasmaPoint2D(132, 153), new ChunkTracker2D());
  40.  
  41. tracker.get(new PlasmaPoint2D(99, 99)).get().put(new PlasmaPoint2D(1, 1), new BlockTracker3D(256));
  42. tracker.get(new PlasmaPoint2D(100, 100)).get().put(new PlasmaPoint2D(1, 1), new BlockTracker3D(256));
  43.  
  44. JLSCCompound compound = new JLSCCompound();
  45. compound.put("tracker", tracker);
  46.  
  47.  
  48. JLSCWriter.writeToFile(compound, "test1.txt");
  49. JLSCByteWriter.writeToFile(compound, "test2.txt");
  50. JLSCByteUtil.writeToFileCompressed(compound, "test3.txt");
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement