<commit_before>package xyz.brassgoggledcoders.boilerplate.blocks;

import javax.annotation.Nonnull;

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;

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

	@Override
	public void breakBlock(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state) {
		super.breakBlock(worldIn, pos, state);
		worldIn.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);
	}
}<commit_msg>Fixed not having the right method bubble through to extending classes<commit_after>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 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);
	}

	@Override
	@Nonnull
	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);
}
{'fraction_non_alphanumeric': 0.09388560157790928, 'fraction_numerical': 0.0, 'mean_word_length': 6.393586005830904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3404633', 'n_tokens_mistral': 767, 'n_tokens_neox': 754, 'n_words': 187}