schrum2 / EvoCraft-SCOPE

0 stars 0 forks source link

Make number placement depend on lower corner of generated shape #28

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

After @richeyme completes #26 , modify minecraft_structures.place_number to take x/y/z coordinates of the lower corner of the shape they are generated on top of. Also, add the yrange as a parameter so you know how high to make the number.

In order to get access to the corner information, you'll need to move the calls to place_number into the eval_fitness method, so they will redraw every time.

The idea is to move as much complicated math as possible inside of the functions themselves so that any function associated with placing something relative to a generated shape can just use the corner location as a parameter to base the placement of everything else off of.

richeyme commented 2 years ago

After moving the method call and then using corner as part of the parameter, all the numbers spawn in fine except for the number 9, which looks like it first spawns an 8 underneath it before it gets replaced by air blocks. It looks like this: 2022-05-20_16 20 37

schrum2 commented 2 years ago

Fixed this