Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Add sponge block #531

Closed
wants to merge 6 commits into from
Closed

Add sponge block #531

wants to merge 6 commits into from

Conversation

socram8888
Copy link
Contributor

This PR adds a general-purpose taxicab block iterator and employs it to add the block behaviour of sponges in 1.8.

Sponge working

@socram8888
Copy link
Contributor Author

How did I manage to compile an Iterator without the remove method is beyond my own comprehension.

@Tonodus
Copy link
Contributor

Tonodus commented Nov 9, 2014

@socram8888 it's by default empty. (Java 8 default methods for interfaces)

@turt2live
Copy link
Contributor

Incorrect drops for wet sponge. Also the naming of the iterator is kinda funny and doesn't seem to really apply to the definition of a taxicab number. I'm not sure on what else to call it though

@socram8888
Copy link
Contributor Author

I called it TaxicabBlockIterator because in MinecraftWiki, it says that "A sponge absorbs water around itself (water source blocks or flowing water) out to a taxicab distance of 7 in all directions". I'm open to suggestions, though.

@socram8888
Copy link
Contributor Author

Drops have been fixed.

@dequis
Copy link
Contributor

dequis commented Nov 10, 2014

This fixes #498

sorry i couldn't resist

@turt2live
Copy link
Contributor

This PR fails on edge cases. It also doesn't soak up the correct number of blocks.

Edge case:
edge

@socram8888
Copy link
Contributor Author

That's how it's supposed to work, it will only scan if at least one face has water. That's why the wiki also says "taxicab", because it won't work for diagonals.

@socram8888
Copy link
Contributor Author

This last PR not only improves performance but also it now absorbs the correct amount of water blocks.

@SpaceManiac
Copy link
Member

Merged in 6e86a71.

puigru pushed a commit to puigru/Glowstone-Legacy that referenced this pull request Aug 30, 2017
* Add the /playsound command

* Add a factory for the SoundCategory enum

* Simplify the unit tests for commands: setidletimeout, setworldspawnpoint, spawnpoint and toggleDownfall
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants