EvanatorM / ScuffedMinecraft

A Minecraft Clone in C++
MIT License
140 stars 23 forks source link

dirt under water level and denesting #8

Closed CodedCells closed 3 weeks ago

CodedCells commented 1 month ago

3 changes

firstly check if we are placing the block below water level to avoid grass blocks underwater, should be dirt.

since absolute y value is checked a lot, makes it less prone to errors if you give it a variable so you don't have order of operation issues.

and then removing some indenting, guard clauses to end early rather than nesting else cases.

hope this works I don't even do c++ spinning-fish

CodedCells commented 1 month ago

also slight optimisation, left in cave boolean since that'll be useful later or would be easy to remove, enjoying the vids, excited to see more

CodedCells commented 1 month ago

learned some c++

head-to-desk-boom

CodedCells commented 1 month ago

image looks pretty cool, set to 32 render dist, not sure if it is actually loading that much tho

CodedCells commented 1 month ago

let it run for a bit image