Gravity
Simple plugin that applies gravity to blocks when they are placed or update. A example of a block update could be a Leaf decaying, an explosion or when you place or break an adjacent block. Use the Whitelist or blacklist to control what blocks are affected and choose how much clearance is required before gravity is applied.
Features:
- Apply gravity to blocks when they update or just when they are placed.
- Blacklist a block type or list of block types to avoid gravity.
- Whitelist a block type or list of block types to ONLY apply gravity to.
- Control who gravity applies to with permissions. (When "only-on-place" = true)
- Choose how much clearance is required before a block can fall.
- Choose which Worlds gravity will be applied to.
Commands:
- None
Permissions:
- gravity.apply - (Only required when config option "only-on-place" is set to true. v0.6+)
Configurations:
- drop-item: true/false - Allow items to drop if a block falls to an invalid location. For example onto a torch.
- clearance: 1 to 256 - The number of air blocks below the block before gravity is applied. v0.6+
- only-on-place: true/false - If true gravity will only apply to the block that was placed. v0.6+
- blacklist: true/false - Enable this to list block types you DO NOT want gravity to apply.
- blacklist-blocks: If blacklist is set to true the Material names in this list will avoid gravity.
- whitelist: true/false - Enable this to list block types you want gravity to apply.
- whitelist-blocks: If whitelist is set to true only the Material names on this list will have gravity.
- enabled-worlds: A list of World names that you want gravity to apply.
Default config.yml
drop-item: true only-on-place: false clearance: 1 blacklist: false blacklist-blocks: - STONE - NETHERRACK - NETHER_BRICK - ENDER_STONE - LEAVES - LEAVES_2 - BEDROCK - JUKEBOX - CAULDRON - ENDER_PORTAL (IMPORTANT) - ENDER_PORTAL_FRAME (IMPORTANT) whitelist: true whitelist-blocks: - LOG - GOLD_BLOCK enabled-worlds: - world - world_nether - world_the_end
Disabled blocks:
- Blocks which already have gravity like sand gravel and Dragon Eggs.
- Any Block with a stored inventory like a Chest, Furnace or Brewing Stand.
- Blocks with stored data like a Sign.
Compatibility:
Minecraft Versions 1.3.* to 1.7.* and possibly future Versions.
TODO:
Add permissions.v0.2
Add a config blacklist to list the blocks NOT to apply gravity to.v0.4
Add a config whitelist to list the blocks to apply gravity to.v0.5
Add a config option to allow items to not drop if they land on a transparent block.v0.3
Apply gravity to all blocks, not just the block placed.v0.6
Apply gravity to only Worlds listed in config option "enabled-worlds".v0.7
Remove the use of block ID's and instead use theMaterial names.v0.6
- Limit the number of blocks falling at once, to prevent possible client or server crashes due to common blocks.
Notes:
- For logging plugins such as LogBlock, the event is not cancelled but will be recorded as if the player placed an air block.
WARNING! Applying gravity to common blocks can cause client lag or World corruption. For example Bedrock or Stone could cause the world to collapse causing a huge number of block updates. Some blocks can cause unexpected behavior, for example ENDER_PORTAL and ENDER_PORTAL_FRAME blocks can cause server crashes so please exclude this block.
Bold text = New feature or change
Video Showcase:
A horizontal limit would be heaven on err...minecraft
I second OwenClaxton's comments. I think having a horizontal limit would be great. Making bracing, arches and proper building techniques more useful.
@OwenClaxton
Hey, thanks for the feedback. Currently the plugin uses the block update event which is run very often and for that reason it could be difficult to implement. Have you tried changing the "clearance" option in the config file? Set this to a higher number like "4" gravity will only be applied once this clearance distance is met.
A possible idea could be a configuration option similar to "clearance" that measures the horizontal distance. I will look into what can be done without causing timing issues on the block update event.
Really like the suggestion for break off point in this video https://www.youtube.com/watch?v=NPIrZ-MSK-g&list=UUk8jBy_Lt0VnuSPZ4M-nTng Would be amazing if that was implemented, and the drop thing configurable per-block, so a log could stick out 5, but stone 10.
Would be even better if this number increased/decreased for the thickness of the "branch" in in relation to the thickness of the pillar it is connected to, again this being configurable.
In terms of in building when this number is passed, would be awesome if the shear-off point from overload is configurable to a few options: either only blocks surpassing the amount fall, the whole branch falls, OR a random amount of blocks along the pillar fall off - to go even further on that one, as the load increases there could become a higher change each block falls depending on a weight set in yet another configuration file, so say a branch is made of stonebrick and cobble, the stonebrick has a higher weight so the longer the branch and the thicker the branch, the more chance it could fall. just a few ideas
@TheGeekyDead
Hey, all blocks with inventory have been disabled to prevent corruption and loss. Please refer to the disabled blocks section of the description above for more information. The plugin still needs work, I plan to add a protection method to limit the number of blocks that gravity can apply to at once. This will prevent the chance of world corruption or lag due to too many blocks falling at once.
Hey i love your plugin but i am having an issue, i cannot seem to affect gravity on the [Furnace, chest, Jukebox, Music Note, & Redstone Lamp]?
I believe i have it formatted correctly, take a look. - FURNACE - CHEST - REDSTONE_LAMP JUKEBOX - NOTE_BLOCK
@warezme
That shouldn't be hard to implement, check out the next version.
Hi guys,
Thanks for this awesome plugin ! Just a question : Can we use-it for one particular world (Multiverse compatibility) and let disable for others ?
@t2wave
Thanks for the suggestions, I will consider this feature when I next work on the project.
@DiamondPuma
Hey, thanks for reviewing my plugin and providing feedback/suggestions. As you mentioned the plugin only has potential for mini-games and in fact the plugin was made for our Dwarves vs Zombies mini game. Many of the configuration options where added for the public release and I will have to work on the whitelist/blacklist logic. Thanks for the "Build out limit" suggestion, I will run some tests to see if I can create this feature without causing lag, some of the events I am using get run often and I do not want to cause timing issues for servers. v0.6 includes the "clearance" option, try setting this to 3 or more so roofs can be made and only leaves or caves with collapse if this clearance check passes.
This looks awesome. You know what would be a good addition? If the gravity effect could have a chance attached to it. A percent value dictating the likelihood of the block falling when there is an update. That could prevent cascading block updates from collapsing the world.
This plugin is something I would like to use on a project but since I can't feasibly add stone to the list. As it stands it is only partially helpful to me.
Hey LihPeu,
Just made a video yesterday for your plugin. If you are interested in using it as a tutorial/review on this Dev. page, feel free and it would also be really appreciated. Enjoy!
Also, as the plugin updates I will be keeping track and updating the videos as needed when new changes come out.
https://www.youtube.com/watch?v=NPIrZ-MSK-g&list=UUk8jBy_Lt0VnuSPZ4M-nTng
@AcePlugins
Please elaborate, Server or Client lag? If you think its Server lag check your "/tps" and run a "/timings merged" report after 5 - 10 minutes.
Expect a new version soon, with options to apply gravity on more events than just the place block event, and a re-write of the block-id lists, to be more strict.
@m9731526
Hey,
Thanks for the comment and suggestion, check out the new version which now includes a whitelist feature.
It seems that this is the last gravity plugin, I'm trying it.
Oh, can you make a whitelist config line ? I just want few blocks to fall and if use the blacklist I have to add over 1000 IDs on my MCPC.
Cool plugin
@LihPeu
Awesome! :D Great plugins!
@KillerAnt9000
The new version has a blacklist to prevent gravity on a list of block types.