He verbally abused his sister before she locked him outside.
Williams lashed out at the screen door, knocking the mesh off and bending the metal frame.
He then went out to a sleepout and began damaging his own property.
When he was spoken to by police, Williams said that he got angry when he was called "stupid", Ms Willemsen told the court.
He pleaded guilty in the Whanganui District Court to burglary and wilful damage.
Defence lawyer Stephen Ross said there were "a number of issues in the defendant's background that are causing these issues".
Williams asked Judge David Cameron if he could address him in court, and Judge Cameron said he did not know what the content of Williams' message would be.
"The content is thank you," Williams said, before turning to leave.
Judge Cameron remanded the matter to August 1 for sentence.