Restructure packages

This commit is contained in:
Andrew Miner
2025-10-07 08:57:01 -06:00
parent 3d6f9800ec
commit 11c938467f
152 changed files with 600 additions and 495 deletions
+26
View File
@@ -0,0 +1,26 @@
from mcpacker.model.core.habitat import Habitat
# Class ############################################################################################
class Placement:
"""
Abstract base class for placing something into its various habitats.
"""
def __init__(self, habitats:tuple[Habitat]=None):
self.habitats = habitats
if not self.habitats:
self.habitats = ()
if isinstance(self.habitats, Habitat):
self.habitats = self.habitats.collect()
def __repr__(self) -> str:
return (
"Placement{" +
f"habitats: [{', '.join([repr(h) for h in self.habitats])}]" +
"}"
)