Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[Toolkit] MCSchematicTool


  • Please log in to reply
1 reply to this topic

#1

Klaue
    Klaue

    Out of the Water

  • Members
  • 8 posts

Posted 13 April 2011 - 11:24 PM

MCSchematicTool

This is a tool (a java library) to handle schematic files, an export format of many MineCraft tools.

After reading a schematic file, it provides you with a SlizeStack object. This object represents a cuboid inside MineCraft, a three-dimensional collection of blocks.
The SlizeStack contains various Slizes representing a single horizontal plane of the SlizeStack, ordered so that the index 0,0 corresponds to the north-west corner of the slize (first index is width, second is height).
Each slize consists of various Blocks, each one representing a single block inside the world of MineCraft. All blocks that have a data value, such as the direction they're facing, have a subclass handling its special needs, for example, Redstone Torches have a direction (RedstoneTorch.getDirection()) and can be on or off (RedstoneTorch.isOn()). To ensure that everything can be written back to a schematic file, all changes to a block (such as RedstoneTorch.setOn(false)) will update its data values.

Posted Image

All those classes also have the ability to give you a graphic representation of them as a swing component, making it easy to build GUI programs. To enable this, you have to call ImageProvider.initialize(). For memory and speed reasons, images are not loaded if you don't so the tool can be used in the background just as well.
All Blocks have the function getImage() returning a BufferedImage-instance of the block and the function getComponent, returning a special swing component that displays the image and updates with changes to this block. It also has tooltips giving more informations about the block. Some blocks, like Chests, have a special tooltip that displays an image.
Slizes have the function getImages() which gives you an ImageGrid, a swing component holding the representation of the slize (a graphical grid grid containing all its blocks). SlizeStacks return an array of such slize components wrapped inside a ImageGridStack object (which handles zooming etc).

Posted Image
Posted Image

More information and download at http://klaue.net16.n... ... ool.en.php

Please post any bug you find here

@Mods: I decided to split this and Schematic2Blueprint into two threads. If you object, feel free to merge them

Register or log in to remove.

#2

geekygenius
  • Location: Turn around. See me?
  • Minecraft: geekygenius

Posted 28 October 2011 - 07:10 PM

:D Slize in an interesting name though...