<commit_before>package convenientadditions.block;

import java.util.List;
import java.util.Random;

import conveniencecore.item.resourceprovider.IModelResourceLocationProvider;
import conveniencecore.util.Helper;
import convenientadditions.ConvenientAdditions;
import convenientadditions.Reference;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class BlockPhantomPlatform extends Block implements IModelResourceLocationProvider {
    public static final PropertyBool DESPAWN = PropertyBool.create("despawn");

	public BlockPhantomPlatform() {
		super(Material.FIRE);
		this.setUnlocalizedName(ConvenientAdditions.MODID+":"+Reference.phantomPlatformBlockName);
        this.disableStats();
        this.translucent = true;
        this.setDefaultState(this.blockState.getBaseState().withProperty(DESPAWN,false));
	}

    @SideOnly(Side.CLIENT)
    public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
    {
    	if(Helper.getClientPlayer().getHeldItemOffhand()!=null)
    		if(Helper.getClientPlayer().getHeldItemOffhand().getItem()==ItemBlock.getItemFromBlock(state.getBlock()))
    			world.spawnParticle(EnumParticleTypes.END_ROD, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, 0, 0, 0);
    }

	@Override
    public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB p_185477_4_, List<AxisAlignedBB> p_185477_5_, Entity ent)
    {
		if(ent instanceof EntityPlayer && ent.posY>=(pos.getY()+1) && !((EntityPlayer)ent).isSneaking())
        	addCollisionBoxToList(pos, p_185477_4_, p_185477_5_, state.getSelectedBoundingBox(worldIn, pos));
    }<commit_msg>Fixed 1.10 Phantom Platform collision<commit_after>package convenientadditions.block;

import java.util.List;
import java.util.Random;

import conveniencecore.item.resourceprovider.IModelResourceLocationProvider;
import conveniencecore.util.Helper;
import convenientadditions.ConvenientAdditions;
import convenientadditions.Reference;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCarpet;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class BlockPhantomPlatform extends Block implements IModelResourceLocationProvider {
    public static final PropertyBool DESPAWN = PropertyBool.create("despawn");

	public BlockPhantomPlatform() {
		super(Material.FIRE);
		this.setUnlocalizedName(ConvenientAdditions.MODID+":"+Reference.phantomPlatformBlockName);
        this.disableStats();
        this.translucent = true;
        this.setDefaultState(this.blockState.getBaseState().withProperty(DESPAWN,false));
	}

    @SideOnly(Side.CLIENT)
    public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
    {
    	if(Helper.getClientPlayer().getHeldItemOffhand()!=null)
    		if(Helper.getClientPlayer().getHeldItemOffhand().getItem()==ItemBlock.getItemFromBlock(state.getBlock()))
    			world.spawnParticle(EnumParticleTypes.END_ROD, pos.getX()+.5, pos.getY()+.5, pos.getZ()+.5, 0, 0, 0);
    }

	@Override
    public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity ent)
    {
		if(ent instanceof EntityPlayer && ent.posY>=(pos.getY()+1) && !((EntityPlayer)ent).isSneaking())
        	addCollisionBoxToList(pos, entityBox, collidingBoxes, FULL_BLOCK_AABB);
    }
{'fraction_non_alphanumeric': 0.108856478545762, 'fraction_numerical': 0.009511731135066582, 'mean_word_length': 6.158850226928895, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 7, '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': '1115601', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1465, 'n_words': 233}