Search in sources :

Example 71 with AxisAlignedBB

use of net.minecraft.util.math.AxisAlignedBB in project Charset by CharsetMC.

the class CapabilityHelper method get.

@SuppressWarnings("unchecked")
public static <T> T get(IBlockAccess world, BlockPos pos, Capability<T> capability, EnumFacing facing, boolean blocks, boolean tiles, boolean entities) {
    IBlockState state = world.getBlockState(pos);
    if (tiles && state.getBlock().hasTileEntity(state)) {
        TileEntity tile = world.getTileEntity(pos);
        T result = get(capability, tile, facing);
        if (result != null)
            return result;
    }
    if (blocks) {
        IBlockCapabilityProvider provider = blockProviders.get(state.getBlock(), capability);
        if (provider != null) {
            T result = (T) provider.create(world, pos, state, facing);
            if (result != null) {
                return result;
            }
        }
    }
    if (world instanceof World) {
        if (entities && !world.isSideSolid(pos, facing, false)) {
            List<Entity> entityList = ((World) world).getEntitiesWithinAABBExcludingEntity(null, new AxisAlignedBB(pos));
            for (Entity entity : entityList) {
                T result = get(capability, entity, facing);
                if (result != null)
                    return result;
            }
        }
    }
    return null;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) Entity(net.minecraft.entity.Entity) TileEntity(net.minecraft.tileentity.TileEntity) IBlockState(net.minecraft.block.state.IBlockState) IBlockCapabilityProvider(pl.asie.charset.api.lib.IBlockCapabilityProvider) World(net.minecraft.world.World)

Example 72 with AxisAlignedBB

use of net.minecraft.util.math.AxisAlignedBB in project Charset by CharsetMC.

the class TileTank method getRenderBoundingBox.

@Override
public net.minecraft.util.math.AxisAlignedBB getRenderBoundingBox() {
    TileTank bottomTank = getBottomTank();
    if (bottomTank != this) {
        return new AxisAlignedBB(getPos());
    } else {
        BlockPos bottomPos = getBottomTank().getPos();
        int height = getCapacity() / TileTank.CAPACITY;
        return new AxisAlignedBB(bottomPos.getX(), bottomPos.getY(), bottomPos.getZ(), bottomPos.getX() + 1, bottomPos.getY() + height + 1, bottomPos.getZ() + 1);
    }
}
Also used : AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) BlockPos(net.minecraft.util.math.BlockPos)

Example 73 with AxisAlignedBB

use of net.minecraft.util.math.AxisAlignedBB in project Charset by CharsetMC.

the class RenderUtils method drawSelectionBoundingBox.

public static void drawSelectionBoundingBox(AxisAlignedBB box, int lineMask) {
    EntityPlayer player = Minecraft.getMinecraft().player;
    float partialTicks = Minecraft.getMinecraft().getRenderPartialTicks();
    Vec3d cameraPos = EntityUtils.interpolate(player, partialTicks);
    AxisAlignedBB boundingBox = box.grow(0.002).offset(cameraPos.scale(-1));
    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GlStateManager.color(0.0F, 0.0F, 0.0F, 0.4F);
    GL11.glLineWidth(2.0F);
    GlStateManager.disableTexture2D();
    GlStateManager.depthMask(false);
    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder worldrenderer = tessellator.getBuffer();
    worldrenderer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION);
    if ((lineMask & /* getSelectionMask(0, 0, 0) */
    0x001) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.minY, boundingBox.minZ, boundingBox.maxX, boundingBox.minY, boundingBox.minZ);
    }
    if ((lineMask & /* getSelectionMask(0, 0, 1) */
    0x002) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.minY, boundingBox.maxZ, boundingBox.maxX, boundingBox.minY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(0, 1, 0) */
    0x004) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.minY, boundingBox.minZ, boundingBox.minX, boundingBox.minY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(0, 1, 1) */
    0x008) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.maxX, boundingBox.minY, boundingBox.minZ, boundingBox.maxX, boundingBox.minY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(1, 0, 0) */
    0x010) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.minY, boundingBox.minZ, boundingBox.minX, boundingBox.maxY, boundingBox.minZ);
    }
    if ((lineMask & /* getSelectionMask(1, 0, 1) */
    0x020) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.minY, boundingBox.maxZ, boundingBox.minX, boundingBox.maxY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(1, 1, 0) */
    0x040) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.maxX, boundingBox.minY, boundingBox.minZ, boundingBox.maxX, boundingBox.maxY, boundingBox.minZ);
    }
    if ((lineMask & /* getSelectionMask(1, 1, 1) */
    0x080) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.maxX, boundingBox.minY, boundingBox.maxZ, boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(2, 0, 0) */
    0x100) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.maxY, boundingBox.minZ, boundingBox.maxX, boundingBox.maxY, boundingBox.minZ);
    }
    if ((lineMask & /* getSelectionMask(2, 0, 1) */
    0x200) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.maxY, boundingBox.maxZ, boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(2, 1, 0) */
    0x400) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.minX, boundingBox.maxY, boundingBox.minZ, boundingBox.minX, boundingBox.maxY, boundingBox.maxZ);
    }
    if ((lineMask & /* getSelectionMask(2, 1, 1) */
    0x800) != 0) {
        drawLine(worldrenderer, tessellator, boundingBox.maxX, boundingBox.maxY, boundingBox.minZ, boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ);
    }
    tessellator.draw();
    GlStateManager.depthMask(true);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
