fatuhoku / haskell-minecraft-tool Goto Github PK
View Code? Open in Web Editor NEWHaskell tools to manipulate Minecraft worlds to test application of software development practises in Haskell eco-system.
License: Other
Haskell tools to manipulate Minecraft worlds to test application of software development practises in Haskell eco-system.
License: Other
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.
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)
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.
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!
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.
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
.
Complete Region serialization!
Make it so that Regions
can be serialised to ByteStrings. This should be done by using the Put
Monad.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.