why on earth are you create there a new Thread,
the most vanilla code is not thread safe thats why your BlockEntity is null
this will also throw an Exception since you mix up server and client stuff, the Minecraft class is client only so you can not use it there,
if you want to debug your code (because it looks like it) you should use a Logger
last but not least you should use the Java Naming Conventions (method names)