FallingSand API
This API allows developers to simply convert all blocks in a cuboid of any size into falling sand entities, allowing any blocks in said cuboid to appear to fall out of the sky. It can also be added to a server and used via command blocks to eliminate the need for custom coding.
The falling sand entities will act as they normally would, however, they don't drop any item entities if they get destroyed.
Commands:
There are three basic commands for the functionality of the plugin: /sand <pos1/pos2>, /sand <pos1/pos2> [x] [y] [z] and /sand start [time].
The first command creates a cuboid with the corners at the foot position of the player that activated them.
The second command can be used with command blocks to create the cuboid between any two coordinates.
On the usage of the start command, the selected cuboid will be converted into falling sand entities. If you include a number with the start command, that determines the time the plugin waits between creating each entity (in milliseconds), effectively controlling the speed of the falling. 5 milliseconds is the recommended speed to create realistic looking falling.
Permissions:
To use these commands, the player will need the permission: sand.sand
Developers:
To use this API, all you need to do is add the jar as an external jar to your project.
There are four methods in the SandAPI class that you can use. The first two take two Location objects and a World object. The second two take two sets of coordinates instead of Location objects. One method will default to waiting 10 milliseconds between creating each new falling sand entity. The other method takes an Integer that defines how long the plugin should wait in milliseconds before creating each new falling sand entity.
@xDGaming
Sorry, but I'd rather not do that. It's not incredibly hard to do yourself, it only took me a day or so.
Can i use your source code and implement it into my own API?
@DarkOctoberBR
Different falling patterns is in the todo list. That should be in the next major update.
You could make falling blocks go down in a random sequence and circles, that would be great for making events and more! Please make sure to add the commands as it follows: /sand start <ms> (Default) /sand start random <ms> /sand start circle <ms>
Thank you.
@Typical_Name
The entities would fall through, but if @JamEngulfer221 could find a way for it, here's some reference: The block ID is 36.
@jonny11011
No problem! I've got that implemented and in the upcoming release. It should be approved in a day or two.
This is a very useful plugin but i have found my self in need of a way to set the positions by command by using cords Please can you add support for /sand pos1 10 40 70
@jonny11011
I believe there's a block that looks like air and can be walked through like air, but will support blocks (ie, blocking the flow of water). It can't be placed manually by the player, but you can worldedit it in.
This might be able to hold the falling blocks up, although I'm not sure (it's possible that falling blocks, as entities, would go through the block).
@jonny11011
I don't think this would be possible, sorry. I'll have a look, but no guarantees.
@JamEngulfer221 What do you mean by 'floating blocks'? Do you mean that they remain relative to the block under them when they fall?
Say you build a 1 story house with a flat roof. As the sand falls, the walls will fall on top of one another The roof. Because when its built it has air spaces under the roof will collapse in on its self.
Eg: Would it be possible to add a way for a block when it fall to keep its height
@jonny11011
Due to unavoidable limitations with Minecraft's sand entities, I can only convert 'solid' blocks. If I don't do this, then it can crash the client.
What do you mean by 'floating blocks'? Do you mean that they remain relative to the block under them when they fall?
Will this work for ANY minecraft block Eg Redstone, ItemFrames, Flowers ? also i understand the mechanics of sand. But would it be possible to add support for floating blocks, Eg Roofs