Also used : AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) Tessellator(net.minecraft.client.renderer.Tessellator) BufferBuilder(net.minecraft.client.renderer.BufferBuilder) EntityPlayer(net.minecraft.entity.player.EntityPlayer) Vec3d(net.minecraft.util.math.Vec3d)

Example 74 with AxisAlignedBB

use of net.minecraft.util.math.AxisAlignedBB in project Charset by CharsetMC.

the class NotifyProxyClient method renderMessage.

private void renderMessage(ClientMessage m, float partial, float opacity, Vec3d c) {
    int width = 0;
    String[] lines = m.msgRendered.split("\n");
    FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder worldrenderer = tessellator.getBuffer();
    for (String line : lines) {
        width = Math.max(width, fr.getStringWidth(line));
    }
    width += 2;
    int halfWidth = width / 2;
    float scaling = 1.6F / 60F;
    scaling *= 2F / 3F;
    GlStateManager.pushMatrix();
    int lineCount = lines.length;
    float centeringOffset = 0;
    if (m.show_item) {
        if (lineCount == 1) {
            centeringOffset = 5F;
        }
        lineCount = Math.max(2, lineCount);
    }
    Vec3d vec = m.getPosition(partial);
    float x = (float) vec.x;
    float y = (float) vec.y;
    float z = (float) vec.z;
    if (m.style.contains(NoticeStyle.SCALE_SIZE)) {
        double dx = x - c.x;
        double dy = y - c.y;
        double dz = z - c.z;
        double dist = Math.sqrt(dx * dx + dy * dy + dz * dz);
        scaling *= Math.sqrt(dist);
    }
    NotificationCoord co = m.asCoord();
    if (co != null && !m.position_important) {
        BlockPos pos = co.getPos();
        IBlockState bs = co.getWorld().getBlockState(pos);
        AxisAlignedBB bb = bs.getCollisionBoundingBox(co.getWorld(), pos);
        if (bb != null) {
            y = (float) Math.max(y, pos.getY() + bb.maxY);
        } else {
            y = (float) Math.max(y, pos.getY() + 0.5f);
        }
    }
    GlStateManager.translate(x + 0.5F, y, z + 0.5F);
    Minecraft mc = Minecraft.getMinecraft();
    float pvx = mc.getRenderManager().playerViewX;
    float pvy = -mc.getRenderManager().playerViewY;
    if (mc.gameSettings.thirdPersonView == 2) {
        pvx = -pvx;
    }
    GlStateManager.rotate(pvy, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(pvx, 1.0F, 0.0F, 0.0F);
    GlStateManager.scale(-scaling, -scaling, scaling);
    GlStateManager.translate(0, -10 * lineCount, 0);
    {
        int lineHeight = (lineCount - 1) * 10;
        double item_add = 0;
        if (m.show_item) {
            item_add += 24;
        }
        float col = 0.0F;
        GlStateManager.disableTexture2D();
        GlStateManager.color(col, col, col, Math.min(opacity, 0.2F));
        double Z = 0.001D;
        // TODO: Use 2 tessellator + 2 draw calls to do all notice rendering
        worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
        worldrenderer.pos(-halfWidth - 1, -1, Z).endVertex();
        worldrenderer.pos(-halfWidth - 1, 8 + lineHeight, Z).endVertex();
        worldrenderer.pos(halfWidth + 1 + item_add, 8 + lineHeight, Z).endVertex();
        worldrenderer.pos(halfWidth + 1 + item_add, -1, Z).endVertex();
        tessellator.draw();
        GlStateManager.enableTexture2D();
    }
    {
        int i = 0;
        int B = (int) (0xFF * Math.min(1, 0.5F + opacity));
        int color = (B << 16) + (B << 8) + B + ((int) (0xFF * opacity) << 24);
        GlStateManager.translate(0, centeringOffset, 0);
        for (String line : lines) {
            fr.drawString(line, -fr.getStringWidth(line) / 2, 10 * i, color);
            i++;
        }
    }
    {
        if (m.show_item) {
            // TODO: Add transparency support
            GlStateManager.translate(0, -centeringOffset, 0);
            GlStateManager.translate((float) (halfWidth + 4), -lineCount / 2, 0);
            // Undoes the effects of setupGuiTransform
            renderItem.zLevel -= 100;
            renderItem.renderItemIntoGUI(m.item, 0, 0);
            renderItem.zLevel += 100;
        }
    }
    GlStateManager.popMatrix();
}
Also used : AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) Tessellator(net.minecraft.client.renderer.Tessellator) IBlockState(net.minecraft.block.state.IBlockState) BufferBuilder(net.minecraft.client.renderer.BufferBuilder) Minecraft(net.minecraft.client.Minecraft) Vec3d(net.minecraft.util.math.Vec3d) BlockPos(net.minecraft.util.math.BlockPos) FontRenderer(net.minecraft.client.gui.FontRenderer)

