entity¶
Entity alias module. Imports the base-class Entity, as well as
all the prototypes in draftsman.prototypes.
- new_entity(name: str, **kwargs) Entity¶
Factory function for creating a new
Entity. The class used will be based on the entity’s name, sonew_entity("wooden-chest")will return aContainerinstance. Useful if you know the name of the Entity you want to make, but don’t know what type it is.Any additional keyword arguments are passed to the entity’s constructor, allowing you to specify the entity’s position, ID, or any other relevant information during construction.
Raises
DraftsmanWarningif any keyword passed in is not recognized by that Entity’s class constructor.