@SideOnly(Side.CLIENT)
@Override
public boolean addHitEffects(@Nonnull IBlockState state, @Nonnull World world, @Nonnull RayTraceResult target, @Nonnull ParticleManager effectRenderer) {
TileConduitBundle cb = getTileEntity(world, target.getBlockPos());
if (cb == null) {
return false;
}
TextureAtlasSprite tex = null;
if (YetaUtil.isSolidFacadeRendered(cb, Minecraft.getMinecraft().player)) {
IBlockState paintSource = cb.getPaintSource();
if (paintSource != null) {
tex = RenderUtil.getTexture(paintSource);
}
} else if (target.hitInfo instanceof CollidableComponent) {
CollidableComponent cc = (CollidableComponent) target.hitInfo;
IConduit con = cb.getConduit(cc.conduitType);
if (con != null && con instanceof IClientConduit.WithDefaultRendering) {
tex = ((IClientConduit.WithDefaultRendering) con).getTextureForState(cc).getCroppedSprite();
}
}
if (tex == null) {
tex = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture(ModObject.block_machine_base.getBlockNN().getDefaultState());
}
lastHitIcon = tex;
addBlockHitEffects(world, effectRenderer, target.hitVec.x, target.hitVec.y, target.hitVec.z, target.sideHit, tex);
return true;
}