package me.deftware.client.framework.entity.block;

import me.deftware.client.framework.entity.Entity;
import me.deftware.client.framework.math.position.BlockPosition;
import me.deftware.client.framework.math.position.TileBlockPosition;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.EnderChestBlockEntity;
import net.minecraft.block.entity.LootableContainerBlockEntity;

/**
 * @author Deftware
 */
public class TileEntity {

	protected final BlockEntity entity;
	protected final BlockPosition position;

	@SuppressWarnings("DuplicateCondition")
	public static TileEntity newInstance(BlockEntity entity) {
		if (entity instanceof LootableContainerBlockEntity || entity instanceof EnderChestBlockEntity) {
			return StorageEntity.newInstance(entity);
		}
		return new TileEntity(entity);
	}

	protected TileEntity(BlockEntity entity) {
		this.entity = entity;
		this.position = new TileBlockPosition(entity);
	}
	
	

	public BlockPosition getBlockPosition() {
		return position;
	}

	public float distanceTo(Entity entity) {
		return position.distanceTo(entity.getBlockPosition());
	}

}

@@ -942,16 +942,166 @@
 ;%0A%09%7D%0A%09%0A%09
+public String getClassName() %7B%0A%09%09return this.getClass().getSimpleName().substring(0, this.getClass().getSimpleName().length() - %22Entity%22.length());%0A%09%7D
 %0A%0A%09publi

Add tileentity class name