Example 75 with AxisAlignedBB

use of net.minecraft.util.math.AxisAlignedBB in project Wizardry by TeamWizardry.

the class PotionPhase method entityMove.

@SubscribeEvent
public void entityMove(EntityMoveEvent event) {
    if (!(event.entity instanceof EntityLivingBase))
        return;
    EntityLivingBase base = (EntityLivingBase) event.entity;
    if (!base.isPotionActive(ModPotions.PHASE))
        return;
    event.override = true;
    // event.entity.noClip = true;
    event.entity.fallDistance = 0;
    event.entity.isAirBorne = true;
    Entity entity = event.entity;
    double x = event.x;
    double y = event.y;
    double z = event.z;
    MoverType type = event.type;
    entity.world.profiler.startSection("move");
    double d10 = entity.posX;
    double d11 = entity.posY;
    double d1 = entity.posZ;
    double d2 = x;
    double d3 = y;
    double d4 = z;
    if ((type == MoverType.SELF || type == MoverType.PLAYER) && entity.onGround && entity.isSneaking() && entity instanceof EntityPlayer) {
        for (; x != 0.0D && entity.world.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(x, (double) (-entity.stepHeight), 0.0D)).isEmpty(); d2 = x) {
            if (x >= 0.05D || x < -0.05D) {
                if (x > 0.0D) {
                    x -= 0.05D;
                } else {
                    x += 0.05D;
                }
            }
        }
        for (; z != 0.0D && entity.world.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(0.0D, (double) (-entity.stepHeight), z)).isEmpty(); d4 = z) {
            if (z >= 0.05D || z < -0.05D) {
                if (z > 0.0D) {
                    z -= 0.05D;
                } else {
                    z += 0.05D;
                }
            }
        }
        for (; x != 0.0D && z != 0.0D && entity.world.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(x, (double) (-entity.stepHeight), z)).isEmpty(); d4 = z) {
            if (x >= 0.05D || x < -0.05D) {
                if (x > 0.0D) {
                    x -= 0.05D;
                } else {
                    x += 0.05D;
                }
            }
            d2 = x;
            if (z >= 0.05D || z < -0.05D) {
                if (z > 0.0D) {
                    z -= 0.05D;
                } else {
                    z += 0.05D;
                }
            }
        }
    }
    List<AxisAlignedBB> list1 = entity.world.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(x, y, z));
    AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox();
    if (y != 0.0D) {
        int k = 0;
        for (int l = list1.size(); k < l; ++k) {
            double offsetY = list1.get(k).calculateYOffset(entity.getEntityBoundingBox(), y);
            if (offsetY <= 0)
                y = offsetY;
        }
        entity.setEntityBoundingBox(entity.getEntityBoundingBox().offset(0.0D, y, 0.0D));
    }
    if (x != 0.0D)
        entity.setEntityBoundingBox(entity.getEntityBoundingBox().offset(x, 0.0D, 0.0D));
    if (z != 0.0D)
        entity.setEntityBoundingBox(entity.getEntityBoundingBox().offset(0.0D, 0.0D, z));
    boolean flag = entity.onGround || d3 != y && d3 < 0.0D;
    if (entity.stepHeight > 0.0F && flag && (d2 != x || d4 != z)) {
        double d14 = x;
        double d6 = y;
        double d7 = z;
        AxisAlignedBB axisalignedbb1 = entity.getEntityBoundingBox();
        entity.setEntityBoundingBox(axisalignedbb);
        y = (double) entity.stepHeight;
        List<AxisAlignedBB> list = entity.world.getCollisionBoxes(entity, entity.getEntityBoundingBox().offset(d2, y, d4));
        AxisAlignedBB axisalignedbb2 = entity.getEntityBoundingBox();
        AxisAlignedBB axisalignedbb3 = axisalignedbb2.offset(d2, 0.0D, d4);
        double d8 = y;
        int j1 = 0;
        for (int k1 = list.size(); j1 < k1; ++j1) {
            double offsetY = list1.get(j1).calculateYOffset(axisalignedbb3, y);
            if (offsetY <= 0)
                d8 = offsetY;
        }
        axisalignedbb2 = axisalignedbb2.offset(0.0D, d8, 0.0D);
        axisalignedbb2 = axisalignedbb2.offset(d2, 0.0D, 0.0D);
        axisalignedbb2 = axisalignedbb2.offset(0.0D, 0.0D, d4);
        AxisAlignedBB axisalignedbb4 = entity.getEntityBoundingBox();
        double d20 = y;
        int l2 = 0;
        for (int i3 = list.size(); l2 < i3; ++l2) {
            double offsetY = list1.get(i3).calculateYOffset(axisalignedbb4, y);
            if (offsetY <= 0)
                d20 = offsetY;
        }
        axisalignedbb4 = axisalignedbb4.offset(0.0D, d20, 0.0D);
        axisalignedbb4 = axisalignedbb4.offset(d2, 0.0D, 0.0D);
        axisalignedbb4 = axisalignedbb4.offset(0.0D, 0.0D, d4);
        double d23 = d2 * d2 + d4 * d4;
        double d9 = d2 * d2 + d4 * d4;
        if (d23 > d9) {
            x = d2;
            z = d4;
            y = -d8;
            entity.setEntityBoundingBox(axisalignedbb2);
        } else {
            x = d2;
            z = d4;
            y = -d20;
            entity.setEntityBoundingBox(axisalignedbb4);
        }
        int j4 = 0;
        for (int k4 = list.size(); j4 < k4; ++j4) {
            double offsetY = list1.get(j4).calculateYOffset(entity.getEntityBoundingBox(), y);
            if (offsetY <= 0)
                y = offsetY;
        }
        entity.setEntityBoundingBox(entity.getEntityBoundingBox().offset(0.0D, y, 0.0D));
        if (d14 * d14 + d7 * d7 >= x * x + z * z) {
            x = d14;
            y = d6;
            z = d7;
            entity.setEntityBoundingBox(axisalignedbb1);
        }
    }
    entity.world.profiler.endSection();
    entity.world.profiler.startSection("rest");
    entity.resetPositionToBB();
    entity.collidedHorizontally = d2 != x || d4 != z;
    entity.collidedVertically = d3 != y;
    entity.onGround = entity.collidedVertically && d3 < 0.0D;
    entity.collided = entity.collidedHorizontally || entity.collidedVertically;
    int j6 = MathHelper.floor(entity.posX);
    int i1 = MathHelper.floor(entity.posY - 0.20000000298023224D);
    int k6 = MathHelper.floor(entity.posZ);
    BlockPos blockpos = new BlockPos(j6, i1, k6);
    IBlockState iblockstate = entity.world.getBlockState(blockpos);
    if (iblockstate.getMaterial() == Material.AIR) {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = entity.world.getBlockState(blockpos1);
        Block block1 = iblockstate1.getBlock();
        if (block1 instanceof BlockFence || block1 instanceof BlockWall || block1 instanceof BlockFenceGate) {
            iblockstate = iblockstate1;
            blockpos = blockpos1;
        }
    }
    Block block = iblockstate.getBlock();
    if (d3 != y) {
        block.onLanded(entity.world, entity);
    }
    if ((!entity.onGround || !entity.isSneaking() || !(entity instanceof EntityPlayer)) && !entity.isRiding()) {
        double d15 = entity.posX - d10;
        double d16 = entity.posY - d11;
        double d17 = entity.posZ - d1;
        if (block != Blocks.LADDER) {
            d16 = 0.0D;
        }
        if (block != null && entity.onGround) {
            block.onEntityWalk(entity.world, blockpos, entity);
        }
        entity.distanceWalkedModified = (float) ((double) entity.distanceWalkedModified + (double) MathHelper.sqrt(d15 * d15 + d17 * d17) * 0.6D);
        entity.distanceWalkedOnStepModified = (float) ((double) entity.distanceWalkedOnStepModified + (double) MathHelper.sqrt(d15 * d15 + d16 * d16 + d17 * d17) * 0.6D);
    }
    try {
        AxisAlignedBB bb = entity.getEntityBoundingBox();
        BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(bb.minX + 0.001D, bb.minY + 0.001D, bb.minZ + 0.001D);
        BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos1 = BlockPos.PooledMutableBlockPos.retain(bb.maxX - 0.001D, bb.maxY - 0.001D, bb.maxZ - 0.001D);
        BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos2 = BlockPos.PooledMutableBlockPos.retain();
        if (entity.world.isAreaLoaded(blockpos$pooledmutableblockpos, blockpos$pooledmutableblockpos1)) {
            for (int i = blockpos$pooledmutableblockpos.getX(); i <= blockpos$pooledmutableblockpos1.getX(); ++i) {
                for (int j = blockpos$pooledmutableblockpos.getY(); j <= blockpos$pooledmutableblockpos1.getY(); ++j) {
                    for (int k = blockpos$pooledmutableblockpos.getZ(); k <= blockpos$pooledmutableblockpos1.getZ(); ++k) {
                        blockpos$pooledmutableblockpos2.setPos(i, j, k);
                        IBlockState state = entity.world.getBlockState(blockpos$pooledmutableblockpos2);
                        try {
                            state.getBlock().onEntityCollidedWithBlock(entity.world, blockpos$pooledmutableblockpos2, state, entity);
                        } catch (Throwable throwable) {
                            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Colliding entity with block");
                            CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being collided with");
                            CrashReportCategory.addBlockInfo(crashreportcategory, blockpos$pooledmutableblockpos2, state);
                            throw new ReportedException(crashreport);
                        }
                    }
                }
            }
        }
        blockpos$pooledmutableblockpos.release();
        blockpos$pooledmutableblockpos1.release();
        blockpos$pooledmutableblockpos2.release();
    } catch (Throwable throwable) {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Checking entity block collision");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being checked for collision");
        entity.addEntityCrashInfo(crashreportcategory);
        throw new ReportedException(crashreport);
    }
    entity.world.profiler.endSection();
