Git Product home page Git Product logo

haskell-minecraft-tool's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nh2

haskell-minecraft-tool's Issues

Enable transparency support

The alpha channel of PNG files should be heeded; transparent pixels (with alpha value = 0) should simply be omitted and the cell in its place should be set to Air.

Colour quantisation

We're looking for something to the tune of

quantize :: Color -> WoolColour 

Ensure that given any colour, we can efficiently map it onto the nearest Wool colour.

Further, we want a function that would convert a PNG image into an array of wool colours.

quantizeImage :: FilePath -> IO (Array BlockCoords WoolColour)

Add testing support

Currently, exitcode-stdio style is used to do tests. Only a single test exists, which tests
whether or not the loadRegion and saveRegion functions (decode . encode) round trip preserves identity.

Testing should be a little more flexible for the future, looking towards using SmallCheck to check all small regions for this property.

The neat thing about Binary is that tests can be done with ByteStrings and the Get and Put monads without the need for IO. Sweet.

The downside is that the test data lives in the project repository.

Store compressed ByteString in Chunk rather than NBT

If the application loads and saves a region file, currently, the loading process will ensure that all chunks are read fully (are forced), and the NBT data will be decompressed. However, since the use case for this program is just to modify a small number of chunks across different region files, the forcing of decompression of chunks is not desirable.

Consider declaring

Chunk = Chunk { chunkCompressedNbt :: ByteString, chunkTimestamp :: Timestamp }

and require the programmer to decompress the NBT before getting to the contents!

Replace one single block in Minecraft world with block of choice

This issue covers the writing of the application that changes a region rather than just a test.

oneBlock :: <<parameters>> -> NBT -> NBT

... that would put a white wool block on top of the player's head in the chunk he's standing in.

Problems

I've been running the test but it doesn't seem to modify the world in the way that I would like. The wool block does not appear.

To debug this, write a test that would execute the region modification function (putting wool block on player head) on a standard region does actually modify the Region (the wool block is observable).
If this is the case, then we can be almost certain that Minecraft will see this change, thanks to decEnc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.