package xyz.brassgoggledcoders.boilerplate.blocks;

import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import javax.annotation.Nonnull;

public abstract class BlockTEBase<T extends TileEntity> extends BlockBase implements IHasTileEntity, ITileEntityProvider {
	public BlockTEBase(Material material, String name) {
		super(material, name);
		this.isBlockContainer = true;
	}

	@Override
	public void breakBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state) {
		super.breakBlock(world, pos, state);
		world.removeTileEntity(pos);
	}

	@SuppressWarnings("deprecation")
	@Override
	public boolean eventReceived(IBlockState state, World world, BlockPos pos, int id, int param) {
		super.eventReceived(state, world, pos, id, param);
		TileEntity tileentity = world.getTileEntity(pos);
		return tileentity != null && tileentity.receiveClientEvent(id, param);
	}

	@SuppressWarnings("unchecked")
	public T getTileEntity(World world, BlockPos pos) {
		TileEntity tileEntity = world.getTileEntity(pos);
		if(tileEntity != null && tileEntity.getClass() == this.getTileEntityClass()) {
			return (T)tileEntity;
		}
		return null;
	}

	@Override
	@Nonnull
	@SuppressWarnings("deprecation")
	public TileEntity createNewTileEntity(@Nonnull World world, int meta) {
		return createTileEntity(world, getStateFromMeta(meta));
	}

	@Override
	@Nonnull
	public abstract TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState blockState);
}

@@ -45,16 +45,50 @@
 locks;%0A%0A
+import javax.annotation.Nonnull;%0A%0A
 import n
@@ -335,47 +335,54 @@
 rld.
-World;%0A%0Aimport javax.annotation.Nonnull
+IBlockAccess;%0Aimport net.minecraft.world.World
 ;%0A%0Ap
@@ -453,17 +453,19 @@
 lockBase
- 
+%0A%09%09
 implemen
@@ -1184,21 +1184,28 @@
 eEntity(
-World
+IBlockAccess
  world, 
@@ -1366,16 +1366,17 @@
 turn (T)
+ 
 tileEnti

Change World to IBlockAccess in getTileEntity