Cadiboo / Example-Mod

An example mod created to try and get new modders to use good code practices
GNU Lesser General Public License v3.0
196 stars 41 forks source link

Remove method and use EntityEntryBuilder directly #5

Closed Cadiboo closed 5 years ago

Cadiboo commented 5 years ago

https://github.com/Cadiboo/Example-Mod/blob/6a1ba1042d63b80fb6e6676a0d04018e0bc1f3ae/src/main/java/cadiboo/examplemod/EventSubscriber.java#L92-L104

JamesYeoman commented 5 years ago

One minor change you should probably do as well: remove the assignments from each stage of the builder. The point of the instance returns of a builder is so that you can chain-call. And besides, if you're not chain-calling, you still don't need to re-assign builder

Cadiboo commented 5 years ago

One minor change you should probably do as well: remove the assignments from each stage of the builder. The point of the instance returns of a builder is so that you can chain-call. And besides, if you're not chain-calling, you still don't need to re-assign builder

I wrote this code while struggling with the auto formatter putting everything on 1 line, this was meant to be a temporary fix but I never actually fixed it