daveyliam / mapwriter

MapWriter: A minimap mod for Minecraft
MIT License
89 stars 81 forks source link

initial death marker code #4

Closed chrixian closed 11 years ago

chrixian commented 11 years ago

working death marker implementation... the only thing I'd look to change in the future is to make the number of total death markers a configurable amount rather than hard coding a limit of 3.

In a different local branch I've changed Marker a bit to allow an icon rather than a color (currently all the entity heads are the only options) the equals() method on Marker and the getMarkersInGroup method in MarkerManager are cherry picked from there since they made things easier-- I don't know if you have an opinion one way or another when it comes to using Guava; you don't make use of it anywhere so my getMarkersInGroup method introduces a dependency in MarkerManager but since MW is a Forge mod Guava will be available and it's not an issue... If you have plans to un-join MW and Forge for some reason I figured I'd mention it.

daveyliam commented 11 years ago

Awesome, looks good!

I never would have thought of using the game over screen to check when the player has died.

I think I might just use a "deathMarkerAdded" flag in Mw.java to check whether a death marker has been added for each GuiGameOver screen though. Nothing against your code or Guava, it just makes more sense to me that way.

Thanks for your work!

chrixian commented 11 years ago

oh no worries man-- the getMarkersInGroup method was created for purposes unrelated to the death marker and in the context of the main branch is definitely overkill/unnecessary