code: protected void setContainer(final EntityContainer container) {
  	if (!Objects.equals(this.container, container)) {
  	    this.container = container;
  	    if (!isAlive()) {
  		return;
  	    }
  	    // Fix container based tags
  	    if (container == null) {
  		removeContainerTags();
  	    } else {
  		addContainerTags();
  	    }
  	}
      }
docs: Sets the parent container for the entity.
  
  @param container
  New parent container (can be null);