// event.entity.noClip = false;
}
Also used : AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) Entity(net.minecraft.entity.Entity) IBlockState(net.minecraft.block.state.IBlockState) MoverType(net.minecraft.entity.MoverType) BlockWall(net.minecraft.block.BlockWall) CrashReport(net.minecraft.crash.CrashReport) BlockFenceGate(net.minecraft.block.BlockFenceGate) EntityLivingBase(net.minecraft.entity.EntityLivingBase) EntityPlayer(net.minecraft.entity.player.EntityPlayer) Block(net.minecraft.block.Block) BlockPos(net.minecraft.util.math.BlockPos) BlockFence(net.minecraft.block.BlockFence) CrashReportCategory(net.minecraft.crash.CrashReportCategory) ReportedException(net.minecraft.util.ReportedException) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

AxisAlignedBB (net.minecraft.util.math.AxisAlignedBB)597 BlockPos (net.minecraft.util.math.BlockPos)194 Entity (net.minecraft.entity.Entity)133 EntityPlayer (net.minecraft.entity.player.EntityPlayer)119 IBlockState (net.minecraft.block.state.IBlockState)110 Vec3d (net.minecraft.util.math.Vec3d)95 EntityLivingBase (net.minecraft.entity.EntityLivingBase)93 EnumFacing (net.minecraft.util.EnumFacing)88 ItemStack (net.minecraft.item.ItemStack)77 World (net.minecraft.world.World)69 TileEntity (net.minecraft.tileentity.TileEntity)67 List (java.util.List)48 ArrayList (java.util.ArrayList)47 RayTraceResult (net.minecraft.util.math.RayTraceResult)45 EntityItem (net.minecraft.entity.item.EntityItem)43 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)41 Block (net.minecraft.block.Block)36 PotionEffect (net.minecraft.potion.PotionEffect)36 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)25 Nullable (javax.annotation.Nullable)24