package info.u_team.u_team_core.block;

import java.util.function.Supplier;

import com.google.common.base.Suppliers;

import info.u_team.u_team_core.api.block.EntityBlockProvider;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;

public class UEntityBlock extends UBlock implements EntityBlockProvider {
	
	protected final Supplier<? extends BlockEntityType<?>> tileEntityType;
	
	public UEntityBlock(Properties properties, Supplier<? extends BlockEntityType<?>> tileEntityType) {
		this(null, properties, tileEntityType);
	}
	
	public UEntityBlock(CreativeModeTab creativeTab, Properties properties, Supplier<? extends BlockEntityType<?>> tileEntityType) {
		this(creativeTab, properties, null, tileEntityType);
	}
	
	public UEntityBlock(Properties properties, Item.Properties blockItemProperties, Supplier<? extends BlockEntityType<?>> tileEntityType) {
		this(null, properties, blockItemProperties, tileEntityType);
	}
	
	public UEntityBlock(CreativeModeTab creativeTab, Properties properties, Item.Properties blockItemProperties, Supplier<? extends BlockEntityType<?>> tileEntityType) {
		super(creativeTab, properties, blockItemProperties);
		this.tileEntityType = Suppliers.memoize(tileEntityType::get);
	}
	
	@Override
	public BlockEntityType<?> blockEntityType(BlockPos pos, BlockState state) {
		return tileEntityType.get();
	}
	
}

@@ -643,36 +643,37 @@
 kEntityType%3C?%3E%3E 
-tile
+block
 EntityType) %7B%0A%09%09
@@ -687,36 +687,37 @@
 ll, properties, 
-tile
+block
 EntityType);%0A%09%7D%0A
@@ -822,36 +822,37 @@
 kEntityType%3C?%3E%3E 
-tile
+block
 EntityType) %7B%0A%09%09
@@ -887,20 +887,21 @@
 , null, 
-tile
+block
 EntityTy
@@ -1022,36 +1022,37 @@
 kEntityType%3C?%3E%3E 
-tile
+block
 EntityType) %7B%0A%09%09
@@ -1095,20 +1095,21 @@
 erties, 
-tile
+block
 EntityTy
@@ -1259,36 +1259,37 @@
 kEntityType%3C?%3E%3E 
-tile
+block
 EntityType) %7B%0A%09%09
@@ -1383,20 +1383,21 @@
 memoize(
-tile
+block
 EntityTy

Rename variables