Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * The MIT License (MIT)
- *
- * Copyright (c) 2015 socraticphoenix@gmail.com
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
- * associated documentation files (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all copies or
- * substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
- * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * @author Socratic_Phoenix (socraticphoenix@gmail.com)
- */
- package com.gmail.socraticphoenix.sponge.star;
- import com.gmail.socraticphoenix.plasma.file.jlsc.JLSCCompound;
- import com.gmail.socraticphoenix.plasma.file.jlsc.io.JLSCByteWriter;
- import com.gmail.socraticphoenix.plasma.file.jlsc.io.JLSCWriter;
- import com.gmail.socraticphoenix.plasma.file.jlsc.util.JLSCByteUtil;
- import com.gmail.socraticphoenix.plasma.math.geometry.PlasmaPoint2D;
- import com.gmail.socraticphoenix.sponge.star.data.tracking.BlockTracker3D;
- import com.gmail.socraticphoenix.sponge.star.data.tracking.ChunkTracker2D;
- import com.gmail.socraticphoenix.sponge.star.data.tracking.HundredsTracker2D;
- public class TrackerTest {
- public static void main(String... args) throws Throwable {
- HundredsTracker2D<ChunkTracker2D> tracker = new HundredsTracker2D<>(ChunkTracker2D.class);
- tracker.put(new PlasmaPoint2D(53, 31), new ChunkTracker2D());
- tracker.put(new PlasmaPoint2D(132, 153), new ChunkTracker2D());
- tracker.get(new PlasmaPoint2D(99, 99)).get().put(new PlasmaPoint2D(1, 1), new BlockTracker3D(256));
- tracker.get(new PlasmaPoint2D(100, 100)).get().put(new PlasmaPoint2D(1, 1), new BlockTracker3D(256));
- JLSCCompound compound = new JLSCCompound();
- compound.put("tracker", tracker);
- JLSCWriter.writeToFile(compound, "test1.txt");
- JLSCByteWriter.writeToFile(compound, "test2.txt");
- JLSCByteUtil.writeToFileCompressed(compound, "test3.txt");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement