gilesknap / mciwb

Minecraft Interactive world builder
Apache License 2.0
298 stars 6 forks source link

break up the Iwb class #22

Closed gilesknap closed 2 years ago

gilesknap commented 2 years ago

Maybe keep Iwb as the root class for setting things up and then have properties which are objects for various groups of functions.

e.g. we already have self.copier.

I do want to wrap up the common Client and mcwb commands so that we can provide a simpler interface. Just need to decide on the grouping.

gilesknap commented 2 years ago

Note that we need a nice way to get at all functions one import only should get it all and only need to do further imports for user code

gilesknap commented 2 years ago

Also need to think about the UI. Tab completion shows all of the imports into a module which is not a nice way to show its interface. Can I choose what is exposed to tab completion? Or do I need to carefully craft some interface classes instead?

gilesknap commented 2 years ago

As part of this consider including Volume as a type that is know - or choose to use two Vec3?

gilesknap commented 2 years ago

I'm moving toward exposing many of the underlying library functions and types.

I re-import them in mciwb/init.py , TODO: should always use

from mciwb import ... 
gilesknap commented 2 years ago

UPDATE:

Now use mciwb.imports for underlying functions also have get_client and get_world

Iwb is kept to the basics and seems good enough at present